/* eslint-disable */ import React, { useRef, useState, useEffect } from "react"; import styles from "../index.less"; import SvgBox from "../svg"; import { Select, Button, message, Input, Spin } from "antd-v4"; import { CompressOutlined, ExpandOutlined } from "@ant-design/icons"; import * as commonUtils from "@/utils/utils"; import * as commonFunc from "@/components/Common/commonFunc"; import * as commonBusiness from "@/components/Common/commonBusiness"; import * as commonServices from "@/services/services"; import CommonBase from "@/components/Common/CommonBase"; import AntdDraggableModal from "@/components/Common/AntdDraggableModal"; import CommonViewTable from "@/components/Common/CommonViewTable"; import StaticEditTable from "@/components/Common/CommonTable"; import jsPreviewPdf from "@js-preview/pdf"; import commonConfig from "@/utils/config"; const DoubleLayerBox = props => { console.log("🚀 ~ DoubleLayerBox:", props); const [boxList, setBoxList] = useState([]); const [tableColum, setTableColum] = useState([]); // 盒身类型 const [tableDataList, setTableDataList] = useState([]); // 盒长 const [boxBodyList, setBoxBodyList] = useState([]); // 盒身信息 const [isDefaultValue, setIsDefaultValue] = useState(true); // 是否默认值 const [topBoxList, setTopBoxList] = useState([]); // 盒身信息 const [leftBoxList, setLeftBoxList] = useState([]); // 左边 const [rightBoxList, setRightBoxList] = useState([]); const [loading, setLoading] = useState(false); const { renderOptionWithImage } = props; let boxData = { value: "", sName: "", isEditable: true, isSelect: false, selectValue: null, selectLabel: "", selectImage: null, type: null, show: true, showName: "", // 参数名称 sAssignFormula: null, code: "", }; const options = props.options; const top = [ { name: "左贴边位", value: "dZTBW" }, { name: "上插位组件", value: "dZSCW" }, { name: "右贴边位", value: "dYTBW" }, ]; setTopBoxList( top.map(item => { boxData.sName = item.name; boxData.showName = item.name; boxData.code = item.value; return boxData; }) ); const svgBoxProps = { ...props, boxList: [], showNew: 0, }; return (