Commit 8d2d3302bf2f08960b81b5c2b8aca045b4112510

Authored by 陈鑫涛
1 parent 4b8b038e

矩形

src/components/Common/BoxDesign/createAirplaneBox.js
... ... @@ -201,7 +201,7 @@ export const createText = (offsetX, offsetY, size, textContent) => {
201 201 text.setAttribute("dominant-baseline", "middle"); // 文字垂直居中
202 202 text.setAttribute("fill", "#333"); // 文字颜色
203 203 text.setAttribute("font-size", size); // 文字大小
204   - text.textContent = textContent || "Text"; // 默认文字内容
  204 + text.textContent = textContent || ""; // 默认文字内容
205 205 return text;
206 206 };
207 207 // 竖向双箭头
... ...
src/components/Common/BoxDesignCompontent/index.js
... ... @@ -261,7 +261,7 @@ const BoxDesignCompontent = baseProps => {
261 261 box.forEach(x => {
262 262 x.show = true;
263 263 });
264   - const title = ["盒底组件", "左(下)插位组件", "右(上)插位组件","上方盒舌","下方盒舌"];
  264 + const title = ["盒底组件", "左贴边位", "右贴边位","上方盒舌","下方盒舌"];
265 265 box.forEach(x => title.includes(x.sName) && (x.show = false));
266 266 setTopBoxList(box.filter(topBoxFilter));
267 267 setLeftBoxList(box.filter(leftBoxFilter));
... ...
src/components/Common/BoxDesignCompontent/svg.js
... ... @@ -50,6 +50,7 @@ import {
50 50 createBoxComponentNewFul5,
51 51 createBoxComponentNewFul6,
52 52 } from "../BoxDesign/createAirplaneBox";
  53 +import { log } from "lodash-decorators/utils";
53 54 const SvgBox = props => {
54 55 const svgContainerRef = useRef(null);
55 56 const svgRef = useRef(null);
... ... @@ -84,7 +85,7 @@ const SvgBox = props => {
84 85 // 获取盒长、盒宽、盒高
85 86 const boxLength = Number(boxList.find(x => x.sName === "盒长")?.value) || 0;
86 87 const boxWidth = Number(boxList.find(x => x.sName === "盒宽")?.value) || 0;
87   - const boxHeight = Number(boxList.find(x => x.sName === "盒高")?.value) || 0;
  88 + let boxHeight = Number(boxList.find(x => x.sName === "盒高")?.value) || 0;
88 89  
89 90 setWidth(boxLength);
90 91 setHeight(boxWidth);
... ... @@ -193,9 +194,66 @@ const SvgBox = props => {
193 194 } else if (Number(svgType) === 6) {
194 195 viewBoxWidth = boxWidth + 2;
195 196 viewBoxHeight = boxLength + 2;
  197 +
196 198 } else if (Number(svgType) === 7) {
197   - viewBoxWidth = boxWidth + dZTBW + dYTBW;
198   - viewBoxHeight = boxLength + dZSCW + dYXCW;
  199 + boxHeight = boxWidth
  200 + const zxcw = boxList.find(x => x.sName === "左(下)插位组件");
  201 + const zscw = boxList.find(x => x.sName === "左(上)插位组件");
  202 + const yscw = boxList.find(x => x.sName === "右(上)插位组件");
  203 + const yxcw = boxList.find(x => x.sName === "右(下)插位组件");
  204 + const zxcwType = zxcw?.type;
  205 + const zxcwValue = zxcw?.value;
  206 + const zscwType = zscw?.type;
  207 + const zscwValue = zscw?.value;
  208 + const yscwType = yscw?.type;
  209 + const yscwValue = yscw?.value;
  210 + const yxcwType = yxcw?.type;
  211 + const yxcwValue = yxcw?.value;
  212 + let leftValue = 0;
  213 + let rightValue = 0;
  214 + let topValue = 0;
  215 + let bottomValue = 0;
  216 + if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") {
  217 + leftValue = leftValue + Number(zxcwValue) + boxHeight * 2;
  218 + } else if (zxcwType === "4002" || zxcwType === "4003") {
  219 + leftValue = leftValue + Number(zxcwValue) + boxHeight;
  220 + } else if (zxcwType === "4004") {
  221 + leftValue = leftValue + Number(zxcwValue) + boxHeight * 3;
  222 + } else if (zxcwType === "4005") {
  223 + leftValue = boxHeight * 3;
  224 + }
  225 + if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") {
  226 + rightValue = rightValue + Number(yscwValue) + boxHeight * 2;
  227 + } else if (yscwType === "6002" || yscwType === "6003") {
  228 + rightValue = rightValue + Number(yscwValue) + boxHeight;
  229 + } else if (yscwType === "6004") {
  230 + rightValue = rightValue + Number(yscwValue) + boxHeight * 3;
  231 + } else if (yscwType === "6005") {
  232 + rightValue = boxHeight * 3;
  233 + }
  234 + if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") {
  235 + topValue = topValue + Number(zscwValue) + boxHeight * 2;
  236 + } else if (zscwType === "3002" || zscwType === "3003") {
  237 + topValue = topValue + Number(zscwValue) + boxHeight;
  238 + } else if (zscwType === "3004") {
  239 + topValue = topValue + Number(zscwValue) + boxHeight * 3;
  240 + } else if (zscwType === "3005") {
  241 + topValue = boxHeight * 3;
  242 + }
  243 + if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") {
  244 + bottomValue = bottomValue + Number(yxcwValue) + boxHeight * 2;
  245 + } else if (yxcwType === "7002" || yxcwType === "7003") {
  246 + bottomValue = bottomValue + Number(yxcwValue) + boxHeight;
  247 + } else if (yxcwType === "7004") {
  248 + bottomValue = bottomValue + Number(yxcwValue) + boxHeight * 3;
  249 + } else if (yxcwType === "7005") {
  250 + bottomValue = boxHeight * 3;
  251 + }
  252 + viewBoxWidth = Number(boxLength) + leftValue + rightValue;
  253 + console.log("🚀 ~ initSVG ~ leftValue:", leftValue,rightValue)
  254 + viewBoxHeight = Number(boxWidth) + topValue + bottomValue;
  255 + // viewBoxWidth = boxWidth + leftValue + rightValue;
  256 + // viewBoxHeight = boxLength + dZSCW + dYXCW;
199 257 }
200 258 // 计算缩放比例
201 259 let scale = 1;
... ... @@ -212,9 +270,15 @@ const SvgBox = props => {
212 270 ySvg = ySvg + boxHeight * scale;
213 271 }
214 272 ySvg = ySvg + 50 * scale;
  273 + let xSvg = 0;
  274 + if (Number(svgType === 7)) {
  275 + xSvg = scaledWidth + dZXCW * scale;
  276 + } else {
  277 + xSvg = zbtb?.value;
  278 + }
215 279 svg.setAttribute(
216 280 "viewBox",
217   - `${-(zbtb?.value * scale)} ${dSvgBoxWidth ? (dSvgBoxWidth === 100 ? -ySvg : 0) : -ySvg} ${dSvgBoxWidth ? dSvgBoxWidth + ySvg : 500} ${
  281 + `${-(xSvg * scale)} ${dSvgBoxWidth ? (dSvgBoxWidth === 100 ? -ySvg : 0) : -ySvg} ${dSvgBoxWidth ? dSvgBoxWidth + ySvg : 500} ${
218 282 dSvgBoxHeight ? dSvgBoxHeight - ySvg - bottom * scale : 250 + ySvg
219 283 }`
220 284 );
... ... @@ -227,13 +291,19 @@ const SvgBox = props => {
227 291 let ySvg = topOffect(boxList, boxLength, boxWidth, boxHeight) * scale;
228 292 if (Number(svgType) === 4) {
229 293 ySvg = ySvg + boxHeight;
230   - } else if (Number(svgType) === 7) {
231   - ySvg = ySvg + boxWidth / 2 + dZSCW;
232 294 }
233 295 ySvg = ySvg + 50 * scale;
  296 + let xSvg = 0;
  297 + if (Number(svgType === 7)) {
  298 + xSvg = scaledWidth + dZXCW * scale;
  299 + } else {
  300 + xSvg = zbtb?.value;
  301 + }
  302 + console.log(xSvg,viewBoxWidth / 2,viewBoxWidth,'viewBoxWidth / 2');
  303 +
234 304 svg.setAttribute(
235 305 "viewBox",
236   - `${-(dSvgBoxWidth ? zbtb?.value : viewBoxWidth / 2)} ${dSvgBoxWidth ? -0 : -ySvg} ${dSvgBoxWidth ? dSvgBoxWidth : 500} ${
  306 + `${-(dSvgBoxWidth ? xSvg : viewBoxWidth / 2)} ${dSvgBoxWidth ? -0 : -ySvg} ${dSvgBoxWidth ? dSvgBoxWidth : 500} ${
237 307 dSvgBoxHeight ? dSvgBoxHeight : 250
238 308 }`
239 309 );
... ... @@ -328,7 +398,7 @@ const SvgBox = props => {
328 398 } else {
329 399 leftSize = zbtb?.value;
330 400 }
331   - svg.setAttribute("viewBox", `${-((leftSize) * scale || 0)} ${-ySvg} ${dSvgBoxWidth} ${dSvgBoxHeight}`);
  401 + svg.setAttribute("viewBox", `${-(leftSize * scale || 0)} ${-ySvg} ${dSvgBoxWidth} ${dSvgBoxHeight}`);
332 402 svg.setAttribute("width", `${dSvgBoxWidth}px`);
333 403 svg.setAttribute("height", `${dSvgBoxHeight}px`);
334 404 svgContainerRef.current.style.width = `${dSvgBoxWidth}px`;
... ... @@ -1058,7 +1128,7 @@ const SvgBox = props => {
1058 1128 });
1059 1129 // svg.appendChild(g);
1060 1130 let pathList = [];
1061   - // 左上部件
  1131 + // 左上部件
1062 1132 pathList.push(createDynamicTopLeft(zsbj?.type, scaledWidth, -scaledHeight, -dZSCW * scale, 0, 0));
1063 1133 if ((zsbj?.type === "3001" && zsbj?.value) || (zsbj?.type === "3006" && zsbj?.value) || (zsbj?.type === "3007" && zsbj?.value)) {
1064 1134 pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales));
... ... @@ -1079,34 +1149,38 @@ const SvgBox = props => {
1079 1149 } else if (zsbj?.type && dZSCW) {
1080 1150 pathList.push(createText(scaledWidth / 2, -(dZSCW / 2 - 5), 10 * scales, dZSCW));
1081 1151 }
1082   - // 右下部件
1083   - pathList.push(createDynamicTopLeft(yxbj?.type, scaledWidth, scaledHeight, dYXCW, 0, scaledDeep));
1084   - if ((yxbj?.type === "7001" && yxbj?.value) || (yxbj?.type === "7006" && yxbj?.value) || (yxbj?.type === "7007" && yxbj?.value)) {
1085   - pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.2, scaledDeep + scaledHeight / 2, scales));
1086   - pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.2 + 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
1087   - pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.5, scaledDeep + scaledHeight + dYXCW / 2 - 4, 10 * scales, dYXCW));
1088   - } else if (yxbj?.type === "7004" && yxbj?.value) {
1089   - pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.2, scaledDeep + scaledHeight / 2, scales));
1090   - pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.2 - 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
1091   - pathList.push(
1092   - createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.85, scaledDeep + (scaledHeight + scaledHeight / 2), scales)
1093   - );
1094   - pathList.push(
1095   - createText(scaledWidth + scaledHeight + scaledWidth * 0.85 + 10 * scales, scaledDeep + (scaledHeight + scaledHeight / 2), 10 * scales, "W")
1096   - );
1097   - pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.3, scaledDeep + scaledHeight * 2 + dYXCW / 2 - 4, 10 * scales, dYXCW));
1098   - } else if (yxbj?.type === "7005" && yxbj?.value) {
1099   - pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.1, scaledDeep + scaledHeight / 2, scales));
1100   - pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.1 + 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
1101   - pathList.push(
1102   - createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.8, scaledDeep + (scaledHeight + scaledHeight / 2), scales)
1103   - );
1104   - pathList.push(
1105   - createText(scaledWidth + scaledHeight + scaledWidth * 0.8 + 10 * scale, scaledDeep + (scaledHeight + scaledHeight / 2), 10 * scale, "W")
1106   - );
1107   - } else if (dYXCW && yxbj?.type) {
1108   - pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.5, scaledDeep + dYXCW / 2 - 4, 10 * scales, dYXCW));
1109   - }
  1152 + // 右下部件
  1153 + pathList.push(createDynamicTopLeft(yxbj?.type, scaledWidth, scaledHeight, dYXCW * scale, 0, scaledHeight));
  1154 + // if ((yxbj?.type === "7001" && yxbj?.value) || (yxbj?.type === "7006" && yxbj?.value) || (yxbj?.type === "7007" && yxbj?.value)) {
  1155 + // pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.2, scaledDeep + scaledHeight / 2, scales));
  1156 + // pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.2 + 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
  1157 + // pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.5, scaledDeep + scaledHeight + dYXCW / 2 - 4, 10 * scales, dYXCW));
  1158 + // } else if (yxbj?.type === "7004" && yxbj?.value) {
  1159 + // pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.2, scaledDeep + scaledHeight / 2, scales));
  1160 + // pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.2 - 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
  1161 + // pathList.push(
  1162 + // createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.85, scaledDeep + (scaledHeight + scaledHeight / 2), scales)
  1163 + // );
  1164 + // pathList.push(
  1165 + // createText(scaledWidth + scaledHeight + scaledWidth * 0.85 + 10 * scales, scaledDeep + (scaledHeight + scaledHeight / 2), 10 * scales, "W")
  1166 + // );
  1167 + // pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.3, scaledDeep + scaledHeight * 2 + dYXCW / 2 - 4, 10 * scales, dYXCW));
  1168 + // } else if (yxbj?.type === "7005" && yxbj?.value) {
  1169 + // pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.1, scaledDeep + scaledHeight / 2, scales));
  1170 + // pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.1 + 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
  1171 + // pathList.push(
  1172 + // createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.8, scaledDeep + (scaledHeight + scaledHeight / 2), scales)
  1173 + // );
  1174 + // pathList.push(
  1175 + // createText(scaledWidth + scaledHeight + scaledWidth * 0.8 + 10 * scale, scaledDeep + (scaledHeight + scaledHeight / 2), 10 * scale, "W")
  1176 + // );
  1177 + // } else if (dYXCW && yxbj?.type) {
  1178 + // pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.5, scaledDeep + dYXCW / 2 - 4, 10 * scales, dYXCW));
  1179 + // }
  1180 + // 右边
  1181 + pathList.push(createFull(ysbj?.type, scaledWidth, scaledHeight, dYSCW * scale, scaledWidth, 0));
  1182 + pathList.push(createFull(zxbj?.type, scaledWidth, -scaledHeight, -dZXCW * scale, 0, 0));
  1183 +
1110 1184 pathList.forEach(x => {
1111 1185 g.appendChild(x);
1112 1186 });
... ... @@ -1281,7 +1355,7 @@ const SvgBox = props => {
1281 1355 }
1282 1356 top = addValue > sfhs?.value ? addValue : sfhs?.value;
1283 1357 } else {
1284   - top = addValue?addValue:0 > sfhs?.value ? max : sfhs?.value;
  1358 + top = sfhs?.value ? max : sfhs?.value;
1285 1359 }
1286 1360 } else if (zscw?.type) {
1287 1361 const max = dZSCW;
... ...
src/components/Common/Typesetting/typesetting.js
... ... @@ -37,7 +37,10 @@ const Typesetting = props => {
37 37 sColumnNameConfig,
38 38 bAdvancedSetting, // 高级设置
39 39 sSvgPath,
  40 + dL = 0,
  41 + dW = 0
40 42 } = slaveRowData;
  43 + console.log("🚀 ~ slaveRowData:", slaveRowData)
41 44  
42 45 const { masterData, selectedNode, slaveData } = state;
43 46 if (!masterData) return;
... ... @@ -89,9 +92,9 @@ const Typesetting = props => {
89 92 // dHorizontal = 1;
90 93 // 如果需要自定义排版数
91 94 // 确认是竖向排列还是横向排列
92   -
93   - const L = Number(masterData?.dLength) || 0;
94   - const W = masterData?.dWidth || 0;
  95 + const isKapai = slaveRowData.sName === '卡牌'
  96 + const L = isKapai? Number(dL) : Number(masterData?.dLength) || 0;
  97 + const W = isKapai? Number(dW) : masterData?.dWidth || 0;
95 98 const H = masterData?.dWidth || 0;
96 99 const D = masterData?.dHeight || 0;
97 100 // 动态计算公式值
... ...
src/components/QuickQuote/index.jsx
... ... @@ -1613,15 +1613,14 @@ const BoxComponent = props => {
1613 1613 ) {
1614 1614 return false;
1615 1615 }
1616   - if (item.sName === 'iRateType') {
1617   - console.log(item,'iRateType');
1618   -
  1616 + if (item.sName === "iRateType") {
  1617 + console.log(item, "iRateType");
1619 1618 }
1620 1619 if (Number(selectedNode.iRateType) === 0 && item.sName === "iPage") {
1621 1620 return false;
1622 1621 } else {
1623 1622 if (item.sName === "iPage") {
1624   - const rateList = JSON.parse(slaveConfig.gdsconfigformslave.find(x=>x.sName === "iRateType")?.showDropDown) || []
  1623 + const rateList = JSON.parse(slaveConfig.gdsconfigformslave.find(x => x.sName === "iRateType")?.showDropDown) || [];
1625 1624 item.showName = rateList[Number(selectedNode.iRateType)] || "倍率";
1626 1625 }
1627 1626 }
... ... @@ -2074,14 +2073,15 @@ const BoxComponent = props => {
2074 2073 const { sStripType = 0 } = selectedNode;
2075 2074 if (
2076 2075 (slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth && masterData.dHeight) ||
2077   - (Number(sStripType) === 1 && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth)
  2076 + (Number(sStripType) === 1 && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) ||
  2077 + slaveRowData.sName ==='卡牌'
2078 2078 ) {
2079 2079 const slaveNewData = slaveRowData.upAbleConfigsExtra || JSON.parse(slaveRowData.sColumnNameConfig);
2080 2080 const tables = [
2081 2081 { name: "盒型类别", value: slaveRowData.sBoxType, type: null },
2082 2082 { name: "盒身", value: slaveRowData.sBoxBody, type: slaveRowData.sTypes },
2083   - { name: "盒长", value: masterData.dLength ? Number(masterData.dLength) : 0, type: null },
2084   - { name: "盒宽", value: masterData.dWidth ? Number(masterData.dWidth) : 0, type: null },
  2083 + { name: "盒长", value:slaveRowData.dL ? slaveRowData.dL : masterData.dLength ? Number(masterData.dLength) : 0, type: null },
  2084 + { name: "盒宽", value: slaveRowData.dW ? slaveRowData.dW :masterData.dWidth ? Number(masterData.dWidth) : 0, type: null },
2085 2085 { name: "盒高", value: masterData.dHeight ? Number(masterData.dHeight) : 0, type: null },
2086 2086 ];
2087 2087 const titleList1 = [
... ... @@ -2115,7 +2115,7 @@ const BoxComponent = props => {
2115 2115 };
2116 2116  
2117 2117 // 确认是竖向排列还是横向排列
2118   - const L = masterData?.dLength || 0;
  2118 + const L = masterData?.dLength || 0;
2119 2119 const W = masterData?.dWidth || 0;
2120 2120 const H = masterData?.dWidth || 0;
2121 2121 const D = masterData?.dHeight || 0;
... ... @@ -2171,12 +2171,14 @@ const BoxComponent = props => {
2171 2171 dSvgBoxHeight: 200,
2172 2172 showNew: 1,
2173 2173 };
  2174 + console.log(boxList,'boxList');
  2175 +
2174 2176 // upViewProps.viewRow =
2175 2177  
2176 2178 const isShowImg = boxList.find(x => x.sName === "盒身")?.type !== "" || false;
2177 2179 const PrintingParameters = props.getI18nName("PrintingParameters", "印刷参数");
2178 2180  
2179   - const BoxInformation = commonFunc.showLocalMessage(props, "Box-typeInformation", "拼版信息");
  2181 + const BoxInformation = commonFunc.showLocalMessage(props, "Box-typeInformation", "盒型信息");
2180 2182 const ImpositionInformation = commonFunc.showLocalMessage(props, "ImpositionInformation", "拼版信息");
2181 2183  
2182 2184 const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片");
... ... @@ -2185,10 +2187,13 @@ const BoxComponent = props => {
2185 2187 { src: slaveRowData.sPackDetailPathUpLoad, alt: "展开图" },
2186 2188 { src: slaveRowData.sPackPath, alt: "立体图" },
2187 2189 ];
  2190 + console.log(state,'activeKey');
  2191 + const {activeKey = 0} = state
2188 2192 return (
2189 2193 <Tabs
2190 2194 key={boxModel}
2191 2195 type="card"
  2196 + activeKey={activeKey}
2192 2197 className={`noXlyTabs ${styles.tabs} ${!bBox ? styles.hideTab : ""}`}
2193 2198 items={[BoxInformation, ImpositionInformation].map((title, index) => {
2194 2199 return {
... ... @@ -2234,6 +2239,7 @@ const BoxComponent = props =&gt; {
2234 2239 props.setState(pre => ({
2235 2240 ...pre,
2236 2241 slaveData: [...slaveData],
  2242 + activeKey:1
2237 2243 }));
2238 2244 }}
2239 2245 value={radioValue}
... ... @@ -2374,12 +2380,15 @@ const BoxComponent = props =&gt; {
2374 2380 })}
2375 2381 onChange={activeKey => {
2376 2382 // 切换事件的处理逻辑
2377   - const index = slaveData?.findIndex(x => x.sTreeNodeName === selectedNode.showName && x.sBoxModel === boxModel);
2378   - if (index !== -1) {
2379   - slaveData[index].dMaxLength = Number(selectedNode.sMachineStyle.split("*")[0]);
2380   - slaveData[index].dMaxWidth = Number(selectedNode.sMachineStyle.split("*")[1]);
2381   - }
  2383 + // const index = slaveData?.findIndex(x => x.sTreeNodeName === selectedNode.showName && x.sBoxModel === boxModel);
  2384 + // if (index !== -1) {
  2385 + // slaveData[index].dMaxLength = Number(selectedNode.sMachineStyle.split("*")[0]);
  2386 + // slaveData[index].dMaxWidth = Number(selectedNode.sMachineStyle.split("*")[1]);
  2387 + // }
2382 2388 // 可以在这里执行其他操作,比如根据 activeKey 加载数据
  2389 + props.setState(pre => {
  2390 + return { ...pre, activeKey };
  2391 + });
2383 2392 }}
2384 2393 />
2385 2394 );
... ...