Commit 7b2453fdc97547702076f2f8ee3d76f4fc622adb
1 parent
3fbadced
盒型
Showing
5 changed files
with
6 additions
and
7 deletions
src/components/Common/BoxDesignCompontent/svg.js
| ... | ... | @@ -46,6 +46,7 @@ import { |
| 46 | 46 | createBoxComponentNewFul5, |
| 47 | 47 | } from "../BoxDesign/createAirplaneBox"; |
| 48 | 48 | const SvgBox = props => { |
| 49 | + console.log("🚀 ~ props:", props) | |
| 49 | 50 | const svgContainerRef = useRef(null); |
| 50 | 51 | const svgRef = useRef(null); |
| 51 | 52 | const [boxKey, setBoxKey] = useState(new Date().getTime()); |
| ... | ... | @@ -69,7 +70,7 @@ const SvgBox = props => { |
| 69 | 70 | |
| 70 | 71 | // 初始化svg |
| 71 | 72 | const initSVG = () => { |
| 72 | - setBoxKey(new Date().getTime()); | |
| 73 | + // setBoxKey(new Date().getTime()); | |
| 73 | 74 | const svg = svgRef.current; |
| 74 | 75 | const g = document.createElementNS("http://www.w3.org/2000/svg", "g"); // 创建 <g> |
| 75 | 76 | ... | ... |
src/components/Common/BoxShowImgMaterial/index.js
| ... | ... | @@ -168,7 +168,7 @@ const BoxShowImgMaterial = props => { |
| 168 | 168 | // 计算材料利用率 |
| 169 | 169 | const availability = ((((horizontalBoxes * verticalBoxes) * (Number(dMachineLength) * Number(dMachineWidth)) / (Number(dWlcd) * Number(dWlkd)))) * 100).toFixed(2); |
| 170 | 170 | useEffect(() => { |
| 171 | - setBoxKey(new Date().getTime()); | |
| 171 | + // setBoxKey(new Date().getTime()); | |
| 172 | 172 | setTimeout(() => { |
| 173 | 173 | if (boxRef.current && textRef.current && textRefs.current && nTextRef.current && nTextRefs.current) { |
| 174 | 174 | // 计算父元素的缩放因子 | ... | ... |
src/components/Common/CommonViewTable/index.js
| ... | ... | @@ -90,7 +90,7 @@ export default class CommonViewTable extends Component { |
| 90 | 90 | if (tableConfigType) { |
| 91 | 91 | masterShowConfig = commonUtils.isNotEmptyObject(tableConfig) ? tableConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName !== '' && item.sControlName.split('_')[1] === tableConfigType) : []; |
| 92 | 92 | } else { |
| 93 | - masterShowConfig = commonUtils.isNotEmptyObject(tableConfig) ? tableConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName !== '' && item.sControlName.indexOf('_') === -1) : []; | |
| 93 | + masterShowConfig = commonUtils.isNotEmptyObject(tableConfig) ? tableConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName !== '' && (item.sControlName?.indexOf('_') === -1)) : []; | |
| 94 | 94 | } |
| 95 | 95 | const formItemLayout = { labelCol: { span: 7, style: { color: 'rgba(0, 0, 0, 0.65)', backgroundColor: '#BFEFFF' } }, wrapperCol: { span: 17 } }; |
| 96 | 96 | ... | ... |
src/components/Common/Typesetting/typesetting.js
| ... | ... | @@ -416,7 +416,6 @@ const Typesetting = props => { |
| 416 | 416 | useEffect( |
| 417 | 417 | () => { |
| 418 | 418 | // 计算缩放比例 |
| 419 | - setBoxKey(new Date().getTime()); | |
| 420 | 419 | setTimeout(() => { |
| 421 | 420 | const scaleX = (clientWidth - 50) / (outerWidth + 110); |
| 422 | 421 | const scaleY = (clientHeight - 5) / (outerHeight + 90); |
| ... | ... | @@ -561,7 +560,7 @@ const Typesetting = props => { |
| 561 | 560 | |
| 562 | 561 | const onClick = () => { |
| 563 | 562 | setIsModalOpen(true); |
| 564 | - setBoxKeys(new Date().getTime()); | |
| 563 | + // setBoxKeys(new Date().getTime()); | |
| 565 | 564 | setTimeout(() => { |
| 566 | 565 | const scaleX = 1200 / outerWidth; |
| 567 | 566 | const scaleY = 500 / outerHeight; | ... | ... |
src/components/Common/commonFunc.js
| ... | ... | @@ -41,7 +41,6 @@ export function getConfig(type, name, config, gdsformconst, gdsjurisdiction, sDe |
| 41 | 41 | } */ |
| 42 | 42 | return returnConfig; |
| 43 | 43 | } |
| 44 | - | |
| 45 | 44 | export function getControlConfig() { |
| 46 | 45 | return '' |
| 47 | 46 | } |
| ... | ... | @@ -180,7 +179,7 @@ export function getDefaultData(config, allTableData = {}, extraData = {}) { |
| 180 | 179 | if (commonUtils.isNotEmptyObject(config) && commonUtils.isNotEmptyObject(config.gdsconfigformslave)) { |
| 181 | 180 | config.gdsconfigformslave.forEach((childConfig) => { |
| 182 | 181 | const { sDefault, sName } = childConfig; |
| 183 | - if (sDefault !== '' && sName && sDefault !== undefined && sDefault.indexOf(':') > -1 && sDefault.indexOf('.') > -1) { | |
| 182 | + if (typeof sDefault === 'string' && sDefault !== '' && sName && sDefault !== undefined && sDefault.indexOf(':') > -1 && sDefault.indexOf('.') > -1) { | |
| 184 | 183 | const oldFieldName = sDefault.split(':')[1]; |
| 185 | 184 | const tableName = oldFieldName.split('.')[0]; |
| 186 | 185 | if (sDefault && sDefault.includes('Fx')) { /* 默认值支持自定义函数 */ | ... | ... |