#
whycq
2022-08-27 72359bb6e10b4a863b5f9faac97bc8d49b85d10c
src/main/webapp/static/js/console.js
@@ -39,13 +39,22 @@
                bNum = bNum - minBayNo;
            }
        }else {
            bNum = minBayNo
            for (let j = 0; j < bLen; j++) {
                bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
                bays = bays + bay
                bNum = bNum + minBayNo;
            if (minBayNo % 2 == 0) {
                bNum = minBayNo
                for (let j = 0; j < bLen; j++) {
                    bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
                    bays = bays + bay
                    bNum = bNum + minBayNo;
                }
            } else {
                bNum = minBayNo + 1
                for (let j = 0; j < bLen; j++) {
                    bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"
                    bays = bays + bay
                    bNum = bNum + minBayNo;
                }
            }
        }
        rack = "<div class='rack' id='" + rackss[i].id +
@@ -90,13 +99,14 @@
    }
    // 楼层
    for (let i = 0; i < areas.length;i++) {
        let stnss = areas[i].stns
        let floor = areas[i].text
        floorId = areas[i].id
        var position = (i+1)*100
        floorBtn =
            "<button class='floorBtn btn-16' onclick='changFloor("+i+")' style='top: "+position+"px;'>" + floor +"</button>"
        if (areas.length = 1) {
        if (mapInfo.areas[0].floors.length == 1) {
            floorBtnss = ''
        } else {
            floorBtnss =  floorBtnss + floorBtn
@@ -135,7 +145,7 @@
    $(".main-part").append(floorInfo)
    $("#line-total").html(total[0])
    listenChange();
    // listenChange();
}
function changFloor(e) {
@@ -144,5 +154,5 @@
    $(".main-part").append(floorInfo)
    $("#line-total").empty()
    $("#line-total").html(total[e])
    listenChange();
    // listenChange();
}