自动化立体仓库 - WCS系统
whycq
2022-05-26 5b4049cd9043539161ebb145458571f1f27bbe6b
# ycq
2个文件已修改
388 ■■■■■ 已修改文件
src/main/webapp/views/pipeline.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/render.js 383 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pipeline.html
@@ -59,9 +59,10 @@
            <!-- 站点状态数据监控版 -->
            <div id="site-monitor" class="main-board">
                <!-- 表格 -->
                <table id="site-table">
                <!--固定表头 table 加table-layout: fixed;  th 加 position:sticky;top: 0;-->
                <table id="site-table" style="table-layout: fixed;">
                    <!-- 表头 -->
                    <thead>
                    <thead style="position:sticky;top: 0;">
                    <tr>
                        <th>站号</th>
                        <th>工作号</th>
src/main/webapp/views/render.js
@@ -1,4 +1,4 @@
data = {
firstFloor = {
    "mapName": "克劳斯玛菲WCS",
    "rackCount": 12,
    "crnCount": 3,
@@ -622,15 +622,384 @@
]
}
// 库位图
newData = {
    "mapName": "WCS_test",
    "rackCount": 12,
    "crnCount": 3,
    "stbCount": 9,
    "hpPosition": 1,
    "minBayNo": 2,
    "floors": 2,
    "floor": 1,
    "racks": [
        {
        "type": "rack",
        "id": "rack12",
        "top": 646,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack11",
        "top": 613,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack10",
        "top": 516,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack9",
        "top": 483,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack8",
        "top": 451,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack7",
        "top": 418,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack6",
        "top": 323,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack5",
        "top": 290,
        "left": 324,
        "width": 887,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 52
    },
        {
        "type": "rack",
        "id": "rack3",
        "top": 225,
        "left": 188,
        "width": 1023,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 60
    },
        {
        "type": "rack",
        "id": "rack1",
        "top": 97,
        "left": 188,
        "width": 1023,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 60
    },
        {
        "type": "rack",
        "id": "rack4",
        "top": 257,
        "left": 188,
        "width": 1023,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 60
    },
        {
        "type": "rack",
        "id": "rack2",
        "top": 129,
        "left": 188,
        "width": 1023,
        "height": 30,
        "minBayNo": 2,
        "maxBayNo": 60
    }],
    "rackDescs": [{
        "type": "rackDescs",
        "id": "lb_desc12",
        "text": "#12",
        "top": 646,
        "left": 260,
        "width": 47,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc11",
        "text": "#11",
        "top": 618,
        "left": 260,
        "width": 44,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc10",
        "text": "#10",
        "top": 516,
        "left": 257,
        "width": 49,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc9",
        "text": "#9",
        "top": 488,
        "left": 257,
        "width": 38,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc8",
        "text": "#8",
        "top": 449,
        "left": 260,
        "width": 39,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc7",
        "text": "#7",
        "top": 421,
        "left": 260,
        "width": 37,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc6",
        "text": "#6",
        "top": 327,
        "left": 260,
        "width": 38,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc5",
        "text": "#5",
        "top": 291,
        "left": 261,
        "width": 38,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc4",
        "text": "#4",
        "top": 253,
        "left": 145,
        "width": 38,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc3",
        "text": "#3",
        "top": 225,
        "left": 145,
        "width": 38,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc2",
        "text": "#2",
        "top": 128,
        "left": 145,
        "width": 38,
        "height": 27
    }, {
        "type": "rackDescs",
        "id": "lb_desc1",
        "text": "#1",
        "top": 100,
        "left": 145,
        "width": 35,
        "height": 27
    }],
    "crns": [{
        "type": "track",
        "id": "lb_track2",
        "text": "",
        "top": 387,
        "left": 298,
        "width": 1050,
        "height": 2
    }, {
        "type": "track",
        "id": "lb_track3",
        "text": "",
        "top": 582,
        "left": 298,
        "width": 1050,
        "height": 2
    }, {
        "type": "track",
        "id": "lb_track1",
        "text": "",
        "top": 195,
        "left": 298,
        "width": 1050,
        "height": 2
    }],
    "areas": [{
        "type": "Control_floor",
        "id": "tabControl_floor1",
        "text": "楼层",
        "top": 286,
        "left": 22,
        "width": 302,
        "height": 403,
        "floors": [{
            "type": "floor",
            "id": "page_floor1",
            "text": "1F",
            "top": 4,
            "left": 22,
            "width": 276,
            "height": 395,
            "stns": [{
                "type": "stn",
                "id": "site-201",
                "text": "201",
                "top": 165,
                "left": 193,
                "width": 77,
                "height": 30
            }, {
                "type": "stn",
                "id": "site-202",
                "text": "202",
                "top": 165,
                "left": 112,
                "width": 77,
                "height": 30
            }, {
                "type": "stn",
                "id": "site-210",
                "text": "210",
                "top": 10,
                "left": 59,
                "width": 51,
                "height": 22
            }, {
                "type": "track",
                "id": "lb_trCart1",
                "text": "RGV轨道",
                "top": 2,
                "left": 65,
                "width": 4,
                "height": 213
            }, {
                "type": "track",
                "id": "lb_trCart2",
                "text": "RGV轨道",
                "top": 2,
                "left": 100,
                "width": 4,
                "height": 213
            }, {
                "type": "stn",
                "id": "site-221",
                "text": "221",
                "top": 6,
                "left": 197,
                "width": 77,
                "height": 30
            }, {
                "type": "stn",
                "id": "site-220",
                "text": "220",
                "top": 6,
                "left": 116,
                "width": 77,
                "height": 30
            }]
        }, {
            "type": "floor",
            "id": "page_floor2",
            "text": "2F",
            "top": 4,
            "left": 22,
            "width": 276,
            "height": 395,
            "stns": [{
                "type": "stn",
                "id": "site-301",
                "text": "301",
                "top": 38,
                "left": 196,
                "width": 77,
                "height": 30
            }, {
                "type": "stn",
                "id": "site-302",
                "text": "302",
                "top": 38,
                "left": 115,
                "width": 77,
                "height": 30
            }, {
                "type": "stn",
                "id": "site-321",
                "text": "321",
                "top": 197,
                "left": 196,
                "width": 77,
                "height": 30
            }, {
                "type": "stn",
                "id": "site-320",
                "text": "320",
                "top": 197,
                "left": 115,
                "width": 77,
                "height": 30
            }]
        }]
    }]
}
function getMap() {
    let mapName = "<div class='mapName'>" + data.mapName + "</div>"
    let mapName = "<div class='mapName'>" + firstFloor.mapName + "</div>"
    let rack = '', racks = '', rackDesc = '',
        rackDescs = '', crn = '', crns = '',track = '',
        tracks = '', stn = '', stns = '';
    let rackss = data.racks,
        rackDescss = data.rackDescs,
        crnss = data.crns,
        stnss = data.stns;
    let rackss = firstFloor.racks,
        rackDescss = firstFloor.rackDescs,
        crnss = firstFloor.crns,
        stnss = firstFloor.stns;
    // 货架
    for (let i = 0;i < rackss.length;i++) {
        let btn =''
@@ -638,7 +1007,7 @@
        var maxBayNo = rackss[i].maxBayNo
        var minBayNo = rackss[i].minBayNo
        let bLen = maxBayNo / minBayNo
        if (data.hpPosition == 1) {
        if (firstFloor.hpPosition == 1) {
            for (let j = bLen;j > 0; j--) {
                btn = "<button class='item' style='width: 34px'>" + maxBayNo + "</button>"
                btns = btns + btn