From 9c5567aaa3bd765e350a9a9773ca510f76410210 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 18 十月 2024 16:27:40 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/insight/shelf/ShelfMain.jsx |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/zy-acs-flow/src/map/insight/shelf/ShelfMain.jsx b/zy-acs-flow/src/map/insight/shelf/ShelfMain.jsx
index 655567c..0668829 100644
--- a/zy-acs-flow/src/map/insight/shelf/ShelfMain.jsx
+++ b/zy-acs-flow/src/map/insight/shelf/ShelfMain.jsx
@@ -80,26 +80,17 @@
 }
 
 const ShelfMain = (props) => {
-    const { data, curLocNo, setCurLocNo } = props;
+    const { curLocNo, curShelfInfo: info, setCurLocNo } = props;
     const translate = useTranslate();
     const dataProvider = useDataProvider();
     const containerRef = useRef();
-    const [loading, setLoading] = useState(true);
-    const [info, setInfo] = useState(null);
-    const [selectedLoc, setSelectedLoc] = useState(null);
 
-    useEffect(() => {
-        if (data) {
-            getLocGroup(data.row, data.bay, (response) => {
-                setInfo(response);
-                setCurLocNo(response[0]?.locNo);
-                setSelectedLoc(response[0]);
-            });
-        }
-    }, [data]);
+    const [selectedLoc, setSelectedLoc] = useState(null);   // loc obj
+    const [loading, setLoading] = useState(true);
 
     useEffect(() => {
         if (info) {
+            setSelectedLoc(info[0]);
             endThree();
             setLoading(true);
             setTimeout(() => {

--
Gitblit v1.9.1