| | |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | .barcode { |
| | | position: absolute; |
| | | color: #a19c9c; |
| | | border: 1px solid rgb(108,167,168); |
| | | cursor: pointer; |
| | | text-align: center; |
| | | background-color: rgb(157, 217, 162); |
| | | font-size: 10px; |
| | | } |
| | | |
| | | .floorBtn { |
| | | position: absolute; |
| | |
| | | track = '', |
| | | tracks = '', |
| | | stn = '', |
| | | barcode = '', |
| | | barcodeArr = [], |
| | | stns = '', |
| | | stnArr = [], |
| | | floorBtn = '', |
| | |
| | | |
| | | let stnss = areas[i].stns |
| | | let floor = areas[i].text |
| | | let barcodes = areas[i].barcode |
| | | floorId = areas[i].id |
| | | var position = (i+1)*100 |
| | | floorBtn = |
| | |
| | | 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 + |
| | |
| | | stnArr[i] = stnArr[i] + stn |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | 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[e] |
| | | $(".main-part").append(floorInfo) |
| | | $("#line-total").empty() |
| | | $("#line-total").html(total[e]) |
| | |
| | | "rackCount": 6, |
| | | "crnCount": 6, |
| | | "stbCount": 40, |
| | | "hpPosition": 0, |
| | | "hpPosition": 1, |
| | | "minBayNo": 2, |
| | | "floors": 1, |
| | | "racks": [{ |
| | |
| | | }], |
| | | "rackDescs": [{ |
| | | "type": "rackDescs", |
| | | "id": "lb_desc8", |
| | | "text": "#8", |
| | | "top": 357, |
| | | "left": 1881, |
| | | "id": "lb_desc6", |
| | | "text": "#6", |
| | | "top": 180, |
| | | "left": 1300, |
| | | "width": 33, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc1", |
| | | "text": "#1", |
| | | "top": 93, |
| | | "left": 1884, |
| | | "top": 425, |
| | | "left": 1300, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc9", |
| | | "text": "#9", |
| | | "top": 384, |
| | | "left": 1735, |
| | | "width": 33, |
| | | "height": 23 |
| | | }, {"type": "rackDescs", "id": "lb_desc18", "text": "#18", "top": 663, "left": 1733, "width": 41, "height": 23}], |
| | | }], |
| | | "crns": [{ |
| | | "type": "track", |
| | | "id": "lb_track3", |
| | |
| | | "left": 1417, |
| | | "width": 63, |
| | | "height": 24 |
| | | }, {"type": "stn", "id": "site-105", "text": "105", "top": 351, "left": 1417, "width": 63, "height": 24}] |
| | | }, {"type": "stn", "id": "site-105", "text": "105", "top": 351, "left": 1417, "width": 63, "height": 24}], |
| | | "barcode":[ |
| | | { |
| | | "type": "barcode", |
| | | "id": "barcode-1", |
| | | "text": "", |
| | | "top": 422, |
| | | "left": 1335, |
| | | "width": 80, |
| | | "height": 20 |
| | | }, |
| | | { |
| | | "type": "barcode", |
| | | "id": "barcode-2", |
| | | "text": "", |
| | | "top": 422, |
| | | "left": 422, |
| | | "width": 80, |
| | | "height": 20 |
| | | } |
| | | ] |
| | | }] |
| | | }] |
| | | } |
| | |
| | | if (res.code === 200) { |
| | | var barcodes = res.data; |
| | | for (var i = 0; i < barcodes.length; i++) { |
| | | $("#code-decoder-data-" + barcodes[i].barcodeId).html(barcodes[i].codeValue); |
| | | $("#barcode-"+barcodes[i].barcodeId).html(barcodes[i].codeValue ? barcodes[i].codeValue : "--"); |
| | | } |
| | | } else if (res.code === 403) { |
| | | parent.location.href = baseUrl + "/login"; |