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

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

diff --git a/src/main/webapp/views/home/map.html b/src/main/webapp/views/home/map.html
index 2349ef4..35619e8 100644
--- a/src/main/webapp/views/home/map.html
+++ b/src/main/webapp/views/home/map.html
@@ -1061,19 +1061,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 >= 4 && x <= 11) {
-                                    x++;
-                                }else if (x >= 12 && x <= 18) {
-                                    x += 2;
-                                } else if (x >= 19 && x <= 21) {
-                                    x += 3;
-                                }
 
-                                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