From 24c75bd9e438cf6ad6622e93dc14ce3e67caae96 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 18 七月 2023 15:56:35 +0800 Subject: [PATCH] # --- src/main/webapp/views/console.html | 18 + src/main/webapp/static/js/console.js | 36 +-- src/main/webapp/static/css/render.css | 9 src/main/webapp/static/js/console.map.js | 492 ++++++++++++++++++++++++------------------------ src/main/webapp/static/js/common.js | 2 pom.xml | 2 6 files changed, 283 insertions(+), 276 deletions(-) diff --git a/pom.xml b/pom.xml index cdaca70..fb17e00 100644 --- a/pom.xml +++ b/pom.xml @@ -185,7 +185,7 @@ </dependencies> <build> - <finalName>jmwcs</finalName> + <finalName>jgwcs</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> diff --git a/src/main/webapp/static/css/render.css b/src/main/webapp/static/css/render.css index a3e42cd..1f6e044 100644 --- a/src/main/webapp/static/css/render.css +++ b/src/main/webapp/static/css/render.css @@ -107,6 +107,15 @@ background-color: rgb(157, 217, 162); font-size: 10px; } +.uTrack { + position: absolute; + display: inline-block; + border-top: 2px solid #000; + border-left: 2px solid #000; + border-bottom: 2px solid #000; + border-radius: 50px 0 0 50px; + z-index: 5; +} /* 16 */ .btn-16 { border: none; diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js index 0022325..e69beac 100644 --- a/src/main/webapp/static/js/common.js +++ b/src/main/webapp/static/js/common.js @@ -1,4 +1,4 @@ -var baseUrl = "/jmwcs"; +var baseUrl = "/jgwcs"; // 璧嬪�� function setVal(el, val) { diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js index 880d155..cd86882 100644 --- a/src/main/webapp/static/js/console.js +++ b/src/main/webapp/static/js/console.js @@ -8,6 +8,8 @@ crns = '', track = '', tracks = '', + uTrack = '', + uTracks = '', stn = '', barcode = '', stns = '', @@ -32,7 +34,7 @@ let bLen let interval // 闂撮殧鏁� - if (maxBayNo<35) { + if (maxBayNo<40) { interval = 1 bLen = maxBayNo / interval // 搴撲綅涓暟 } else { @@ -64,7 +66,7 @@ } } } - bayWidth = (rackss[i].width / bLen)-4 + bayWidth = (rackss[i].width / bLen) // hpPosition 0 琛ㄧず璐ф灦搴忓彿 宸�->鍙� 1 琛ㄧず璐ф灦搴忓彿 宸�<-鍙� if (mapInfo.hpPosition == 1) { bNum = maxBayNo @@ -94,24 +96,6 @@ }else { bNum = minBayNo for (let j = 0; j < bLen; j++) { - if (i === 0) { - if (j === 15 || j === 16) { - bay = "<button class='item' style='width: "+ 80 +"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 === 15) { - bay = "<button class='item' style='margin-left: 160px;width: "+ bayWidth +"px'>" + (bNum + 4) + "</button>" - bays = bays + bay - bNum = bNum + interval + 4; - continue - } bay = "<button class='item' style='width: "+ bayWidth +"px'>" + bNum + "</button>" bays = bays + bay bNum = bNum + interval; @@ -148,6 +132,14 @@ "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 + @@ -213,7 +205,7 @@ } } - floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss + barcodeArr[0] + floorInfo = racks + rackDescs + tracks + uTracks + crns + stnArr[0] + floorBtnss + barcodeArr[0] $(".main-part").append(floorInfo) $("#line-total").html(total[0]) @@ -222,7 +214,7 @@ } function changFloor(e) { $(".main-part").empty() // 娓呯┖鑺傜偣 - floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + floorBtnss + barcodeArr[e] + floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + uTracks + floorBtnss + barcodeArr[e] $(".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 90904d2..30e04a7 100644 --- a/src/main/webapp/static/js/console.map.js +++ b/src/main/webapp/static/js/console.map.js @@ -1,5 +1,5 @@ mapInfo = { - "mapName": "JXJMWCS", + "mapName": "XCJGWCS", "rackCount": 18, "crnCount": 7, "stbCount": 77, @@ -10,42 +10,122 @@ { "type": "rack", "id": "rack1", - "top": 296, + "top": 100, "left": 370, - "width": 1200, + "width": 1224, "height": 26, "minBayNo": 1, - "maxBayNo": 15 + "maxBayNo": 36 }, { "type": "rack", "id": "rack2", - "top": 375, + "top": 130, "left": 370, - "width": 1200, + "width": 1224, "height": 26, "minBayNo": 1, - "maxBayNo": 15 + "maxBayNo": 36 }, { "type": "rack", "id": "rack3", - "top": 403, + "top": 160, "left": 370, - "width": 1200, + "width": 1224, "height": 26, "minBayNo": 1, - "maxBayNo": 15 + "maxBayNo": 36 }, { "type": "rack", "id": "rack4", - "top": 470, + "top": 190, "left": 370, - "width": 1200, + "width": 1122, "height": 26, "minBayNo": 1, - "maxBayNo": 15 + "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": [ @@ -83,25 +163,25 @@ "id": "crn-1", "text": "1", "top": 334, - "left": 1417, + "left": 1552, "width": 93, "height": 22 }, { - "type": "track", + "type": "uTrack", "id": "lb_track2", "text": "", - "top": 452, + "top": 400, "left": 300, - "width": 1300, - "height": 2 + "width": 1400, + "height": 180 }, { "type": "crane", "id": "crn-2", "text": "2", - "top": 440, - "left": 1417, + "top": 388, + "left": 1552, "width": 93, "height": 22 }, @@ -117,230 +197,154 @@ "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 - } - ] - }, - { - "type": "floor", - "id": "page_floor1", - "text": "5F", - "top": 4, - "left": 22, - "width": 1819, - "height": 668, - "stns": [ - { - "type": "stn", - "id": "site-505", - "text": "505", - "top": 403, - "left": 193, - "width": 78, - "height": 24 - }, - { - "type": "stn", - "id": "site-502", - "text": "502", - "top": 377, - "left": 273, - "width": 95, - "height": 24 - }, - { - "type": "stn", - "id": "site-504", - "text": "504", - "top": 377, - "left": 193, - "width": 78, - "height": 24 - }, - { - "type": "stn", - "id": "site-501", - "text": "501", - "top": 403, - "left": 273, - "width": 95, - "height": 24 - }, - { - "type": "stn", - "id": "site-503", - "text": "503", - "top": 429, - "left": 193, - "width": 78, - "height": 24 - }, - { - "type": "stn", - "id": "site-500", - "text": "500", - "top": 477, - "left": 193, - "width": 78, - "height": 24 - }, - ], - "barcode": [ - { - "type": "barcode", - "id": "barcode-2", - "text": "", - "top": 454, - "left": 192, - "width": 78, - "height": 20 - } - ] - }, + //{ + // "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 + // } + // ] + //}, ] } ] diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html index e79c633..afb3310 100644 --- a/src/main/webapp/views/console.html +++ b/src/main/webapp/views/console.html @@ -588,28 +588,30 @@ headers: {'token': localStorage.getItem('token')}, method: 'POST', success: function (res) { - // console.log(res) if (res.code === 200) { var crns = res.data; for (var i = 0; i < crns.length; i++) { var crnEl = $("#crn-" + crns[i].crnId); crnEl.attr("class", "machine " + crns[i].crnStatus); - var unit = 0;//($('.item').eq(0).width() + 13) / 2; - + var unit = 0; if (crns[i].bay < 0 || crns[i].bay === -2) { crns[i].bay = 1 } - // crnEl.animate({left: (crns[i].bay * unit) + 'px'}, 1000); - // crns[i].bay = 15; var offSet = 0; unit = -28.5; - offSet = 276; //145 + offSet = 1552; - // crnEl.animate({left: offSet + 'px'}, 1000); if(crns[i].bay === 1){ - crnEl.animate({left: offSet + 'px'}, 1000); + if (i == 1) { + if (crns[i].bay < 27) { + crnEl.animate() + } + } else { + crnEl.animate({left: offSet + 'px'}, 1000); + } + } else { crnEl.animate({left: (offSet - unit + (crns[i].bay * unit)) + 'px'}, 1000); } -- Gitblit v1.9.1