Commit bc8888335349704ded236f137a21a3849f5321a5

Authored by 陈鑫涛
1 parent 391e5816

根据字段展示是否出血

src/components/Common/BoxDesignCompontent/index.js
@@ -53,16 +53,13 @@ const BoxDesignEvent = props => { @@ -53,16 +53,13 @@ const BoxDesignEvent = props => {
53 setLoading(false); 53 setLoading(false);
54 }; 54 };
55 55
56 - useEffect(  
57 - () => {  
58 - if (!formData.length) return; 56 + useEffect(() => {
  57 + if (!formData.length) return;
59 58
60 - const data = formData[0].gdsconfigformslave.filter(Item => Item.bVisible);  
61 - setTableData(data);  
62 - props.onSaveState(pre => ({ ...pre, data }));  
63 - },  
64 - [formData.length]  
65 - ); 59 + const data = formData[0].gdsconfigformslave.filter(Item => Item.bVisible);
  60 + setTableData(data);
  61 + props.onSaveState(pre => ({ ...pre, data }));
  62 + }, [formData.length]);
66 63
67 return { 64 return {
68 ...props, 65 ...props,
@@ -87,51 +84,48 @@ const BoxDesignCompontent = baseProps => { @@ -87,51 +84,48 @@ const BoxDesignCompontent = baseProps => {
87 const [rightBoxList, setRightBoxList] = useState([]); 84 const [rightBoxList, setRightBoxList] = useState([]);
88 const [boxKey, setBoxKey] = useState(new Date().getTime()); 85 const [boxKey, setBoxKey] = useState(new Date().getTime());
89 if (!boxVisible) return ""; 86 if (!boxVisible) return "";
90 - useEffect(  
91 - () => {  
92 - if (tableData && tableData.length) {  
93 - const newTableColum = tableData.map(item => {  
94 - return {  
95 - ...item,  
96 - isEditable: true,  
97 - isSelect: false,  
98 - selectImage: null,  
99 - value: "",  
100 - };  
101 - });  
102 - // const last = newTableColum.pop();  
103 - // const newList = [last, ...newTableColum];  
104 - const newList = newTableColum.filter(  
105 - item => item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽")  
106 - );  
107 - const newLists = newTableColum.filter(  
108 - item =>  
109 - !(item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽") || item.showName.includes("盒身"))  
110 - );  
111 - const bodyList = newTableColum.filter(item => item.showName.includes("盒身"));  
112 - newLists.forEach(x => {  
113 - if (x.showName === "盒型类别") {  
114 - x.showName = "盒型名称";  
115 - }  
116 - });  
117 - setTableColum(newLists);  
118 - setBoxBodyList(bodyList);  
119 - newList.forEach(item => {  
120 - let name = "";  
121 - if (item.showName === "盒长") {  
122 - name = item.showName + "(L)";  
123 - } else if (item.showName === "盒宽") {  
124 - name = item.showName + "(W)";  
125 - } else if (item.showName === "盒高") {  
126 - name = item.showName + "(D)";  
127 - }  
128 - item.sName = name;  
129 - });  
130 - setTableDataList(newList);  
131 - }  
132 - },  
133 - [tableData]  
134 - ); 87 + useEffect(() => {
  88 + if (tableData && tableData.length) {
  89 + const newTableColum = tableData.map(item => {
  90 + return {
  91 + ...item,
  92 + isEditable: true,
  93 + isSelect: false,
  94 + selectImage: null,
  95 + value: "",
  96 + };
  97 + });
  98 + // const last = newTableColum.pop();
  99 + // const newList = [last, ...newTableColum];
  100 + const newList = newTableColum.filter(
  101 + item => item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽")
  102 + );
  103 + const newLists = newTableColum.filter(
  104 + item =>
  105 + !(item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽") || item.showName.includes("盒身"))
  106 + );
  107 + const bodyList = newTableColum.filter(item => item.showName.includes("盒身"));
  108 + newLists.forEach(x => {
  109 + if (x.showName === "盒型类别") {
  110 + x.showName = "盒型名称";
  111 + }
  112 + });
  113 + setTableColum(newLists);
  114 + setBoxBodyList(bodyList);
  115 + newList.forEach(item => {
  116 + let name = "";
  117 + if (item.showName === "盒长") {
  118 + name = item.showName + "(L)";
  119 + } else if (item.showName === "盒宽") {
  120 + name = item.showName + "(W)";
  121 + } else if (item.showName === "盒高") {
  122 + name = item.showName + "(D)";
  123 + }
  124 + item.sName = name;
  125 + });
  126 + setTableDataList(newList);
  127 + }
  128 + }, [tableData]);
135 const titleList = [ 129 const titleList = [
136 "上方盒舌", 130 "上方盒舌",
137 "盒底组件", 131 "盒底组件",
@@ -219,68 +213,72 @@ const BoxDesignCompontent = baseProps => { @@ -219,68 +213,72 @@ const BoxDesignCompontent = baseProps => {
219 }); 213 });
220 } 214 }
221 // 有数据的时候 盒型设计需要赋值 215 // 有数据的时候 盒型设计需要赋值
222 - useEffect(  
223 - () => {  
224 - if (newBoxList.length > 0 && !arraysAreEqual(boxList, newBoxList)) {  
225 - setBoxList(newBoxList);  
226 - }  
227 - },  
228 - [newBoxList]  
229 - ); 216 + useEffect(() => {
  217 + if (newBoxList.length > 0 && !arraysAreEqual(boxList, newBoxList)) {
  218 + setBoxList(newBoxList);
  219 + }
  220 + }, [newBoxList]);
230 221
231 const arraysAreEqual = (arr1, arr2) => { 222 const arraysAreEqual = (arr1, arr2) => {
232 if (arr1.length !== arr2.length) return false; 223 if (arr1.length !== arr2.length) return false;
233 return arr1.every((item, index) => item.sName === arr2[index].sName); 224 return arr1.every((item, index) => item.sName === arr2[index].sName);
234 }; 225 };
235 - useEffect(  
236 - () => {  
237 - const type = boxList.find(item => item.sName === "盒身")?.type;  
238 - const updateLists = () => {  
239 - const topBoxFilter = item => item.sName === "上方盒舌" || item.sName === "盒底组件" || item.sName === "下方盒舌"; 226 + useEffect(() => {
  227 + const type = boxList.find(item => item.sName === "盒身")?.type;
  228 + const updateLists = () => {
  229 + const topBoxFilter = item => item.sName === "上方盒舌" || item.sName === "盒底组件" || item.sName === "下方盒舌";
240 230
241 - const leftBoxFilter = item => item.sName === "左(上)插位组件" || item.sName === "左贴边位" || item.sName === "左(下)插位组件"; 231 + const leftBoxFilter = item => item.sName === "左(上)插位组件" || item.sName === "左贴边位" || item.sName === "左(下)插位组件";
242 232
243 - const rightBoxFilter = item => item.sName === "右(上)插位组件" || item.sName === "右贴边位" || item.sName === "右(下)插位组件"; 233 + const rightBoxFilter = item => item.sName === "右(上)插位组件" || item.sName === "右贴边位" || item.sName === "右(下)插位组件";
244 234
245 - if (type === "2" || type === 2 || type === "4" || type === 4 || type === 3 || type === "3" || type === 5 || type === "5") {  
246 - const box = [...boxList];  
247 - box.forEach(x => {  
248 - x.show = true;  
249 - });  
250 - if (type === "2" || type === 2) {  
251 - box.forEach(x => x.sName === "盒底组件" && (x.show = false));  
252 - } else if (type === "4" || type === 4) {  
253 - const title = ["盒底组件", "左贴边位", "右贴边位"];  
254 - box.forEach(x => title.includes(x.sName) && (x.show = false));  
255 - } else if (type === "3" || type === 3) {  
256 - const title = ["左(上)插位组件", "右(下)插位组件", "盒底组件"];  
257 - box.forEach(x => title.includes(x.sName) && (x.show = false));  
258 - } else if (type === "5" || type === 5) {  
259 - const title = ["盒底组件"];  
260 - box.forEach(x => title.includes(x.sName) && (x.show = false));  
261 - }  
262 - setTopBoxList(box.filter(topBoxFilter));  
263 - setLeftBoxList(box.filter(leftBoxFilter));  
264 - if (type === 3 || type === "3") {  
265 - setRightBoxList(box.filter(rightBoxFilter).reverse());  
266 - } else {  
267 - setRightBoxList(box.filter(rightBoxFilter));  
268 - } 235 + if (type === "2" || type === 2 || type === "4" || type === 4 || type === 3 || type === "3" || type === 5 || type === "5") {
  236 + const box = [...boxList];
  237 + box.forEach(x => {
  238 + x.show = true;
  239 + });
  240 + if (type === "2" || type === 2) {
  241 + box.forEach(x => x.sName === "盒底组件" && (x.show = false));
  242 + } else if (type === "4" || type === 4) {
  243 + const title = ["盒底组件", "左贴边位", "右贴边位"];
  244 + box.forEach(x => title.includes(x.sName) && (x.show = false));
  245 + } else if (type === "3" || type === 3) {
  246 + const title = ["左(上)插位组件", "右(下)插位组件", "盒底组件"];
  247 + box.forEach(x => title.includes(x.sName) && (x.show = false));
  248 + } else if (type === "5" || type === 5) {
  249 + const title = ["盒底组件"];
  250 + box.forEach(x => title.includes(x.sName) && (x.show = false));
  251 + }
  252 + setTopBoxList(box.filter(topBoxFilter));
  253 + setLeftBoxList(box.filter(leftBoxFilter));
  254 + if (type === 3 || type === "3") {
  255 + setRightBoxList(box.filter(rightBoxFilter).reverse());
269 } else { 256 } else {
270 - const box = [...boxList];  
271 - box.forEach(x => {  
272 - x.show = true;  
273 - });  
274 - setTopBoxList(box.filter(topBoxFilter));  
275 - setLeftBoxList(box.filter(leftBoxFilter));  
276 setRightBoxList(box.filter(rightBoxFilter)); 257 setRightBoxList(box.filter(rightBoxFilter));
277 } 258 }
278 - }; 259 + } else if (type === "7" || type === 7) {
  260 + const box = [...boxList];
  261 + box.forEach(x => {
  262 + x.show = true;
  263 + });
  264 + const title = ["盒底组件", "左(下)插位组件", "右(上)插位组件","上方盒舌","下方盒舌"];
  265 + box.forEach(x => title.includes(x.sName) && (x.show = false));
  266 + setTopBoxList(box.filter(topBoxFilter));
  267 + setLeftBoxList(box.filter(leftBoxFilter));
  268 + setRightBoxList(box.filter(rightBoxFilter));
  269 + } else {
  270 + const box = [...boxList];
  271 + box.forEach(x => {
  272 + x.show = true;
  273 + });
  274 + setTopBoxList(box.filter(topBoxFilter));
  275 + setLeftBoxList(box.filter(leftBoxFilter));
  276 + setRightBoxList(box.filter(rightBoxFilter));
  277 + }
  278 + };
279 279
280 - updateLists();  
281 - },  
282 - [boxList]  
283 - ); 280 + updateLists();
  281 + }, [boxList]);
284 282
285 const handleFocus = (e, index) => { 283 const handleFocus = (e, index) => {
286 if (boxList && boxList.length) { 284 if (boxList && boxList.length) {
@@ -338,7 +336,7 @@ const BoxDesignCompontent = baseProps => { @@ -338,7 +336,7 @@ const BoxDesignCompontent = baseProps => {
338 }; 336 };
339 const getImage = fileName => { 337 const getImage = fileName => {
340 // const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&sModelsId=100&token=${props.token}`; 338 // const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&sModelsId=100&token=${props.token}`;
341 - const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&scale=0.1&sModelsId=100&token=${props.token}` 339 + const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&scale=0.1&sModelsId=100&token=${props.token}`;
342 return imageUrl; 340 return imageUrl;
343 }; 341 };
344 // 下来框 342 // 下来框
@@ -346,7 +344,7 @@ const BoxDesignCompontent = baseProps => { @@ -346,7 +344,7 @@ const BoxDesignCompontent = baseProps => {
346 return ( 344 return (
347 <Select.Option key={option.sId} value={option.sCode} label={option.sName} image={getImage(option.sMakeUpPath)}> 345 <Select.Option key={option.sId} value={option.sCode} label={option.sName} image={getImage(option.sMakeUpPath)}>
348 <div style={{ display: "flex", alignItems: "center" }}> 346 <div style={{ display: "flex", alignItems: "center" }}>
349 - {option.sMakeUpPath ? <img src={getImage(option.sMakeUpPath)} style={{ width: 24, height: 24, marginRight: 8 }} /> : ""} 347 + {option.sMakeUpPath ? <img src={getImage(option.sMakeUpPath)} style={{ width: 24, height: 24, marginRight: 8 }} /> : ""}
350 <span>{option.sName}</span> 348 <span>{option.sName}</span>
351 </div> 349 </div>
352 </Select.Option> 350 </Select.Option>
@@ -484,7 +482,10 @@ const BoxDesignCompontent = baseProps =&gt; { @@ -484,7 +482,10 @@ const BoxDesignCompontent = baseProps =&gt; {
484 rightBottomValue = boxHeight * 2; 482 rightBottomValue = boxHeight * 2;
485 rightBottom = "+ W * 2"; 483 rightBottom = "+ W * 2";
486 } 484 }
487 - sWidthFormula = (leftTopValue > rightTopValue ? leftTop : rightTop) + "D" + (hdzj? ' + dHDC': (leftBottomValue > rightBottomValue ? leftBottom : rightBottom)) ; 485 + sWidthFormula =
  486 + (leftTopValue > rightTopValue ? leftTop : rightTop) +
  487 + "D" +
  488 + (hdzj ? " + dHDC" : leftBottomValue > rightBottomValue ? leftBottom : rightBottom);
488 } else if (boxType && boxType === "2") { 489 } else if (boxType && boxType === "2") {
489 // 单折 490 // 单折
490 const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value; 491 const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value;
src/components/Common/BoxDesignCompontent/svg.js
@@ -76,7 +76,7 @@ const SvgBox = props =&gt; { @@ -76,7 +76,7 @@ const SvgBox = props =&gt; {
76 const g = document.createElementNS("http://www.w3.org/2000/svg", "g"); // 创建 <g> 76 const g = document.createElementNS("http://www.w3.org/2000/svg", "g"); // 创建 <g>
77 77
78 svg.innerHTML = ""; 78 svg.innerHTML = "";
79 - if (!(boxList && boxList.length)) return 79 + if (!(boxList && boxList.length)) return;
80 // 获取盒型类型 80 // 获取盒型类型
81 const svgTypes = boxList.find(x => x.sName === "盒身")?.type || 1; 81 const svgTypes = boxList.find(x => x.sName === "盒身")?.type || 1;
82 setSvgType(svgTypes); 82 setSvgType(svgTypes);
@@ -222,10 +222,12 @@ const SvgBox = props =&gt; { @@ -222,10 +222,12 @@ const SvgBox = props =&gt; {
222 svgContainerRef.current.style.width = `${dSvgBoxWidth ? dSvgBoxWidth : 500}px`; 222 svgContainerRef.current.style.width = `${dSvgBoxWidth ? dSvgBoxWidth : 500}px`;
223 svgContainerRef.current.style.height = `${dSvgBoxHeight ? dSvgBoxHeight : 250}px`; 223 svgContainerRef.current.style.height = `${dSvgBoxHeight ? dSvgBoxHeight : 250}px`;
224 } else { 224 } else {
225 - scale = 0.6; 225 + scale = 0.5;
226 let ySvg = topOffect(boxList, boxLength, boxWidth, boxHeight) * scale; 226 let ySvg = topOffect(boxList, boxLength, boxWidth, boxHeight) * scale;
227 if (Number(svgType) === 4) { 227 if (Number(svgType) === 4) {
228 ySvg = ySvg + boxHeight; 228 ySvg = ySvg + boxHeight;
  229 + } else if (Number(svgType) === 7) {
  230 + ySvg = ySvg + boxWidth / 2 + dZSCW;
229 } 231 }
230 ySvg = ySvg + 50 * scale; 232 ySvg = ySvg + 50 * scale;
231 svg.setAttribute( 233 svg.setAttribute(
@@ -374,7 +376,7 @@ const SvgBox = props =&gt; { @@ -374,7 +376,7 @@ const SvgBox = props =&gt; {
374 pathList.push(createText(-dZTBW * 0.4, scaledDeep / 2, 10 * scales, dZTBW)); 376 pathList.push(createText(-dZTBW * 0.4, scaledDeep / 2, 10 * scales, dZTBW));
375 } 377 }
376 // 右边贴边 378 // 右边贴边
377 - 379 +
378 pathList.push(createTrapezoidRight(ybtb?.type, scaledDeep, dYTBW * scale, scaledWidth * 2 + scaledHeight * 2, 0, dSFHS * scale, dXFHS * scale)); 380 pathList.push(createTrapezoidRight(ybtb?.type, scaledDeep, dYTBW * scale, scaledWidth * 2 + scaledHeight * 2, 0, dSFHS * scale, dXFHS * scale));
379 if (ybtb?.type && dYTBW) { 381 if (ybtb?.type && dYTBW) {
380 pathList.push(createText(scaledWidth * 2 + scaledHeight * 2 + dYTBW * 0.4, scaledDeep / 2, 10 * scales, dYTBW)); 382 pathList.push(createText(scaledWidth * 2 + scaledHeight * 2 + dYTBW * 0.4, scaledDeep / 2, 10 * scales, dYTBW));
@@ -1044,6 +1046,66 @@ const SvgBox = props =&gt; { @@ -1044,6 +1046,66 @@ const SvgBox = props =&gt; {
1044 g.appendChild(createPathElements(rect.x, rect.y, rect.width, rect.height)); 1046 g.appendChild(createPathElements(rect.x, rect.y, rect.width, rect.height));
1045 }); 1047 });
1046 svg.appendChild(g); 1048 svg.appendChild(g);
  1049 + } else if (Number(svgType) === 7) {
  1050 + const rectangles = [{ x: 0, y: 0, width: scaledWidth, height: scaledHeight }];
  1051 + rectangles.forEach(rect => {
  1052 + g.appendChild(createPathElement(rect.x, rect.y, rect.width, rect.height));
  1053 + });
  1054 + // svg.appendChild(g);
  1055 + let pathList = [];
  1056 + // 左上部件
  1057 + pathList.push(createDynamicTopLeft(zsbj?.type, scaledWidth, -scaledHeight, -dZSCW * scale, 0, 0));
  1058 + if ((zsbj?.type === "3001" && zsbj?.value) || (zsbj?.type === "3006" && zsbj?.value) || (zsbj?.type === "3007" && zsbj?.value)) {
  1059 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales));
  1060 + pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
  1061 + pathList.push(createText(scaledWidth / 2, -scaledHeight - dZSCW / 2 + 4, 10 * scales, dZSCW));
  1062 + } else if (zsbj?.type === "3004" && zsbj?.value) {
  1063 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales));
  1064 + pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
  1065 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.85, -(scaledHeight + scaledHeight / 2), scales));
  1066 + pathList.push(createText(scaledWidth * 0.85 + 10 * scales, -(scaledHeight + scaledHeight / 2), 10 * scales, "W"));
  1067 + pathList.push(createText(scaledWidth * 0.3, -(scaledHeight * 2) - dZSCW / 2 + 4, 10 * scales, dZSCW));
  1068 + } else if (zsbj?.type === "3005" && zsbj?.value) {
  1069 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.1, -scaledHeight / 2, scales));
  1070 + pathList.push(createText(scaledWidth * 0.1 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
  1071 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.8, -(scaledHeight + scaledHeight / 2), scales));
  1072 + pathList.push(createText(scaledWidth * 0.8 + 10 * scales, -(scaledHeight + scaledHeight / 2), 10 * scales, "W"));
  1073 + pathList.push(createText(scaledWidth * 0.8 + 10 * scales, -(scaledHeight + scaledHeight / 2), 10 * scales, "W"));
  1074 + } else if (zsbj?.type && dZSCW) {
  1075 + pathList.push(createText(scaledWidth / 2, -(dZSCW / 2 - 5), 10 * scales, dZSCW));
  1076 + }
  1077 + // 右下部件
  1078 + pathList.push(createDynamicTopLeft(yxbj?.type, scaledWidth, scaledHeight, dYXCW, 0, scaledDeep));
  1079 + if ((yxbj?.type === "7001" && yxbj?.value) || (yxbj?.type === "7006" && yxbj?.value) || (yxbj?.type === "7007" && yxbj?.value)) {
  1080 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.2, scaledDeep + scaledHeight / 2, scales));
  1081 + pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.2 + 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
  1082 + pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.5, scaledDeep + scaledHeight + dYXCW / 2 - 4, 10 * scales, dYXCW));
  1083 + } else if (yxbj?.type === "7004" && yxbj?.value) {
  1084 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.2, scaledDeep + scaledHeight / 2, scales));
  1085 + pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.2 - 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
  1086 + pathList.push(
  1087 + createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.85, scaledDeep + (scaledHeight + scaledHeight / 2), scales)
  1088 + );
  1089 + pathList.push(
  1090 + createText(scaledWidth + scaledHeight + scaledWidth * 0.85 + 10 * scales, scaledDeep + (scaledHeight + scaledHeight / 2), 10 * scales, "W")
  1091 + );
  1092 + pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.3, scaledDeep + scaledHeight * 2 + dYXCW / 2 - 4, 10 * scales, dYXCW));
  1093 + } else if (yxbj?.type === "7005" && yxbj?.value) {
  1094 + pathList.push(createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.1, scaledDeep + scaledHeight / 2, scales));
  1095 + pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.1 + 10 * scales, scaledDeep + scaledHeight / 2, 10 * scales, "W"));
  1096 + pathList.push(
  1097 + createDoubleArrow(scaledHeight, scaledWidth + scaledHeight + scaledWidth * 0.8, scaledDeep + (scaledHeight + scaledHeight / 2), scales)
  1098 + );
  1099 + pathList.push(
  1100 + createText(scaledWidth + scaledHeight + scaledWidth * 0.8 + 10 * scale, scaledDeep + (scaledHeight + scaledHeight / 2), 10 * scale, "W")
  1101 + );
  1102 + } else if (dYXCW && yxbj?.type) {
  1103 + pathList.push(createText(scaledWidth + scaledHeight + scaledWidth * 0.5, scaledDeep + dYXCW / 2 - 4, 10 * scales, dYXCW));
  1104 + }
  1105 + pathList.forEach(x => {
  1106 + g.appendChild(x);
  1107 + });
  1108 + svg.appendChild(g);
1047 } 1109 }
1048 }; 1110 };
1049 // 计算头部偏移 1111 // 计算头部偏移
@@ -1083,12 +1145,11 @@ const SvgBox = props =&gt; { @@ -1083,12 +1145,11 @@ const SvgBox = props =&gt; {
1083 1145
1084 const max = Math.max(z, y); 1146 const max = Math.max(z, y);
1085 1147
1086 - if (max > ((sfhs?.value || 0))) { 1148 + if (max > (sfhs?.value || 0)) {
1087 top = max; 1149 top = max;
1088 } else { 1150 } else {
1089 top = sfhs?.value; 1151 top = sfhs?.value;
1090 } 1152 }
1091 -  
1092 } else { 1153 } else {
1093 top = max; 1154 top = max;
1094 } 1155 }
@@ -1113,7 +1174,7 @@ const SvgBox = props =&gt; { @@ -1113,7 +1174,7 @@ const SvgBox = props =&gt; {
1113 } 1174 }
1114 top = addValue > sfhs?.value ? addValue : sfhs?.value; 1175 top = addValue > sfhs?.value ? addValue : sfhs?.value;
1115 } else { 1176 } else {
1116 - top = addValue > sfhs?.value ? max : sfhs?.value; 1177 + top = (addValue || 0) > sfhs?.value ? max : sfhs?.value;
1117 } 1178 }
1118 } else if (zscw?.type) { 1179 } else if (zscw?.type) {
1119 const max = dZSCW; 1180 const max = dZSCW;
@@ -1142,7 +1203,6 @@ const SvgBox = props =&gt; { @@ -1142,7 +1203,6 @@ const SvgBox = props =&gt; {
1142 top = sfhs?.value; 1203 top = sfhs?.value;
1143 } 1204 }
1144 1205
1145 -  
1146 // 处理天地盒默认加上高 1206 // 处理天地盒默认加上高
1147 if (Number(svgType) === 4) { 1207 if (Number(svgType) === 4) {
1148 top = top + height; 1208 top = top + height;
@@ -1195,7 +1255,6 @@ const SvgBox = props =&gt; { @@ -1195,7 +1255,6 @@ const SvgBox = props =&gt; {
1195 } else { 1255 } else {
1196 top = max; 1256 top = max;
1197 } 1257 }
1198 -  
1199 } else if (yscw?.type) { 1258 } else if (yscw?.type) {
1200 const max = dYSCW; 1259 const max = dYSCW;
1201 if ( 1260 if (
@@ -1217,7 +1276,7 @@ const SvgBox = props =&gt; { @@ -1217,7 +1276,7 @@ const SvgBox = props =&gt; {
1217 } 1276 }
1218 top = addValue > sfhs?.value ? addValue : sfhs?.value; 1277 top = addValue > sfhs?.value ? addValue : sfhs?.value;
1219 } else { 1278 } else {
1220 - top = addValue > sfhs?.value ? max : sfhs?.value; 1279 + top = addValue?addValue:0 > sfhs?.value ? max : sfhs?.value;
1221 } 1280 }
1222 } else if (zscw?.type) { 1281 } else if (zscw?.type) {
1223 const max = dZSCW; 1282 const max = dZSCW;
@@ -1403,7 +1462,7 @@ const SvgBox = props =&gt; { @@ -1403,7 +1462,7 @@ const SvgBox = props =&gt; {
1403 return data; 1462 return data;
1404 }; 1463 };
1405 // 右边贴位 1464 // 右边贴位
1406 - const createTrapezoidRight = (trapezoidLeftType, height, size, offsetX, offsetY,dSFHS,dXFHS) => { 1465 + const createTrapezoidRight = (trapezoidLeftType, height, size, offsetX, offsetY, dSFHS, dXFHS) => {
1407 if (!size) return createNoneProject(); 1466 if (!size) return createNoneProject();
1408 let data = {}; 1467 let data = {};
1409 switch (trapezoidLeftType) { 1468 switch (trapezoidLeftType) {
@@ -1420,7 +1479,7 @@ const SvgBox = props =&gt; { @@ -1420,7 +1479,7 @@ const SvgBox = props =&gt; {
1420 data = createWelt3Right(height, size, offsetX, offsetY); 1479 data = createWelt3Right(height, size, offsetX, offsetY);
1421 break; 1480 break;
1422 case "9005": 1481 case "9005":
1423 - data = createWelt4Right(height, size, offsetX, offsetY,dSFHS,dXFHS); 1482 + data = createWelt4Right(height, size, offsetX, offsetY, dSFHS, dXFHS);
1424 break; 1483 break;
1425 default: 1484 default:
1426 data = createNoneProject(); 1485 data = createNoneProject();
src/components/QuickQuote/index.jsx
@@ -1469,11 +1469,16 @@ const BoxComponent = props =&gt; { @@ -1469,11 +1469,16 @@ const BoxComponent = props =&gt; {
1469 if (item.sName === "sPaperDirection" && selectedNode.sTypeKey === "huace") { 1469 if (item.sName === "sPaperDirection" && selectedNode.sTypeKey === "huace") {
1470 return false; 1470 return false;
1471 } 1471 }
  1472 +
1472 // 判断bPartsDimension 是否显示展长展宽,0不显示,1显示 1473 // 判断bPartsDimension 是否显示展长展宽,0不显示,1显示
1473 1474
1474 if (selectedNode.bPartsDimension === false && (item.sName === "dPartsLength" || item.sName === "dPartsWidth")) { 1475 if (selectedNode.bPartsDimension === false && (item.sName === "dPartsLength" || item.sName === "dPartsWidth")) {
1475 return false; 1476 return false;
1476 } 1477 }
  1478 +
  1479 + if (!selectedNode.bBleed && item.sName === "dBleed") {
  1480 + return false;
  1481 + }
1477 return item.iTag === iTag; 1482 return item.iTag === iTag;
1478 }); 1483 });
1479 1484
@@ -1533,8 +1538,9 @@ const BoxComponent = props =&gt; { @@ -1533,8 +1538,9 @@ const BoxComponent = props =&gt; {
1533 x.sName === "dPartsWidth" || 1538 x.sName === "dPartsWidth" ||
1534 x.sName === "dRowGap" || 1539 x.sName === "dRowGap" ||
1535 x.sName === "dColGap" || 1540 x.sName === "dColGap" ||
  1541 + x.sName === "dBleed" ||
1536 x.sName === "sPaperDirection", 1542 x.sName === "sPaperDirection",
1537 - default: x => x.sName === "sMagnification" || x.sName === "dPartsLength" || x.sName === "dPartsWidth" || x.sName === "dSumPQty", 1543 + default: x => x.sName === "dBleed" || x.sName === "sMagnification" || x.sName === "dPartsLength" || x.sName === "dPartsWidth" || x.sName === "dSumPQty",
1538 }; 1544 };
1539 if (selectedNode.sProductType === "不干胶") { 1545 if (selectedNode.sProductType === "不干胶") {
1540 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.juantong); 1546 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.juantong);
@@ -1542,6 +1548,7 @@ const BoxComponent = props =&gt; { @@ -1542,6 +1548,7 @@ const BoxComponent = props =&gt; {
1542 if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { 1548 if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) {
1543 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.default); 1549 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.default);
1544 } 1550 }
  1551 +
1545 // 拼板信息表单 1552 // 拼板信息表单
1546 const upViewProps20 = getUpViewPropsByITag(20); 1553 const upViewProps20 = getUpViewPropsByITag(20);
1547 // 如果是卷筒类需要单独处理 1554 // 如果是卷筒类需要单独处理
@@ -1876,10 +1883,10 @@ const BoxComponent = props =&gt; { @@ -1876,10 +1883,10 @@ const BoxComponent = props =&gt; {
1876 }; 1883 };
1877 1884
1878 let boxList = []; 1885 let boxList = [];
1879 - const {sStripType = 0} = selectedNode; 1886 + const { sStripType = 0 } = selectedNode;
1880 if ( 1887 if (
1881 (slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth && masterData.dHeight) || 1888 (slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth && masterData.dHeight) ||
1882 - (Number(sStripType) === 1 && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) 1889 + (Number(sStripType) === 1 && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth)
1883 ) { 1890 ) {
1884 const slaveNewData = JSON.parse(slaveRowData.sColumnNameConfig); 1891 const slaveNewData = JSON.parse(slaveRowData.sColumnNameConfig);
1885 const tables = [ 1892 const tables = [