zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-flow/src/pages/map/drawer/shelf/view.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
@@ -17,11 +17,10 @@ const { curSprite, curFloor } = props; const [activeTabKey, setActiveTabKey] = useState('view'); const [curLocNo, setCurLocNo] = React.useState(curSprite.data.no + '-' + curFloor); const [curLocNo, setCurLocNo] = React.useState(''); // just used to modify the drawer title useEffect(() => { const locNo = curSprite.data.no + '-' + curFloor; props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '库位号' }) + ': ' + locNo); setCurLocNo(locNo); }, [curSprite]); zy-asrs-flow/src/pages/map/drawer/shelf/view.jsx
@@ -61,15 +61,16 @@ const { styles } = useStyles(); const refContainer = useRef(); const { data, curLocNo, setCurLocNo } = props; const { data, curFloor, curLocNo, setCurLocNo } = props; const [loading, setLoading] = React.useState(false); useEffect(() => { const originLocNo = data.no + '-' + curFloor; endThree(); setLoading(true); const fetchShelfInfo = async (locNo) => { console.log("api-" + locNo); const res = await Http.doGet('/api/map/shelf/info', { locNo: locNo }); if (res?.data && shelfThree) { shelfThree.generateMesh((addObject) => { @@ -97,10 +98,10 @@ setTimeout(() => { startThree(refContainer.current); shelfThree.handleClick = (locNo) => { setCurLocNo(locNo); shelfThree.handleClick = (objName) => { setCurLocNo(objName); } fetchShelfInfo(curLocNo); // curLoc更新不及时 fetchShelfInfo(originLocNo); // curLoc更新不及时 setLoading(false); }, 300)