zjj
2024-06-05 12a66f19229f25054c145f17e03711fcca50fa77
#地图初始化
4个文件已修改
76 ■■■■ 已修改文件
src/main/webapp/static/css/render.css 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.map.js 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/render.css
@@ -80,6 +80,15 @@
    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;
src/main/webapp/static/js/console.js
@@ -9,6 +9,8 @@
    track = '',
    tracks = '',
    stn = '',
    barcode = '',
    barcodeArr = [],
    stns = '',
    stnArr = [],
    floorBtn = '',
@@ -125,6 +127,7 @@
        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 =
@@ -139,6 +142,7 @@
        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 +
@@ -161,10 +165,21 @@
                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])
@@ -173,7 +188,7 @@
}
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])
src/main/webapp/static/js/console.map.js
@@ -3,7 +3,7 @@
    "rackCount": 6,
    "crnCount": 6,
    "stbCount": 40,
    "hpPosition": 0,
    "hpPosition": 1,
    "minBayNo": 2,
    "floors": 1,
    "racks": [{
@@ -63,29 +63,21 @@
    }],
    "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",
@@ -471,7 +463,27 @@
                "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
                }
            ]
        }]
    }]
}
src/main/webapp/views/console.html
@@ -648,7 +648,7 @@
                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";