From 28f9d6aadef16cafb888ff6bcc97f99bde971d8d Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 10 五月 2024 13:58:20 +0800 Subject: [PATCH] # --- src/core/warehouse.jsx | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/core/warehouse.jsx b/src/core/warehouse.jsx index b23b8b0..0118bd1 100644 --- a/src/core/warehouse.jsx +++ b/src/core/warehouse.jsx @@ -26,10 +26,17 @@ useEffect(() => { const timer = setInterval(() => { - console.log('do'); - // getBoxData().then(res => { - // setBoxData(res); - // }) + getBoxData().then(res => { + // res.push({ + // locNo: "A100301001", + // row: 3, + // bay: 1, + // lev: 1, + // locSts: "STOCK", + // }) + // console.log(res); + setBoxData(res); + }) getAgvData().then(res => { // console.log(JSON.stringify(res)) @@ -43,10 +50,10 @@ // setAgvData(agvRealData); } index++; - }, INTERVAL_TIME * 1.1); + }, INTERVAL_TIME); return () => { - // clearInterval(timer); + clearInterval(timer); } }, []) @@ -60,10 +67,6 @@ const shelfEl = useMemo(() => { return shelfData.map((data, index) => <Shelf key={index} {...data} />) - }, []); - - const shelfEl1 = useMemo(() => { - return shelfData.slice(0, 1).map((data, index) => <Shelf key={index} {...data} />) }, []); const boxEl = useMemo(() => { @@ -85,7 +88,6 @@ {tunnelEl} {areaEl} {shelfEl} - {/* {shelfEl1} */} {agvEl} {boxEl} </group> -- Gitblit v1.9.1