Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | :printHeight="currentPrintHeight" |
| | | :materialDetails="materialDetails" |
| | | :state="state" |
| | | :projectNo="processId" |
| | | style="" |
| | | v-if="dataLoaded" |
| | | /> |
| | |
| | | state.value=props.state; |
| | | selectLayout(); |
| | | } |
| | | |
| | | }); |
| | | |
| | | const handlePrint = () => { |
| | |
| | |
|
| | | // 确保数据结构正确
|
| | | if (parsedData && parsedData.layouts) {
|
| | | layoutData.value = parsedData;
|
| | | const dataWithProjectId = {
|
| | | ...parsedData,
|
| | | projectNo: processId,
|
| | | projectNumber: processId
|
| | | };
|
| | |
|
| | | layoutData.value = dataWithProjectId;
|
| | | dataLoaded.value = true;
|
| | | } else {
|
| | | ElMessage.warning("数据格式不正确");
|
| | |
| | | printLayout: { type: String, default: '2rows-2cols' }, // 可选值:4rows-2cols, 3rows-2cols, 3rows-1col, 2rows-2cols
|
| | | fixedPageHeight: { type: Number, default: 1100 }, // 固定页面高度
|
| | | materialDetails:null,
|
| | | state:null
|
| | | state:null,
|
| | | projectNo: { type: [String, Number], default: null }
|
| | | });
|
| | |
|
| | | const emit = defineEmits(['rectClicked']);
|
| | |
| | |
|
| | | const updateLayout = () => {
|
| | | if (!layoutPanel.value) return;
|
| | | //layouts.value = props.layoutData.layouts;
|
| | |
|
| | | if (!props.layoutData) {
|
| | | console.warn('layoutData 为空');
|
| | | return;
|
| | |
| | | } else {
|
| | | console.warn('layouts 数据格式不正确或为空');
|
| | | }
|
| | |
|
| | | // 确保数据加载状态正确设置
|
| | | if (processId.value) {
|
| | | dataLoaded.value = true;
|
| | | dataLoadeds.value = true;
|
| | | }
|
| | |
|
| | | adjustPrintLayout();
|
| | | // 强制重新渲染
|
| | | layoutPanel.value.offsetHeight; // 触发布局更新
|
| | | };
|
| | |
|