diff --git a/src/components/Common/BoxDesignCompontent/index.less b/src/components/Common/BoxDesignCompontent/index.less
index c767155..d9b60be 100644
--- a/src/components/Common/BoxDesignCompontent/index.less
+++ b/src/components/Common/BoxDesignCompontent/index.less
@@ -21,7 +21,7 @@
}
.boxLeft {
width: 180px;
- height: 320px;
+ min-height: 320px;
display: flex;
flex-wrap: wrap;
flex-direction: column;
@@ -33,7 +33,7 @@
}
.boxRight {
width: 180px;
- height: 320px;
+ min-height: 320px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
@@ -43,23 +43,23 @@
top: 130px;
text-align: center;
}
- .boxBottom{
+ .boxBottom {
width: 500px;
height: 380px;
position: absolute;
top: 130px;
left: 50%;
transform: translateX(-50%);
- .svgBox{
+ .svgBox {
width: 100%;
- height: 250px;
- background-color: #9AFF9A;
+ min-height: 250px;
+ background-color: #9aff9a;
}
- .content{
+ .content {
width: 100%;
height: 130px;
- :global{
- .ant-select-selector{
+ :global {
+ .ant-select-selector {
// width: 380px !important; /* 选择框宽度 */
color: #333;
}
@@ -68,11 +68,10 @@
padding-left: 50px;
line-height: 40px;
}
-
}
}
}
- .boxTitle{
+ .boxTitle {
background-color: #3399ff;
color: #fff;
width: 180px;
@@ -80,37 +79,45 @@
line-height: 20px;
text-align: center;
}
- :global{
- .mySelects .ant-select-selector {
- background-color: #99CCFF !important; /* 选择框背景色 */
+ :global {
+ .mySelects .ant-select-selector,
+ .mySelectsDouble .ant-select-selector {
+ background-color: #99ccff !important; /* 选择框背景色 */
height: 40px !important; /* 选择框高度 */
}
.mySelects .ant-select-selection-item {
color: transparent !important; /* 选择框文字颜色 */
}
-
+ .mySelectsDouble .ant-select-selection-item {
+ color: #333 !important; /* 选择框文字颜色 */
+ line-height: 40px !important;
+
+ }
}
.mySelects {
position: relative;
}
- .boxInput{
+ .boxInput {
display: flex;
align-items: center;
justify-content: space-between;
width: 180px;
- height: 40px;
+ // height: 40px;
+ min-height: 40px;
position: relative;
:global {
.ant-input {
- background-color: #99CCFF !important; /* 输入框背景色 */
+ background-color: #99ccff !important; /* 输入框背景色 */
border: 1px solid #d9d9d9;
height: 40px;
}
-
+ .ant-input::placeholder {
+ color: #fff !important; // 修改为你想要的颜色
+ }
}
}
- .text{
- background-color: #99CCFF;
+ .text {
+ background-color: #99ccff;
width: 100%;
height: 40px;
line-height: 40px;
@@ -119,19 +126,18 @@
margin-right: 1px;
}
.content {
- :global{
+ :global {
.ant-input {
- background-color: #EEEEEE !important; /* 输入框背景色 */
+ background-color: #eeeeee !important; /* 输入框背景色 */
height: 40px;
}
.ant-select-selector {
- background-color: #EEEEEE !important; /* 选择框背景色 */
+ background-color: #eeeeee !important; /* 选择框背景色 */
height: 40px !important; /* 选择框高度 */
}
-
}
- .text{
- background-color: #EEEEEE ;
+ .text {
+ background-color: #eeeeee;
margin: 0;
}
.boxFlex {
@@ -141,33 +147,33 @@
flex-direction: column;
width: 500px;
}
- .boxFlexs{
+ .boxFlexs {
display: flex;
align-items: center;
width: 500px;
justify-content: space-between;
- .boxInputs{
+ .boxInputs {
display: flex;
align-items: center;
flex: 1;
- :global{
+ :global {
.ant-input {
- background-color: #EEEEEE !important; /* 输入框背景色 */
+ background-color: #eeeeee !important; /* 输入框背景色 */
height: 40px;
}
}
}
}
- .boxInput{
+ .boxInput {
width: 100%;
position: relative;
- .defaultValue{
+ .defaultValue {
position: absolute;
left: 32%;
top: 3px;
width: 60px;
height: 30px;
- background-color: #EEE;
+ background-color: #eee;
color: #333;
line-height: 40px;
z-index: 2;
diff --git a/src/components/Common/BoxDesignCompontent/svg.js b/src/components/Common/BoxDesignCompontent/svg.js
index 3608b31..1710813 100644
--- a/src/components/Common/BoxDesignCompontent/svg.js
+++ b/src/components/Common/BoxDesignCompontent/svg.js
@@ -606,30 +606,44 @@ const SvgBox = props => {
pathList.push(createText(scaledWidth * 2 + scaledHeight * 2 + dYTBW * 0.4, scaledDeep / 2, 10 * scales, dYTBW));
}
// 左上部件
- pathList.push(createDynamicTopLeft(zsbj?.type, scaledWidth, -scaledHeight, -dZSCW * scale, 0, 0));
- if ((zsbj?.type === "3001" && zsbj?.value) || (zsbj?.type === "3006" && zsbj?.value) || (zsbj?.type === "3007" && zsbj?.value)) {
- pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales));
- pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
- // 插位值
- pathList.push(createText(scaledWidth / 2, -scaledHeight - dZSCW / 2 + 4, 10 * scales, dZSCW));
- } else if (zsbj?.type === "3002" && dZSCW) {
- pathList.push(createText(scaledWidth / 2, -dZSCW / 2 + 4, 10 * scales, dZSCW));
- } else if (zsbj?.type === "3003" && dZSCW) {
- pathList.push(createText(scaledWidth / 2, -dZSCW / 2 + 4, 10 * scales, dZSCW));
- } else if (zsbj?.type === "3004" && zsbj?.value) {
- pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales));
- pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
- pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.85, -(scaledHeight + scaledHeight / 2), scales));
- pathList.push(createText(scaledWidth * 0.85 + 10 * scales, -(scaledHeight + scaledHeight / 2), 10 * scales, "W"));
- pathList.push(createText(scaledWidth * 0.3, -(scaledHeight * 2) - dZSCW / 2 + 4, 10 * scales, dZSCW));
- } else if (zsbj?.type === "3005" && zsbj?.value) {
- pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.1, -scaledHeight / 2, scales));
- pathList.push(createText(scaledWidth * 0.1 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
- pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.8, -(scaledHeight + scaledHeight / 2), scales));
- pathList.push(createText(scaledWidth * 0.8 + 10 * scales, -(scaledHeight + scaledHeight / 2), 10 * scales, "W"));
- } else if (zsbj?.type && dZSCW) {
- pathList.push(createText(scaledWidth / 2, -dZSCW / 2 + 4, 10 * scales, dZSCW));
+ if (zsbj?.type && zsbj?.type === "3009") {
+ console.log(zsbj, boxList, "zsbj");
+ // 先放层1的盒型
+ const { sType, sLength, sWidth, sOffset, sQuantity, cType, cLength, cWidth, cOffset, cQuantity } = zsbj;
+ if (Number(sType) === 0) {
+ const rectangles = [{ x: -sLength * scale, y: ((scaledDeep - (Number(sWidth) * scale)) / 2) + Number(sOffset), width: sLength * scale, height: sWidth * scale }];
+ rectangles.forEach(rect => {
+ g.appendChild(createPathElements(rect.x, rect.y, rect.width, rect.height));
+ });
+ svg.appendChild(g);
+ }
+ } else {
+ pathList.push(createDynamicTopLeft(zsbj?.type, scaledWidth, -scaledHeight, -dZSCW * scale, 0, 0));
+ if ((zsbj?.type === "3001" && zsbj?.value) || (zsbj?.type === "3006" && zsbj?.value) || (zsbj?.type === "3007" && zsbj?.value)) {
+ pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales));
+ pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
+ // 插位值
+ pathList.push(createText(scaledWidth / 2, -scaledHeight - dZSCW / 2 + 4, 10 * scales, dZSCW));
+ } else if (zsbj?.type === "3002" && dZSCW) {
+ pathList.push(createText(scaledWidth / 2, -dZSCW / 2 + 4, 10 * scales, dZSCW));
+ } else if (zsbj?.type === "3003" && dZSCW) {
+ pathList.push(createText(scaledWidth / 2, -dZSCW / 2 + 4, 10 * scales, dZSCW));
+ } else if (zsbj?.type === "3004" && zsbj?.value) {
+ pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales));
+ pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
+ pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.85, -(scaledHeight + scaledHeight / 2), scales));
+ pathList.push(createText(scaledWidth * 0.85 + 10 * scales, -(scaledHeight + scaledHeight / 2), 10 * scales, "W"));
+ pathList.push(createText(scaledWidth * 0.3, -(scaledHeight * 2) - dZSCW / 2 + 4, 10 * scales, dZSCW));
+ } else if (zsbj?.type === "3005" && zsbj?.value) {
+ pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.1, -scaledHeight / 2, scales));
+ pathList.push(createText(scaledWidth * 0.1 + 10 * scales, -scaledHeight / 2, 10 * scales, "W"));
+ pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.8, -(scaledHeight + scaledHeight / 2), scales));
+ pathList.push(createText(scaledWidth * 0.8 + 10 * scales, -(scaledHeight + scaledHeight / 2), 10 * scales, "W"));
+ } else if (zsbj?.type && dZSCW) {
+ pathList.push(createText(scaledWidth / 2, -dZSCW / 2 + 4, 10 * scales, dZSCW));
+ }
}
+
// 右上部件
pathList.push(createDynamicTopLeft(ysbj?.type, scaledWidth, -scaledHeight, -dYSCW * scale, scaledWidth + scaledHeight, 0));
if ((ysbj?.type === "6001" && ysbj?.value) || (ysbj?.type === "6006" && ysbj?.value) || (ysbj?.type === "6007" && ysbj?.value)) {
@@ -1425,10 +1439,12 @@ const SvgBox = props => {
pathList.push(createText(scaleHeadWidth / 2, scaleHeadLength * 0.3 + 10 * scales, 10 * scales, "dSHC"));
}
if (scaleOrderLength && scaleOrderWidth) {
- pathList.push(createDoubleArrow(scaleOrderWidth, scaleOrderLength * 0.6 - (leftOffect ), scaleHeadWidth + scaleOrderWidth / 2, scales));
- pathList.push(createText(scaleOrderLength * 0.8 - 10 * scales - (leftOffect ), scaleHeadWidth + scaleOrderWidth / 2, 10 * scales, "dCHK"));
- pathList.push(createHorizontalDoubleArrow(scaleOrderLength, scaleOrderLength / 2 - (leftOffect ), scaleHeadWidth + scaleOrderWidth * 0.7, scales));
- pathList.push(createText(scaleOrderWidth / 2 - (leftOffect ), scaleHeadWidth + scaleOrderLength * 0.8 * scales, 10 * scales, "dCHC"));
+ pathList.push(createDoubleArrow(scaleOrderWidth, scaleOrderLength * 0.6 - leftOffect, scaleHeadWidth + scaleOrderWidth / 2, scales));
+ pathList.push(createText(scaleOrderLength * 0.8 - 10 * scales - leftOffect, scaleHeadWidth + scaleOrderWidth / 2, 10 * scales, "dCHK"));
+ pathList.push(
+ createHorizontalDoubleArrow(scaleOrderLength, scaleOrderLength / 2 - leftOffect, scaleHeadWidth + scaleOrderWidth * 0.7, scales)
+ );
+ pathList.push(createText(scaleOrderWidth / 2 - leftOffect, scaleHeadWidth + scaleOrderLength * 0.8 * scales, 10 * scales, "dCHC"));
}
pathList.forEach(x => {