From b5759a1d39970dc1e8dd2a49b19ea603be882c2c Mon Sep 17 00:00:00 2001 From: 陈鑫涛 <10125295+chen-xintao97@user.noreply.gitee.com> Date: Wed, 25 Jun 2025 09:14:52 +0800 Subject: [PATCH] 修复排版一个展示不下的问题 --- src/components/Common/Typesetting/typesetting.js | 27 +++++++++++++++++++++------ src/mobile/components/SelectInput.jsx | 4 +++- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/components/Common/Typesetting/typesetting.js b/src/components/Common/Typesetting/typesetting.js index 62dd2d8..530291a 100644 --- a/src/components/Common/Typesetting/typesetting.js +++ b/src/components/Common/Typesetting/typesetting.js @@ -184,8 +184,8 @@ const Typesetting = props => { let DisableMateriallIcon = L ? sPackDetailPath : null; // 盒子展长展开公式计算 - const innerWidth = evaluateFormula(sLengthFormula, variabless); - const innerHeight = evaluateFormula(sWidthFormula, variabless); + const innerWidth = slaveRowData.sTypes === "6" ? evaluateFormula(sWidthFormula, variabless) : evaluateFormula(sLengthFormula, variabless); + const innerHeight = slaveRowData.sTypes === "6" ? evaluateFormula(sLengthFormula, variabless) : evaluateFormula(sWidthFormula, variabless); const { sSettingMethod, sSGroupOffset, iFAngle, iSAngle, sSecondorizontalOffset, sSecondLongitudinalOffset } = radioValue ? radioValue : {}; const dFWidthOffset = evaluateFormula(radioValue?.sFWidthOffset, variabless); // 首盒纵向偏移 const dFLengthOffset = evaluateFormula(radioValue?.sFLengthOffset, variabless); // 首盒横向偏移 @@ -249,6 +249,7 @@ const Typesetting = props => { const commonHeightCheck = remainingHeight > jInnerHeight; const commonWidthCheck = remainingWidth > jInnerWidth; const isCustomized = bAdvancedSetting; + let remaining = isVertical ? commonHeightCheck : commonWidthCheck; // const remaining = false; @@ -497,7 +498,15 @@ const Typesetting = props => { } } } - + // 如果第一行只能放下一个 + if (cols === 0 && !isVertical) { + const maxLength = Number(slaveDataDetail?.dMaxLength); + if (maxLength > innerWidth) { + let leftPosition = 0; + let topPosition = 0; + innerDivs.push(createBoxOne(0, rows, 3, leftPosition + dZBLB, topPosition + dSBLB, iFAngle, DisableMateriallIcon)); + } + } // 判断展开长展开宽是否变化 if (dPartsLength !== innerWidth && !innerDivs.length) { setDPartsLength(innerWidth); @@ -513,7 +522,7 @@ const Typesetting = props => { const propsDataHeight = Number(propsData.props.style.height.slice(0, -2)); const propsDataTop = Number(propsData.props.style.top.slice(0, -2)); // 判断列是否是单独的 - const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined); // 原纸长 + const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) - dYBJJ; // 原纸长 const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB; // 计算开数 const dSinglePQty = isVertical @@ -537,7 +546,6 @@ const Typesetting = props => { newDHorizontalType !== dHorizontalType || newDPortraitType !== dPortraitType ) { - setMaterialLength(newMaterialLength); setMaterialWidth(newMaterialWidth); setMaterialName(sMaterialsName); @@ -915,7 +923,14 @@ const Typesetting = props => { ) : ( - "" +
排版尺寸大于上机尺寸,请确认参数!
)} { if (!visible) return; let { sDropDownType, sVisColumnName } = itemDetail; if (sVisColumnName && sVisColumnName === "sProcessName") { + if (sDropDownType === "sql") { if (itemDetail.sParamDropDown) { const { sParamDropDown = "", sName0, sName } = itemDetail; @@ -140,6 +141,7 @@ const SelectInput = props => { // getSqlDropDownData(searchValue); } else if ((sDropDownType = "const")) { + if (!itemDetail.showDropDown) return; const list = Object.entries(JSON.parse(itemDetail.showDropDown)).map(([key, value]) => ({ label: value, @@ -198,7 +200,7 @@ const SelectInput = props => { }} readOnly={bReadonly} /> - {itemDetail.sDropDownType === 'sql'? ( + {(itemDetail.sDropDownType === 'sql' || itemDetail.sDropDownType === 'const')? (
-- libgit2 0.22.2