From 73cf8ac847af5a3c22e83f64e92692e31e4576d0 Mon Sep 17 00:00:00 2001
From: dubin <dubin>
Date: 星期四, 21 八月 2025 22:34:43 +0800
Subject: [PATCH] 联调

---
 src/main/webapp/static/js/console.js |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js
index f731681..2b381f8 100644
--- a/src/main/webapp/static/js/console.js
+++ b/src/main/webapp/static/js/console.js
@@ -9,6 +9,8 @@
     track = '',
     tracks = '',
     stn = '',
+    barcode = '',
+    barcodeArr = [],
     stns = '',
     stnArr = [],
     floorBtn = '',
@@ -64,7 +66,7 @@
         }
         bayWidth = rackss[i].width / bLen
         // hpPosition 0 琛ㄧず璐ф灦搴忓彿 宸�->鍙� 1 琛ㄧず璐ф灦搴忓彿 宸�<-鍙�
-        if (mapInfo.hpPosition == 1) {
+        if (mapInfo.hpPosition == 0) {
             bNum = maxBayNo
             for (let j = bLen; j > 0; j--) {
                 bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
@@ -125,8 +127,9 @@
 
         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)*50 + 400
         floorBtn =
             "<button class='floorBtn btn-16' onclick='changFloor("+i+")' style='top: "+position+"px;'>" + floor +"</button>"
         if (mapInfo.areas[0].floors.length == 1) {
@@ -139,6 +142,7 @@
         var n = 1
         stnArr[index] = ''
         total[index] = ''
+        barcodeArr[index] = ''
         for (let j = 0; j < stnss.length; j++) {
             if (stnss[j].type == "stn") {
                 stn = "<div class='site' id='" + stnss[j].id +
@@ -161,10 +165,21 @@
                 stnArr[i] = stnArr[i] + stn
             }
 
+
+
+        }
+        for (let k = 0; k < barcodes.length; k++) {
+            barcode = "<div class='barcode' id='" + barcodes[k].id +
+                "'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>"
+            barcodeArr[i] = barcodeArr[i] + barcode
         }
 
     }
-    floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss
+    floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss+ barcodeArr[0]
 
     $(".main-part").append(floorInfo)
     $("#line-total").html(total[0])
@@ -173,7 +188,7 @@
 }
 function changFloor(e) {
     $(".main-part").empty()  // 娓呯┖鑺傜偣
-    floorInfo = racks  + stnArr[e] +rackDescs + crns + tracks + floorBtnss
+    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