From cfbba7b9028dbc5871acd5481a319c82fbf1bde1 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 03 六月 2023 10:57:29 +0800
Subject: [PATCH] 库位地图优化

---
 src/main/webapp/views/home/map.html |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/main/webapp/views/home/map.html b/src/main/webapp/views/home/map.html
index af74d48..0e0126d 100644
--- a/src/main/webapp/views/home/map.html
+++ b/src/main/webapp/views/home/map.html
@@ -1154,17 +1154,16 @@
 
                                 })
                             })
-                            data.forEach((item,index) => {
-                                let locNo = item.locNo
-                                let y = parseInt(locNo.substr(2,3))
-                                let x = parseInt(locNo.substr(0,2))
-                                if (x >= 2 && x <= 12) {
-                                    x += 1;
-                                }else if (x == 13) {
-                                    x += 2;
-                                }
 
-                                tmp[x][y].searchStatus = true//鎼滅储鏍囪
+                            data.forEach((item,i) => {
+                                let locNo = item.locNo
+                                tmp.forEach((item,index) => {
+                                    item.forEach((val,idx) => {
+                                        if (tmp[index][idx].locNo == locNo) {
+                                            tmp[index][idx].searchStatus = true//鎼滅储鏍囪
+                                        }
+                                    })
+                                })
                             })
                             that.map = tmp
                             $layui.layer.msg("鎼滅储鎴愬姛");

--
Gitblit v1.9.1