lty
2025-07-10 dae8455398029eaf7b8419a64452766fcec823d6
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])