From c1eda835c6b10edb23b810da1fd6fb71aa5e5e6b Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期四, 09 十一月 2023 10:58:14 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/console.js | 71 +--- src/main/webapp/static/js/console.map.js | 771 ++++++++++++++++++++++++++++----------------------- 2 files changed, 438 insertions(+), 404 deletions(-) diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js index cd86882..9a143eb 100644 --- a/src/main/webapp/static/js/console.js +++ b/src/main/webapp/static/js/console.js @@ -8,13 +8,9 @@ crns = '', track = '', tracks = '', - uTrack = '', - uTracks = '', stn = '', - barcode = '', stns = '', stnArr = [], - barcodeArr = [], floorBtn = '', floorBtns = '', floorBtnss = '', @@ -34,7 +30,7 @@ let bLen let interval // 闂撮殧鏁� - if (maxBayNo<40) { + if (maxBayNo<35) { interval = 1 bLen = maxBayNo / interval // 搴撲綅涓暟 } else { @@ -66,29 +62,11 @@ } } } - bayWidth = (rackss[i].width / bLen) + bayWidth = rackss[i].width / bLen // hpPosition 0 琛ㄧず璐ф灦搴忓彿 宸�->鍙� 1 琛ㄧず璐ф灦搴忓彿 宸�<-鍙� if (mapInfo.hpPosition == 1) { bNum = maxBayNo for (let j = bLen; j > 0; j--) { - if (i === 0) { - if (j === 13) { - bay = "<button class='item' style='width: " + 160 + "px'>" + bNum + "</button>" - bays = bays + bay - bNum = bNum - interval; - continue - } - bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>" - bays = bays + bay - bNum = bNum - interval; - continue - } - if (j === 13) { - bay = "<button class='item' style='margin-left: 160px;width: "+ bayWidth +"px'>" + (bNum - 2) + "</button>" - bays = bays + bay - bNum = bNum - interval - 2; - continue - } bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>" bays = bays + bay bNum = bNum - interval; @@ -111,17 +89,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") { @@ -132,14 +110,6 @@ "px;left: "+ crnss[i].left + "px'></div>" crns = crns + crn - } else if(crnss[i].type == 'uTrack'){ - uTrack = "<div class='uTrack' id='" + crnss[i].id + - "'style='width:"+ crnss[i].width + - "px;height: "+ crnss[i].height+ - "px;top: "+ crnss[i].top + - "px;left: "+ crnss[i].left + - "px'>" + crnss[i].text + "</div>" - uTracks = uTracks + uTrack } else { track = "<div class='track' id='" + crnss[i].id + "'style='width:"+ crnss[i].width + @@ -154,7 +124,6 @@ for (let i = 0; i < areas.length;i++) { let stnss = areas[i].stns - let barcodes = areas[i].barcode let floor = areas[i].text floorId = areas[i].id var position = (i+1)*100 @@ -169,7 +138,6 @@ var index = i var n = 1 stnArr[index] = '' - barcodeArr[index] = '' total[index] = '' for (let j = 0; j < stnss.length; j++) { if (stnss[j].type == "stn") { @@ -194,18 +162,9 @@ } } - 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 + uTracks + crns + stnArr[0] + floorBtnss + barcodeArr[0] + floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss $(".main-part").append(floorInfo) $("#line-total").html(total[0]) @@ -214,7 +173,7 @@ } function changFloor(e) { $(".main-part").empty() // 娓呯┖鑺傜偣 - floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + uTracks + floorBtnss + barcodeArr[e] + floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + floorBtnss $(".main-part").append(floorInfo) $("#line-total").empty() $("#line-total").html(total[e]) diff --git a/src/main/webapp/static/js/console.map.js b/src/main/webapp/static/js/console.map.js index 30e04a7..68bc46c 100644 --- a/src/main/webapp/static/js/console.map.js +++ b/src/main/webapp/static/js/console.map.js @@ -1,351 +1,426 @@ mapInfo = { - "mapName": "XCJGWCS", - "rackCount": 18, - "crnCount": 7, - "stbCount": 77, + "mapName": "xcjgwcs", + "rackCount": 4, + "crnCount": 1, + "stbCount": 4, "hpPosition": 0, - "minBayNo": 2, - "floors": 2, - "racks": [ - { - "type": "rack", - "id": "rack1", - "top": 100, - "left": 370, - "width": 1224, - "height": 26, - "minBayNo": 1, - "maxBayNo": 36 - }, - { - "type": "rack", - "id": "rack2", - "top": 130, - "left": 370, - "width": 1224, - "height": 26, - "minBayNo": 1, - "maxBayNo": 36 - }, - { - "type": "rack", - "id": "rack3", - "top": 160, - "left": 370, - "width": 1224, - "height": 26, - "minBayNo": 1, - "maxBayNo": 36 - }, - { - "type": "rack", - "id": "rack4", - "top": 190, - "left": 370, - "width": 1122, - "height": 26, - "minBayNo": 1, - "maxBayNo": 33 - }, - { - "type": "rack", - "id": "rack5", - "top": 230, - "left": 403, - "width": 1104, - "height": 26, - "minBayNo": 1, - "maxBayNo": 24 - }, - { - "type": "rack", - "id": "rack6", - "top": 260, - "left": 403, - "width": 1104, - "height": 26, - "minBayNo": 1, - "maxBayNo": 24 - }, - { - "type": "rack", - "id": "rack7", - "top": 440, - "left": 403, - "width": 1242, - "height": 26, - "minBayNo": 1, - "maxBayNo": 27 - }, - { - "type": "rack", - "id": "rack8", - "top": 470, - "left": 403, - "width": 1242, - "height": 26, - "minBayNo": 1, - "maxBayNo": 27 - }, - { - "type": "rack", - "id": "rack9", - "top": 500, - "left": 403, - "width": 1242, - "height": 26, - "minBayNo": 1, - "maxBayNo": 27 - }, - { - "type": "rack", - "id": "rack10", - "top": 530, - "left": 403, - "width": 1242, - "height": 26, - "minBayNo": 1, - "maxBayNo": 27 - }, - { - "type": "rack", - "id": "rack11", - "top": 610, - "left": 403, - "width": 1242, - "height": 26, - "minBayNo": 1, - "maxBayNo": 27 - }, - { - "type": "rack", - "id": "rack12", - "top": 640, - "left": 403, - "width": 1242, - "height": 26, - "minBayNo": 1, - "maxBayNo": 27 - }, - ], - "rackDescs": [ - { - "type": "rackDescs", - "id": "lb_desc1", - "text": "#1", - "top": 388, - "left": 1812, - "width": 30, - "height": 23 - }, - { - "type": "rackDescs", - "id": "lb_desc2", - "text": "#2", - "top": 324, - "left": 1812, - "width": 30, - "height": 23 - }, - ], - "crns": [ - { - "type": "track", - "id": "lb_track1", - "text": "", - "top": 346, - "left": 300, - "width": 1300, - "height": 2 - }, - { - "type": "crane", - "id": "crn-1", - "text": "1", - "top": 334, - "left": 1552, - "width": 93, - "height": 22 - }, - { - "type": "uTrack", - "id": "lb_track2", - "text": "", - "top": 400, - "left": 300, - "width": 1400, - "height": 180 - }, - { - "type": "crane", - "id": "crn-2", - "text": "2", - "top": 388, - "left": 1552, - "width": 93, - "height": 22 - }, - - ], - "areas": [ - { - "type": "Control_floor", - "id": "tabControl_floor1", - "text": "妤煎眰", - "top": 68, - "left": 80, - "width": 1845, - "height": 676, - "floors": [ - //{ - // "type": "floor", - // "id": "page_floor1", - // "text": "1F", - // "top": 4, - // "left": 22, - // "width": 1819, - // "height": 668, - // "stns": [ - // { - // "type": "stn", - // "id": "site-105", - // "text": "105", - // "top": 403, - // "left": 193, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-102", - // "text": "102", - // "top": 377, - // "left": 273, - // "width": 95, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-104", - // "text": "104", - // "top": 377, - // "left": 193, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-101", - // "text": "101", - // "top": 403, - // "left": 273, - // "width": 95, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-103", - // "text": "103", - // "top": 429, - // "left": 193, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-100", - // "text": "100", - // "top": 477, - // "left": 193, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-110", - // "text": "110", - // "top": 376, - // "left": 1512, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-111", - // "text": "111", - // "top": 403, - // "left": 1512, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-112", - // "text": "112", - // "top": 376, - // "left": 1592, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-113", - // "text": "113", - // "top": 403, - // "left": 1592, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-114", - // "text": "114", - // "top": 376, - // "left": 1672, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-115", - // "text": "115", - // "top": 403, - // "left": 1672, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-116", - // "text": "116", - // "top": 350, - // "left": 1672, - // "width": 78, - // "height": 24 - // }, - // { - // "type": "stn", - // "id": "site-117", - // "text": "117", - // "top": 324, - // "left": 1672, - // "width": 78, - // "height": 24 - // }, - // ], - // "barcode": [ - // { - // "type": "barcode", - // "id": "barcode-1", - // "text": "", - // "top": 454, - // "left": 192, - // "width": 78, - // "height": 20 - // } - // ] - //}, - ] - } - ] + "minBayNo": 1, + "floors": 1, + "racks": [{ + "type": "rack", + "id": "rack12", + "top": 614, + "left": 478, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack11", + "top": 591, + "left": 478, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack10", + "top": 522, + "left": 479, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack9", + "top": 498, + "left": 479, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack8", + "top": 465, + "left": 479, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack7", + "top": 442, + "left": 479, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack6", + "top": 367, + "left": 479, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack5", + "top": 344, + "left": 479, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack4", + "top": 308, + "left": 458, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack3", + "top": 285, + "left": 458, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack2", + "top": 223, + "left": 458, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }, { + "type": "rack", + "id": "rack1", + "top": 200, + "left": 458, + "width": 796, + "height": 23, + "minBayNo": 1, + "maxBayNo": 20 + }], + "crns": [{ + "type": "crane", + "id": "crn-2", + "text": "2", + "top": 563, + "left": 525, + "width": 93, + "height": 22 + }, { + "type": "crane", + "id": "crn-1", + "text": "1", + "top": 258, + "left": 525, + "width": 93, + "height": 22 + }, { + "type": "track", + "id": "lb_track3", + "text": "", + "top": 571, + "left": 456, + "width": 850, + "height": 2 + }, { + "type": "track", + "id": "lb_track2", + "text": "", + "top": 415, + "left": 456, + "width": 850, + "height": 2 + }, { + "type": "track", + "id": "lb_track1", + "text": "", + "top": 269, + "left": 442, + "width": 850, + "height": 2 + }], + "areas": [{ + "type": "Control_floor", + "id": "tabControl_floor1", + "text": "妤煎眰", + "top": 66, + "left": 80, + "width": 1444, + "height": 668, + "floors": [{ + "type": "floor", + "id": "page_floor1", + "text": "1F", + "top": 4, + "left": 22, + "width": 1418, + "height": 660, + "stns": [{ + "type": "stn", + "id": "site-408", + "text": "408", + "top": 616, + "left": 1314, + "width": 41, + "height": 23 + }, { + "type": "stn", + "id": "site-402", + "text": "402", + "top": 487, + "left": 1354, + "width": 73, + "height": 36 + }, { + "type": "stn", + "id": "site-404", + "text": "404", + "top": 544, + "left": 1354, + "width": 73, + "height": 72 + }, { + "type": "stn", + "id": "site-405", + "text": "405", + "top": 616, + "left": 1354, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-403", + "text": "403", + "top": 523, + "left": 1354, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-400", + "text": "400", + "top": 443, + "left": 1354, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-401", + "text": "401", + "top": 466, + "left": 1354, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-409", + "text": "409", + "top": 616, + "left": 1275, + "width": 40, + "height": 23 + }, { + "type": "stn", + "id": "site-407", + "text": "407", + "top": 523, + "left": 1275, + "width": 80, + "height": 23 + }, { + "type": "stn", + "id": "site-406", + "text": "406", + "top": 466, + "left": 1275, + "width": 80, + "height": 23 + }, { + "type": "stn", + "id": "site-305", + "text": "305", + "top": 368, + "left": 1432, + "width": 81, + "height": 30 + }, { + "type": "stn", + "id": "site-304", + "text": "304", + "top": 345, + "left": 1432, + "width": 81, + "height": 23 + }, { + "type": "stn", + "id": "site-303", + "text": "303", + "top": 339, + "left": 1354, + "width": 80, + "height": 30 + }, { + "type": "stn", + "id": "site-306", + "text": "306", + "top": 339, + "left": 1282, + "width": 73, + "height": 30 + }, { + "type": "stn", + "id": "site-302", + "text": "302", + "top": 309, + "left": 1354, + "width": 80, + "height": 30 + }, { + "type": "stn", + "id": "site-307", + "text": "307", + "top": 309, + "left": 1282, + "width": 73, + "height": 30 + }, { + "type": "stn", + "id": "site-301", + "text": "301", + "top": 286, + "left": 1354, + "width": 80, + "height": 23 + }, { + "type": "stn", + "id": "site-300", + "text": "300", + "top": 286, + "left": 1255, + "width": 100, + "height": 23 + }, { + "type": "stn", + "id": "site-206", + "text": "206", + "top": 616, + "left": 394, + "width": 87, + "height": 23 + }, { + "type": "stn", + "id": "site-205", + "text": "205", + "top": 616, + "left": 316, + "width": 81, + "height": 23 + }, { + "type": "stn", + "id": "site-204", + "text": "204", + "top": 523, + "left": 316, + "width": 73, + "height": 93 + }, { + "type": "stn", + "id": "site-203", + "text": "203", + "top": 446, + "left": 316, + "width": 73, + "height": 78 + }, { + "type": "stn", + "id": "site-202", + "text": "202", + "top": 389, + "left": 316, + "width": 73, + "height": 59 + }, { + "type": "stn", + "id": "site-201", + "text": "201", + "top": 368, + "left": 316, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-200", + "text": "200", + "top": 368, + "left": 388, + "width": 93, + "height": 23 + }, { + "type": "stn", + "id": "site-105", + "text": "105", + "top": 286, + "left": 387, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-104", + "text": "104", + "top": 286, + "left": 314, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-103", + "text": "103", + "top": 256, + "left": 314, + "width": 73, + "height": 30 + }, { + "type": "stn", + "id": "site-102", + "text": "102", + "top": 224, + "left": 314, + "width": 73, + "height": 33 + }, { + "type": "stn", + "id": "site-100", + "text": "100", + "top": 201, + "left": 387, + "width": 73, + "height": 23 + }, { + "type": "stn", + "id": "site-101", + "text": "101", + "top": 201, + "left": 314, + "width": 73, + "height": 23 + }] + }] + }] } \ No newline at end of file -- Gitblit v1.9.1