diff --git a/src/components/Common/Typesetting/typesetting.js b/src/components/Common/Typesetting/typesetting.js
index 03761e7..7820d1a 100644
--- a/src/components/Common/Typesetting/typesetting.js
+++ b/src/components/Common/Typesetting/typesetting.js
@@ -20,8 +20,10 @@ const Typesetting = props => {
boxWidth,
boxHeight,
textSize,
+ isMobile,
} = props;
- if (!slaveRowData) return
+ console.log("🚀 ~ Typesetting:", props);
+ if (!slaveRowData) return;
const {
dSBLB, // 上边留白
dXBLB, // 下边留白
@@ -52,6 +54,8 @@ const Typesetting = props => {
const [dMaterialsKQty, setDMaterialsKQty] = useState(0);
const [dPartsLength, setDPartsLength] = useState(0);
+ // 横板
+ const { dHorizontal, dPortrait, dHorizontalType, dPortraitType } = slaveRowData;
// 使用 useRef 获取 DOM 元素
const boxRef = useRef(null);
const boxsRef = useRef(null);
@@ -67,8 +71,10 @@ const Typesetting = props => {
const slaveDataDetail = slaveData?.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel);
const maxWidth = Number(slaveDataDetail?.dMaxLength);
const maxHeight = Number(slaveDataDetail?.dMaxWidth);
+
const outerWidth = Number(slaveDataDetail?.dMaxLength); // 默认取最大上机尺寸
const outerHeight = Number(slaveDataDetail?.dMaxWidth); // 默认取最大上机尺寸
+ console.log("🚀 ~ maxWidth:", dHorizontal, dPortrait,dHorizontalType,dPortraitType, outerWidth, outerHeight);
// 确认是竖向排列还是横向排列
const L = masterData?.dLength;
@@ -215,7 +221,6 @@ const Typesetting = props => {
// 每个盒子加上边距 和第二组偏移量 如果根据次盒再加上次盒偏移量
let cols = Math.floor(outerWidth / (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)));
let rows = Math.floor(outerHeight / (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset)));
-
let colsMaxLength = (cols - 1) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)) + innerWidthCombined;
while (colsMaxLength >= outerWidth && cols > 0) {
cols = cols - 1;
@@ -240,6 +245,28 @@ const Typesetting = props => {
const commonHeightCheck = remainingHeight > jInnerHeight;
const commonWidthCheck = remainingWidth > jInnerWidth;
const remaining = isVertical ? commonHeightCheck : commonWidthCheck;
+ console.log(
+ cols,
+ rows,
+ innerWidth,
+ innerHeight,
+ jInnerWidth,
+ jInnerHeight,
+ innerWidthCombined,
+ innerHeightCombined,
+ remainingWidth,
+ remainingHeight,
+ colsMaxLength,
+ rowsMaxLength,
+ remaining,
+ isVertical,
+ boxLengthOffset,
+ boxWidthOffset,
+ dSLengthOffset,
+ dFLengthOffset,
+ "rowsMaxLength"
+ );
+
// 抵扣盒默认展示 svg
// const isSvg = props.slaveRowData.sName === "扣抵盒";
// 组装svg数据
@@ -265,16 +292,16 @@ const Typesetting = props => {
position: "absolute",
left: `${leftPosition}px`,
top: `${topPosition}px`,
- transform: `rotateZ(${offsetZ}deg)`,
+
zIndex: 10,
}}
onDoubleClick={() => {
onClick();
}}
>
- {/* */}
-
} */}
+