Commit 826c283ab2baa28c531a5c104859335b50d6406d
1 parent
a1a27ca1
快速报价app
Showing
10 changed files
with
291245 additions
and
128 deletions
Too many changes to show.
To preserve performance only 2 of 10 files are displayed.
src/components/Common/BoxDesignCompontent/svg.js
| ... | ... | @@ -234,6 +234,7 @@ const SvgBox = props => { |
| 234 | 234 | svgContainerRef.current.style.height = `${dSvgBoxHeight ? dSvgBoxHeight : 250}px`; |
| 235 | 235 | } |
| 236 | 236 | } else if (props.showNew === 1) { |
| 237 | + console.log("🚀 ~ initSVG ~ props:", props) | |
| 237 | 238 | let ySvg = topOffect(boxList, boxLength, boxWidth, boxHeight) * scale; |
| 238 | 239 | let leftSize = 0; |
| 239 | 240 | let topSize = 0; |
| ... | ... | @@ -276,6 +277,7 @@ const SvgBox = props => { |
| 276 | 277 | svgContainerRef.current.style.transform = `scale(${scaleX >= 1 ? 1 : scaleX}, ${scaleY >= 1 ? 1 : scaleY})`; |
| 277 | 278 | svgContainerRef.current.style.transformOrigin = "top left"; |
| 278 | 279 | svgContainerRef.current.style.paddingTop = dSvgBoxWidth ? "0" : "25px"; |
| 280 | + svgContainerRef.current.style.backgroundColor = props.isMobile ? '#EDF4FF' : '' | |
| 279 | 281 | } else if (props.showNew === 2) { |
| 280 | 282 | // g.setAttribute("transform", `rotate(${iFAngle, dSvgBoxWidth/2,dSvgBoxHeight*2})`); |
| 281 | 283 | let ySvg = topOffect(boxList, boxLength, boxWidth, boxHeight) * scale; | ... | ... |
src/components/Common/Typesetting/typesetting.js
| ... | ... | @@ -12,13 +12,14 @@ const Typesetting = props => { |
| 12 | 12 | const { |
| 13 | 13 | radioValue, // |
| 14 | 14 | app, |
| 15 | - boxPicData, | |
| 16 | 15 | onSaveStates, |
| 17 | 16 | boxModel, |
| 18 | 17 | slaveRowData, |
| 19 | 18 | state, |
| 20 | 19 | onSaveDPartsLength, |
| 21 | 20 | } = props; |
| 21 | + console.log("🚀 ~ typesettingsss:", props) | |
| 22 | + if (!slaveRowData) return | |
| 22 | 23 | const { |
| 23 | 24 | dSBLB, // 上边留白 |
| 24 | 25 | dXBLB, // 下边留白 |
| ... | ... | @@ -33,7 +34,6 @@ const Typesetting = props => { |
| 33 | 34 | sPackDetailPath, |
| 34 | 35 | sColumnNameConfig, |
| 35 | 36 | } = slaveRowData; |
| 36 | - | |
| 37 | 37 | const { masterData, selectedNode, slaveData } = state; |
| 38 | 38 | // 生成盒子图片 |
| 39 | 39 | const [boxKey, setBoxKey] = useState(new Date().getTime()); |
| ... | ... | @@ -213,25 +213,13 @@ const Typesetting = props => { |
| 213 | 213 | // 每个盒子加上边距 和第二组偏移量 如果根据次盒再加上次盒偏移量 |
| 214 | 214 | let cols = Math.floor(outerWidth / (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset))); |
| 215 | 215 | let rows = Math.floor(outerHeight / (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset))); |
| 216 | - // 判断最后得到的长宽是否大于排版尺寸 | |
| 217 | - // let colsMaxLength = | |
| 218 | - // cols * (innerWidthCombined + dYBJJ + dYBJJ + boxLengthOffset + (reference ? 0 : dSLengthOffset)) - | |
| 219 | - // dYBJJ - | |
| 220 | - // dYBJJ - | |
| 221 | - // boxLengthOffset - | |
| 222 | - // (reference ? 0 : dSLengthOffset); | |
| 216 | + | |
| 223 | 217 | let colsMaxLength = (cols - 1) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)) + innerWidthCombined; |
| 224 | 218 | while (colsMaxLength >= outerWidth && cols > 0) { |
| 225 | 219 | cols = cols - 1; |
| 226 | 220 | colsMaxLength = (cols - 1) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)) + innerWidthCombined; |
| 227 | 221 | } |
| 228 | 222 | |
| 229 | - // let rowsMaxLength = | |
| 230 | - // rows * (innerHeightCombined + dXBJJ + dXBJJ + boxWidthOffset + (reference ? 0 : dSWidthOffset)) - | |
| 231 | - // dXBJJ - | |
| 232 | - // dXBJJ - | |
| 233 | - // boxWidthOffset - | |
| 234 | - // (reference ? 0 : dSWidthOffset); | |
| 235 | 223 | let rowsMaxLength = (rows - 1) * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset)) + innerHeightCombined; |
| 236 | 224 | while (rowsMaxLength >= outerHeight && rows > 0) { |
| 237 | 225 | rows = rows - 1; |
| ... | ... | @@ -561,7 +549,8 @@ const Typesetting = props => { |
| 561 | 549 | } |
| 562 | 550 | const isMax = slaveDataDetail?.dMaxLength && Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength); |
| 563 | 551 | const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length; |
| 564 | - | |
| 552 | + console.log(innerDivs,'innerDivs'); | |
| 553 | + | |
| 565 | 554 | const onClick = () => { |
| 566 | 555 | setIsModalOpen(true); |
| 567 | 556 | // setBoxKeys(new Date().getTime()); | ... | ... |