| | |
| | | const { styles } = useStyles(); |
| | | const refContainer = useRef(); |
| | | |
| | | const { curLocNo, setCurLocNo } = props; |
| | | const { data, curLocNo, setCurLocNo } = props; |
| | | const [loading, setLoading] = React.useState(false); |
| | | |
| | | useEffect(() => { |
| | |
| | | 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) => { |
| | | for (const item of res.data) { |
| | | console.log(item.locNo); |
| | | const { row, bay, lev } = Utils.parseLocNo(item.locNo); |
| | | // shelf |
| | | const shelfMesh = new THREE.Mesh(new THREE.BoxGeometry(100, 40, 100), new THREE.MeshStandardMaterial({ |
| | |
| | | }, 300) |
| | | |
| | | return endThree; |
| | | }, [props.data.uuid]); |
| | | }, [data]); |
| | | |
| | | return ( |
| | | <> |