From 4501ec94feef7504a8b43859983254ce3ae7dbd1 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 28 六月 2023 14:11:34 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/console.js | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js
index 25325ad..99b18e8 100644
--- a/src/main/webapp/static/js/console.js
+++ b/src/main/webapp/static/js/console.js
@@ -9,8 +9,10 @@
track = '',
tracks = '',
stn = '',
+ barcode = '',
stns = '',
stnArr = [],
+ barcodeArr = [],
floorBtn = '',
floorBtns = '',
floorBtnss = '',
@@ -62,11 +64,29 @@
}
}
}
- bayWidth = rackss[i].width / bLen
+ bayWidth = (rackss[i].width / bLen)-4
// hpPosition 0 琛ㄧず璐ф灦搴忓彿 宸�->鍙� 1 琛ㄧず璐ф灦搴忓彿 宸�<-鍙�
if (mapInfo.hpPosition == 1) {
bNum = maxBayNo
for (let j = bLen; j > 0; j--) {
+ if (i === 0) {
+ if (j === 13) {
+ bay = "<button class='item' style='width: " + 160 + "px'>" + bNum + "</button>"
+ bays = bays + bay
+ bNum = bNum - interval;
+ continue
+ }
+ bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
+ bays = bays + bay
+ bNum = bNum - interval;
+ continue
+ }
+ if (j === 13) {
+ bay = "<button class='item' style='margin-left: 160px;width: "+ bayWidth +"px'>" + (bNum - 2) + "</button>"
+ bays = bays + bay
+ bNum = bNum - interval - 2;
+ continue
+ }
bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
bays = bays + bay
bNum = bNum - interval;
@@ -142,6 +162,7 @@
for (let i = 0; i < areas.length;i++) {
let stnss = areas[i].stns
+ let barcodes = areas[i].barcode
let floor = areas[i].text
floorId = areas[i].id
var position = (i+1)*100
@@ -156,6 +177,7 @@
var index = i
var n = 1
stnArr[index] = ''
+ barcodeArr[index] = ''
total[index] = ''
for (let j = 0; j < stnss.length; j++) {
if (stnss[j].type == "stn") {
@@ -180,9 +202,19 @@
}
}
+ console.log(areas[i].barcode)
+ 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])
@@ -191,7 +223,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