From 4d44953d342fb0f7a1b9726eeaa9a35ba2b7548c Mon Sep 17 00:00:00 2001 From: 野心家 <1051256694@qq.com> Date: 星期四, 19 六月 2025 11:12:28 +0800 Subject: [PATCH] 初始化 --- src/main/webapp/static/js/console.js | 47 +++++++++++++++++++++++++++++------------------ 1 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js index 611e6b7..6ffe0ac 100644 --- a/src/main/webapp/static/js/console.js +++ b/src/main/webapp/static/js/console.js @@ -40,10 +40,16 @@ } }else { bNum = minBayNo + let hiddenArr = []; + if (rackss[i].hiddenArr != undefined) { + hiddenArr = rackss[i].hiddenArr + } for (let j = 0; j < bLen; j++) { - - bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>" - bays = bays + bay + bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>"; + if (hiddenArr.indexOf(bNum) != -1) { + bay = "<button class='item' style='width: "+ bayWidth +"px;visibility: hidden'>" + bNum + "</button>"; + } + bays = bays + bay; bNum = bNum + minBayNo; } } @@ -57,17 +63,17 @@ racks = racks + rack // getCrnInfo(minBayNo); } - // 璐ф灦鎻忚堪 - for (let i = 0;i < rackDescss.length;i++) { - rackDesc = "<div class='rackDescs' id='" + rackDescss[i].id + - "'style='width:"+ rackDescss[i].width + - "px;height: "+ rackDescss[i].height+ - "px;line-height: "+ rackDescss[i].height+ - "px;top: "+ rackDescss[i].top + - "px;left: "+ rackDescss[i].left + - "px'>" + rackDescss[i].text + "</div>" - rackDescs = rackDescs + rackDesc - } + // // 璐ф灦鎻忚堪 + // for (let i = 0;i < rackDescss.length;i++) { + // rackDesc = "<div class='rackDescs' id='" + rackDescss[i].id + + // "'style='width:"+ rackDescss[i].width + + // "px;height: "+ rackDescss[i].height+ + // "px;line-height: "+ rackDescss[i].height+ + // "px;top: "+ rackDescss[i].top + + // "px;left: "+ rackDescss[i].left + + // "px'>" + rackDescss[i].text + "</div>" + // rackDescs = rackDescs + rackDesc + // } // 鍫嗗灈鏈哄拰鍦拌建 for (let i = 0;i < crnss.length;i++) { if (crnss[i].type == "crane") { @@ -90,13 +96,16 @@ } // 妤煎眰 for (let i = 0; i < areas.length;i++) { + let stnss = areas[i].stns let floor = areas[i].text + console.log(areas[i].top) 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) { + console.log(mapInfo.areas[0].floors.length) + if (mapInfo.areas[0].floors.length == 1) { floorBtnss = '' } else { floorBtnss = floorBtnss + floorBtn @@ -135,7 +144,7 @@ $(".main-part").append(floorInfo) $("#line-total").html(total[0]) - listenChange(); + // listenChange(); } function changFloor(e) { @@ -144,5 +153,7 @@ $(".main-part").append(floorInfo) $("#line-total").empty() $("#line-total").html(total[e]) - listenChange(); -} \ No newline at end of file + // listenChange(); +} + + -- Gitblit v1.9.1