From d9b90148df8ce5b6ae7cba019359430df8c61742 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期六, 16 八月 2025 16:42:21 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/console.js | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js
index f731681..fad0039 100644
--- a/src/main/webapp/static/js/console.js
+++ b/src/main/webapp/static/js/console.js
@@ -10,6 +10,8 @@
tracks = '',
stn = '',
stns = '',
+ barcode = '',
+ barcodeArr = [],
stnArr = [],
floorBtn = '',
floorBtns = '',
@@ -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 +
@@ -162,9 +166,18 @@
}
}
+ 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 +186,7 @@
}
function changFloor(e) {
$(".main-part").empty() // 娓呯┖鑺傜偣
- floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + floorBtnss
+ floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + floorBtnss+ barcodeArr[0]
$(".main-part").append(floorInfo)
$("#line-total").empty()
$("#line-total").html(total[e])
--
Gitblit v1.9.1