Commit 89690a3836198eca609935eb9774501f4d434f7a

Authored by 陈鑫涛
1 parent 56fd4d99

盒型

src/components/Common/BoxDesignCompontent/svg.js
... ... @@ -1331,6 +1331,7 @@ const SvgBox = props => {
1331 1331 rectanglesRight.forEach(rect => {
1332 1332 g.appendChild(createPathElement(rect.x, rect.y, rect.width, rect.height));
1333 1333 });
  1334 +
1334 1335 // 处理双盒的插位组件
1335 1336 let pathList = [];
1336 1337 // 获取左上
... ... @@ -1350,6 +1351,25 @@ const SvgBox = props => {
1350 1351 const dYXCW = yxcw?.value;
1351 1352 // 上插位
1352 1353 pathList.push(createDynamicTopLeft(scw?.type, scaleHeadLength, -scaleHeadWidth, -dSCW * scale, 0, 0));
  1354 + if ((scw?.type === "11001" && scw?.value) || (scw?.type === "11006" && scw?.value) || (scw?.type === "11007" && scw?.value)) {
  1355 + pathList.push(createDoubleArrow(scaleHeadWidth, scaleHeadWidth * 0.2, -scaleHeadWidth / 2, scales));
  1356 + pathList.push(createText(scaleHeadWidth * 0.2 + 10 * scales, -scaleHeadWidth / 2, 10 * scales, "dSHK"));
  1357 + pathList.push(createText(scaleHeadLength / 2, -scaleHeadWidth - dSCW / 2 + 4, 10 * scales, dSCW));
  1358 + } else if (scw?.type === "11004" && scw?.value) {
  1359 + pathList.push(createDoubleArrow(scaleHeadWidth, scaleHeadLength * 0.2, -scaleHeadWidth / 2, scales));
  1360 + pathList.push(createText(scaleHeadLength * 0.2 + 10 * scales, -scaleHeadWidth / 2, 10 * scales, "dSHK"));
  1361 + pathList.push(createDoubleArrow(scaleHeadWidth, scaleHeadLength * 0.85, -(scaleHeadWidth + scaleHeadWidth / 2), scales));
  1362 + pathList.push(createText(scaleHeadLength * 0.5 + 10 * scales, -(scaleHeadWidth + scaleHeadWidth / 2), 10 * scales, "dSHK"));
  1363 + pathList.push(createText(scaleHeadLength * 0.3, -(scaleHeadWidth * 2), 10 * scales, dSCW));
  1364 + } else if (scw?.type === "11005" && scw?.value) {
  1365 + pathList.push(createDoubleArrow(scaleHeadWidth, scaleHeadLength * 0.1, -scaleHeadWidth / 2, scales));
  1366 + pathList.push(createText(scaleHeadLength * 0.1 + 10 * scales, -scaleHeadWidth / 2, 10 * scales, "dSHK"));
  1367 + pathList.push(createDoubleArrow(scaleHeadWidth, scaleHeadLength * 0.8, -(scaleHeadWidth + scaleHeadWidth / 2), scales));
  1368 + pathList.push(createText(scaleHeadLength * 0.8 + 10 * scales, -(scaleHeadWidth + scaleHeadWidth / 2), 10 * scales, "dSHK"));
  1369 + pathList.push(createText(scaleHeadLength * 0.8 + 10 * scales, -(scaleHeadWidth + scaleHeadWidth / 2), 10 * scales, "dSHK"));
  1370 + } else if (scw?.type && dSCW) {
  1371 + pathList.push(createText(scaleHeadLength / 2, -(dSCW / 2 - 5), 10 * scales, dSCW));
  1372 + }
1353 1373 // 左上插位
1354 1374 pathList.push(createFull(zscw?.type, scaleHeadWidth, -scaleHeadWidth, -dZSCW * scale, 0, 0));
1355 1375 // 左插位
... ... @@ -1398,10 +1418,23 @@ const SvgBox = props => {
1398 1418 scaleHeadWidth + scaleOrderWidth
1399 1419 )
1400 1420 );
  1421 + if (scaleHeadLength && scaleHeadWidth) {
  1422 + pathList.push(createDoubleArrow(scaleHeadWidth, scaleHeadLength * 0.8, scaleHeadWidth / 2, scales));
  1423 + pathList.push(createText(scaleHeadLength * 0.8 - 10 * scales, scaleHeadWidth / 2, 10 * scales, "dSHK"));
  1424 + pathList.push(createHorizontalDoubleArrow(scaleHeadLength, scaleHeadLength / 2, scaleHeadWidth * 0.7, scales));
  1425 + pathList.push(createText(scaleHeadWidth / 2, scaleHeadLength * 0.3 + 10 * scales, 10 * scales, "dSHC"));
  1426 + }
  1427 + if (scaleOrderLength && scaleOrderWidth) {
  1428 + pathList.push(createDoubleArrow(scaleOrderWidth, scaleOrderLength * 0.6, scaleHeadWidth + scaleOrderWidth / 2, scales));
  1429 + pathList.push(createText(scaleOrderLength * 0.8 - 10 * scales, scaleHeadWidth + scaleOrderWidth / 2, 10 * scales, "dCHK"));
  1430 + pathList.push(createHorizontalDoubleArrow(scaleOrderLength, scaleOrderLength / 2 - (leftOffect ), scaleHeadWidth + scaleOrderWidth * 0.7, scales));
  1431 + pathList.push(createText(scaleOrderWidth / 2 - (leftOffect ), scaleHeadWidth + scaleOrderLength * 0.8 * scales, 10 * scales, "dCHC"));
  1432 + }
1401 1433  
1402 1434 pathList.forEach(x => {
1403 1435 g.appendChild(x);
1404 1436 });
  1437 +
1405 1438 svg.appendChild(g);
1406 1439 }
1407 1440 };
... ...