|  |  |  | 
|---|
|  |  |  | tracks = '', | 
|---|
|  |  |  | stn = '', | 
|---|
|  |  |  | stns = '', | 
|---|
|  |  |  | barcode = '', | 
|---|
|  |  |  | barcodeArr = [], | 
|---|
|  |  |  | stnArr = [], | 
|---|
|  |  |  | floorBtn = '', | 
|---|
|  |  |  | floorBtns = '', | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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) { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 + | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 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]) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 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]) | 
|---|