From 72359bb6e10b4a863b5f9faac97bc8d49b85d10c Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期六, 27 八月 2022 16:02:39 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/console.js | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js index 611e6b7..707d1fa 100644 --- a/src/main/webapp/static/js/console.js +++ b/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(); } \ No newline at end of file -- Gitblit v1.9.1