From 6876084ffc4a01c1eca6a609dec8c176efc59aae Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 22 一月 2026 15:16:45 +0800
Subject: [PATCH] 1

---
 zy-acs-cv/src/main/webapp/static/js/console.js |   99 +++++++++++++++++++++++++------------------------
 1 files changed, 50 insertions(+), 49 deletions(-)

diff --git a/zy-acs-cv/src/main/webapp/static/js/console.js b/zy-acs-cv/src/main/webapp/static/js/console.js
index 7523ae8..5fe6aa2 100644
--- a/zy-acs-cv/src/main/webapp/static/js/console.js
+++ b/zy-acs-cv/src/main/webapp/static/js/console.js
@@ -16,23 +16,24 @@
     floorBtn = '',
     floorBtns = '',
     floorBtnss = '',
-    floorInfo='';  // 搴撳尯淇℃伅
+    floorInfo = '';  // 搴撳尯淇℃伅
 let rackss = mapInfo.racks,
     rackDescss = mapInfo.rackDescs,
     crnss = mapInfo.crns,
     areas = mapInfo.areas[0].floors,
     floorId;
+
 function getMap() {
     // 璐ф灦
-    for (let i = 0;i < rackss.length;i++) {
-        let bay ='' // 鍗曚釜搴撲綅
+    for (let i = 0; i < rackss.length; i++) {
+        let bay = '' // 鍗曚釜搴撲綅
         let bays = '' // 搴撲綅闆嗗悎
         let maxBayNo = rackss[i].maxBayNo // 鏈�澶у簱浣嶅彿
         let minBayNo = rackss[i].minBayNo // 鏈�灏忓簱浣嶅彿
         let bLen
         let interval // 闂撮殧鏁�
 
-        if (maxBayNo<35) {
+        if (maxBayNo < 35) {
             interval = 1
             bLen = maxBayNo / interval // 搴撲綅涓暟
         } else {
@@ -43,7 +44,7 @@
         let bNum // 搴撲綅鍙风爜
 
         if (minBayNo % 2 == 0) { // 浠�2寮�濮�
-            if(interval == 1) {
+            if (interval == 1) {
                 bLen = bLen - 1
             } else if (interval == 2) {
                 if (maxBayNo % 2 == 0) { // 鍋舵暟
@@ -54,7 +55,7 @@
                 }
             }
         } else { // 浠�1寮�濮�
-            if(interval == 1) {
+            if (interval == 1) {
                 bLen = bLen
             } else if (interval == 2) {
                 if (maxBayNo % 2 == 0) { // 鍋舵暟
@@ -69,73 +70,73 @@
         if (mapInfo.hpPosition == 1) {
             bNum = maxBayNo
             for (let j = bLen; j > 0; j--) {
-                bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
+                bay = "<button class='item' style='width: " + bayWidth + "px'>" + bNum + "</button>"
                 bays = bays + bay
                 bNum = bNum - interval;
             }
-        }else {
+        } else {
             bNum = minBayNo
             for (let j = 0; j < bLen; j++) {
-                bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
+                bay = "<button class='item' style='width: " + bayWidth + "px'>" + bNum + "</button>"
                 bays = bays + bay
                 bNum = bNum + interval;
             }
         }
 
         rack = "<div class='rack' id='" + rackss[i].id +
-            "'style='width:"+ rackss[i].width +
-            "px;height: "+ rackss[i].height+
-            "px;top: "+ rackss[i].top +
-            "px;left: "+ rackss[i].left +
+            "'style='width:" + rackss[i].width +
+            "px;height: " + rackss[i].height +
+            "px;top: " + rackss[i].top +
+            "px;left: " + rackss[i].left +
             "px'>" + bays + "</div>"
         racks = racks + rack
         // getCrnInfo(minBayNo);
     }
     // 璐ф灦鎻忚堪
-    for (let i = 0;i < rackDescss.length;i++) {
+    for (let i = 0; i < rackDescss.length; i++) {
         rackDesc = "<div class='rackDescs' id='" + rackDescss[i].id +
-            "'style='width:"+ rackDescss[i].width +
-            "px;height: "+ rackDescss[i].height+
-            "px;line-height: "+ rackDescss[i].height+
-            "px;top: "+ rackDescss[i].top +
-            "px;left: "+ rackDescss[i].left +
+            "'style='width:" + rackDescss[i].width +
+            "px;height: " + rackDescss[i].height +
+            "px;line-height: " + rackDescss[i].height +
+            "px;top: " + rackDescss[i].top +
+            "px;left: " + rackDescss[i].left +
             "px'>" + rackDescss[i].text + "</div>"
         rackDescs = rackDescs + rackDesc
     }
     // 鍫嗗灈鏈哄拰鍦拌建
-    for (let i = 0;i < crnss.length;i++) {
+    for (let i = 0; i < crnss.length; i++) {
         if (crnss[i].type == "crane") {
             crn = "<div class='machine' id='" + crnss[i].id +
-                "'style='width:"+ crnss[i].width +
-                "px;height: "+ crnss[i].height+
-                "px;top: "+ crnss[i].top +
-                "px;left: "+ crnss[i].left +
+                "'style='width:" + crnss[i].width +
+                "px;height: " + crnss[i].height +
+                "px;top: " + crnss[i].top +
+                "px;left: " + crnss[i].left +
                 "px'></div>"
             crns = crns + crn
         } else {
             track = "<div class='track' id='" + crnss[i].id +
-                "'style='width:"+ crnss[i].width +
-                "px;height: "+ crnss[i].height+
-                "px;top: "+ crnss[i].top +
-                "px;left: "+ crnss[i].left +
+                "'style='width:" + crnss[i].width +
+                "px;height: " + crnss[i].height +
+                "px;top: " + crnss[i].top +
+                "px;left: " + crnss[i].left +
                 "px'>" + crnss[i].text + "</div>"
             tracks = tracks + track
         }
     }
     // 妤煎眰
-    for (let i = 0; i < areas.length;i++) {
+    for (let i = 0; i < areas.length; i++) {
 
         let stnss = areas[i].stns
         let floor = areas[i].text
         let barcodes = areas[i].barcode
         floorId = areas[i].id
-        var position = (i+1)*100
+        var position = (i + 1) * 100
         floorBtn =
-            "<button class='floorBtn btn-16' onclick='changFloor("+i+")' style='top: "+position+"px;'>" + floor +"</button>"
+            "<button class='floorBtn btn-16' onclick='changFloor(" + i + ")' style='top: " + position + "px;'>" + floor + "</button>"
         if (mapInfo.areas[0].floors.length == 1) {
             floorBtnss = ''
         } else {
-            floorBtnss =  floorBtnss + floorBtn
+            floorBtnss = floorBtnss + floorBtn
         }
         // 姣忓眰鐨� 杈撻�佺嚎绔欑偣
         var index = i
@@ -146,25 +147,24 @@
         for (let j = 0; j < stnss.length; j++) {
             if (stnss[j].type == "stn") {
                 stn = "<div class='site' id='" + stnss[j].id +
-                    "'style='width:"+ stnss[j].width +
-                    "px;height: "+ stnss[j].height+
-                    "px;line-height: "+ stnss[j].height+
-                    "px;top: "+ stnss[j].top +
-                    "px;left: "+ stnss[j].left +
+                    "'style='width:" + stnss[j].width +
+                    "px;height: " + stnss[j].height +
+                    "px;line-height: " + stnss[j].height +
+                    "px;top: " + stnss[j].top +
+                    "px;left: " + stnss[j].left +
                     "px'>" + stnss[j].text + "</div>"
                 stnArr[i] = stnArr[i] + stn
                 total[i] = n++
-            } else if(stnss[j].type == "track"){
+            } else if (stnss[j].type == "track") {
                 stn = "<div class='track' id='" + stnss[j].id +
-                    "'style='width:"+ stnss[j].width +
-                    "px;height: "+ stnss[j].height+
-                    "px;line-height: "+ stnss[j].height+
-                    "px;top: "+ stnss[j].top +
-                    "px;left: "+ stnss[j].left +
-                    "px'>" + stnss[j].text  + "</div>"
+                    "'style='width:" + stnss[j].width +
+                    "px;height: " + stnss[j].height +
+                    "px;line-height: " + stnss[j].height +
+                    "px;top: " + stnss[j].top +
+                    "px;left: " + stnss[j].left +
+                    "px'>" + stnss[j].text + "</div>"
                 stnArr[i] = stnArr[i] + stn
             }
-
 
 
         }
@@ -173,22 +173,23 @@
                 "'style='width:" + barcodes[k].width +
                 "px;height: " + barcodes[k].height +
                 "px;line-height: " + barcodes[k].height +
-                "px;top: "+ barcodes[k].top +
-                "px;left: "+ barcodes[k].left + "px'>" + "</div>"
+                "px;top: " + barcodes[k].top +
+                "px;left: " + barcodes[k].left + "px'>" + "</div>"
             barcodeArr[i] = barcodeArr[i] + barcode
         }
 
     }
-    floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss+ barcodeArr[0]
+    floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss + barcodeArr[0]
 
     $(".main-part").append(floorInfo)
     $("#line-total").html(total[0])
     // listenChange();
 
 }
+
 function changFloor(e) {
     $(".main-part").empty()  // 娓呯┖鑺傜偣
-    floorInfo = racks  + stnArr[e] +rackDescs + crns + tracks + floorBtnss + barcodeArr[e]
+    floorInfo = racks + stnArr[e] + rackDescs + crns + tracks + floorBtnss + barcodeArr[e]
     $(".main-part").append(floorInfo)
     $("#line-total").empty()
     $("#line-total").html(total[e])

--
Gitblit v1.9.1