Commit 18c4db4ebea1b8980611fe298b52e2426e1654d6

Authored by 陈鑫涛
1 parent 88753631

拼版图弹窗大小修改

src/components/Common/Typesetting/typesetting.js
@@ -52,8 +52,8 @@ const Typesetting = props => { @@ -52,8 +52,8 @@ const Typesetting = props => {
52 const [boxKey, setBoxKey] = useState(new Date().getTime()); 52 const [boxKey, setBoxKey] = useState(new Date().getTime());
53 const [boxKeys, setBoxKeys] = useState(new Date().getTime()); 53 const [boxKeys, setBoxKeys] = useState(new Date().getTime());
54 const [isModalOpen, setIsModalOpen] = useState(false); 54 const [isModalOpen, setIsModalOpen] = useState(false);
55 - const [modalWidth, setModalWidth] = useState(700);  
56 - const [modalHeight, setModalHeight] = useState(500); 55 + const [modalWidth, setModalWidth] = useState(1000);
  56 + const [modalHeight, setModalHeight] = useState(800);
57 const [modalBoxWidth, setModalBoxWidth] = useState(1200); 57 const [modalBoxWidth, setModalBoxWidth] = useState(1200);
58 const [scale, setScale] = useState(1); 58 const [scale, setScale] = useState(1);
59 const [materialLength, setMaterialLength] = useState(0); 59 const [materialLength, setMaterialLength] = useState(0);
@@ -712,9 +712,9 @@ const Typesetting = props => { @@ -712,9 +712,9 @@ const Typesetting = props => {
712 setIsModalOpen(true); 712 setIsModalOpen(true);
713 // setBoxKeys(new Date().getTime()); 713 // setBoxKeys(new Date().getTime());
714 setTimeout(() => { 714 setTimeout(() => {
715 - const scaleX = 1200 / outerWidth;  
716 - const scaleY = 500 / outerHeight;  
717 - const scales = Math.min(scaleX, scaleY) - 0.2; 715 + const scaleX = 900 / outerWidth;
  716 + const scaleY = 600 / outerHeight;
  717 + const scales = Math.min(scaleX, scaleY);
718 if (boxsRef.current) { 718 if (boxsRef.current) {
719 boxsRef.current.style.transform = `scale(${scales}) translateX(-50%)`; 719 boxsRef.current.style.transform = `scale(${scales}) translateX(-50%)`;
720 boxsRef.current.style.transformOrigin = "top left"; 720 boxsRef.current.style.transformOrigin = "top left";
@@ -1084,10 +1084,11 @@ const Typesetting = props => { @@ -1084,10 +1084,11 @@ const Typesetting = props => {
1084 footer={null} 1084 footer={null}
1085 bodyStyle={{ 1085 bodyStyle={{
1086 overflowY: "hide", 1086 overflowY: "hide",
1087 - minHeight: "500px", 1087 + minHeight: `${700}px`,
1088 width: `${modalWidth}`, 1088 width: `${modalWidth}`,
1089 padding: "1px", 1089 padding: "1px",
1090 }} 1090 }}
  1091 + style={{top: 0}}
1091 onCancel={handleCancel} 1092 onCancel={handleCancel}
1092 > 1093 >
1093 <div 1094 <div
src/components/QuickQuote/index.jsx
@@ -2258,10 +2258,15 @@ const BoxComponent = props =&gt; { @@ -2258,10 +2258,15 @@ const BoxComponent = props =&gt; {
2258 2258
2259 const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片"); 2259 const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片");
2260 2260
2261 - const imagesData = [ 2261 + let imagesData = [
2262 { src: slaveRowData.sPackDetailPathUpLoad, alt: "展开图" }, 2262 { src: slaveRowData.sPackDetailPathUpLoad, alt: "展开图" },
2263 { src: slaveRowData.sPackPath, alt: "立体图" }, 2263 { src: slaveRowData.sPackPath, alt: "立体图" },
2264 ]; 2264 ];
  2265 + if (!slaveRowData.sPackDetailPathUpLoad) {
  2266 + imagesData = [{ src: slaveRowData.sPackPath, alt: "立体图" }]
  2267 + } else if (!slaveRowData.sPackPath) {
  2268 + imagesData = [{ src: slaveRowData.sPackPath, alt: "立体图" }]
  2269 + }
2265 const { activeKey = 0 } = state; 2270 const { activeKey = 0 } = state;
2266 useEffect(() => { 2271 useEffect(() => {
2267 props.setState(pre => { 2272 props.setState(pre => {