From 525da76ca931c91e5f02e5a13388750309c99b33 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期三, 25 五月 2022 09:03:56 +0800
Subject: [PATCH] # ycq
---
/dev/null | 706 ------------------------------------------------------
src/main/webapp/views/index.html | 14
src/main/webapp/views/pipeline.html | 13
src/main/webapp/static/css/index.css | 44 +-
4 files changed, 41 insertions(+), 736 deletions(-)
diff --git a/src/main/webapp/static/css/index.css b/src/main/webapp/static/css/index.css
index c895384..7c5a292 100644
--- a/src/main/webapp/static/css/index.css
+++ b/src/main/webapp/static/css/index.css
@@ -5,17 +5,17 @@
html,body {
height: 100%;
}
-.nav {
- width: 100%;
- height: 90px;
- line-height: 90px;
- list-style: none;
- color: #fff;
- position: fixed;
- text-align: center;
- letter-spacing:3px;
+/*.nav {*/
+/* width: 100%;*/
+/* height: 90px;*/
+/* line-height: 90px;*/
+/* list-style: none;*/
+/* color: #fff;*/
+/* position: fixed;*/
+/* text-align: center;*/
+/* letter-spacing:3px;*/
-}
+/*}*/
.right {
float: right;
margin-right: 1%;
@@ -82,20 +82,20 @@
transform: translateY(0px);
}
/* Effect 1: Brackets 馃憜*/
-.sidebar ul {
- font-size: 20px;
- font-weight: 500;
- padding-left: 5%;
+/*.sidebar ul {*/
+/* font-size: 20px;*/
+/* font-weight: 500;*/
+/* padding-left: 5%;*/
-}
-.sidebar a {
- text-decoration: none;
- /*color: #cbcbcb;*/
-}
+/*}*/
+/*.sidebar a {*/
+/* text-decoration: none;*/
+/* !*color: #cbcbcb;*!*/
+/*}*/
-.sidebar a:hover {
- color: rgb(255, 148, 111);
-}
+/*.sidebar a:hover {*/
+/* color: rgb(255, 148, 111);*/
+/*}*/
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index e8d4ce3..82beb77 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -12,17 +12,19 @@
<!-- <li class="right">娉ㄩ攢<a id="about" class="nav-unselect" onclick="logout()" href="#"></a></li>-->
<!-- </div>-->
<div class="sidebar">
- <ul class="cl-effect-1">
- <li><a id="console" onclick="nav(this.id)" class="nav-select" href="#">涓绘帶鍥�</a></li>
- <li><a id="pipeline" onclick="nav(this.id)" class="nav-unselect" href="#">杈撻�佽澶�</a></li>
- <li><a id="crn" onclick="nav(this.id)" class="nav-unselect" href="#">鍫嗗灈鏈�</a></li>
- </ul>
+ <div class="nav">
+ <ul class="cl-effect-4">
+ <li><a id="render" onclick="nav(this.id)" class="nav-select" href="#">涓绘帶鍥�</a></li>
+ <li><a id="pipeline" onclick="nav(this.id)" class="nav-unselect" href="#">杈撻�佽澶�</a></li>
+ <li><a id="crn" onclick="nav(this.id)" class="nav-unselect" href="#">鍫嗗灈鏈�</a></li>
+ </ul>
+ </div>
</div>
<!--<div style="z-index: 999; position: absolute; top: 250px; left: 900px; width: 200px; height: 200px; opacity: 0.5;background-color: #0000FF">-->
<!--</div>-->
<!-- 涓讳綋鍐呭 -->
-<iframe id="content" src="console.html"></iframe>
+<iframe id="content" src="render.html"></iframe>
<footer class="footer">
Copyright 漏 2015 All Rights Reserved. <a href="http://www.zoneyung.com" target="_blank">娴欐睙涓壃绔嬪簱鎶�鏈湁闄愬叕鍙�</a> 淇濈暀鎵�鏈夋潈鍒�
</footer>
diff --git a/src/main/webapp/views/pipeline.html b/src/main/webapp/views/pipeline.html
index 487bad6..0e2085f 100644
--- a/src/main/webapp/views/pipeline.html
+++ b/src/main/webapp/views/pipeline.html
@@ -124,6 +124,7 @@
<script>
// 鍒濆鍖�
// 绌虹櫧琛屾暟
+ var stop = false
var plcErrorTableBlankRows = 0;
var siteTableBlankRows = 0;
// 瀹為檯琛屾暟
@@ -139,12 +140,18 @@
// 瀹炴椂璁块棶
setInterval(function () {
getPlcError();
- getSite();
+ starGetSite();
}, 1000);
setInterval(function () {
getSiteOutput();
},500);
-
+ function starGetSite() {
+ if (stop) {
+ return
+ } else {
+ getSite();
+ }
+ }
// plc寮傚父淇℃伅琛ㄨ幏鍙�
function getPlcError() {
var tableEl = $('#plc-error-table');
@@ -289,6 +296,7 @@
// 璇︽儏鎿嶄綔 -------------------------------------------------------------------------
var layerDetl;
$(document).on('dblclick ','#site-table tr', function () {
+ stop = false
var siteId = $(this).children("td").eq(0).html();
if (siteId !== null && siteId !== "") {
layerDetl = layer.open({
@@ -317,6 +325,7 @@
}
})
}
+ stop = true
});
$(document).on('click ','#save', function () {
diff --git a/src/main/webapp/views/render/render.css b/src/main/webapp/views/render/render.css
deleted file mode 100644
index ba5d83e..0000000
--- a/src/main/webapp/views/render/render.css
+++ /dev/null
@@ -1,45 +0,0 @@
-* {
- height: 100%;
- width: 100%;
- margin: 0;
- padding: 0;
- overflow: auto;
-}
-#main {
- height: 100%;
- width: 100%;
- background-color: rgb(108,167,168);
-}
-.mapName {
- overflow: hidden;
- width: 20%;
- height: 10%;
- text-align: center;
- line-height: 100px;
- font-size: 40px;
- color: white;
-}
-.rack {
- position: absolute;
- display: inline-block;
-}
-.racks {
- border: 1px solid rgb(194,76,65);
- color: rgb(194,76,65);
-}
-.stn {
- text-align: center;
- background-color: rgb(120,255,129);
- position: absolute;
-}
-.crn {
- position: absolute;
- display: inline-block;
- background-color: #00ff90;
- z-index: 999;
-}
-.track {
- position: absolute;
- display: inline-block;
- background-color: #000000;
-}
\ No newline at end of file
diff --git a/src/main/webapp/views/render/render.html b/src/main/webapp/views/render/render.html
deleted file mode 100644
index 81abdc5..0000000
--- a/src/main/webapp/views/render/render.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <title>鑷姩浠撳簱wcs绯荤粺</title>
- <link rel="stylesheet" href="./render.css">
- <script src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
- <script src="./render.js"></script>
-
-</head>
-<body>
- <div id="main"></div>
-
-
-</body>
-
-</html>
-<script>getMap();</script>
\ No newline at end of file
diff --git a/src/main/webapp/views/render/render.js b/src/main/webapp/views/render/render.js
deleted file mode 100644
index 1c65f12..0000000
--- a/src/main/webapp/views/render/render.js
+++ /dev/null
@@ -1,706 +0,0 @@
-data = {
- "mapName": "鍏嬪姵鏂帥鑿瞁CS",
- "rackCount": 12,
- "crnCount": 3,
- "stbCount": 36,
- "hpPosition": 1,
- "minBayNo": 2,
- "floors": 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": "crane",
- "id": "lb_crn1",
- "text": "1",
- "top": 184,
- "left": 777,
- "width": 93,
- "height": 22
- },
- {
- "type": "crane",
- "id": "lb_crn2",
- "text": "2",
- "top": 378,
- "left": 777,
- "width": 93,
- "height": 22
- },
- {
- "type": "crane",
- "id": "lb_crn3",
- "text": "3",
- "top": 572,
- "left": 777,
- "width": 93,
- "height": 22
- },
- {
- "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
- }
-],
- "stns": [
- {
- "type": "stn",
- "id": "stn132",
- "text": "132",
- "top": 547,
- "left": 1399,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn126",
- "text": "126",
- "top": 450,
- "left": 1461,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn125",
- "text": "125",
- "top": 450,
- "left": 1399,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn119",
- "text": "119",
- "top": 353,
- "left": 1461,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn118",
- "text": "118",
- "top": 353,
- "left": 1399,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn136",
- "text": "136",
- "top": 611,
- "left": 1461,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn135",
- "text": "135",
- "top": 611,
- "left": 1399,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn134",
- "text": "134",
- "top": 611,
- "left": 1337,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn133",
- "text": "133",
- "top": 611,
- "left": 1215,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn130",
- "text": "130",
- "top": 515,
- "left": 1461,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn129",
- "text": "129",
- "top": 515,
- "left": 1399,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn128",
- "text": "128",
- "top": 515,
- "left": 1337,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn127",
- "text": "127",
- "top": 515,
- "left": 1215,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn131",
- "text": "131",
- "top": 515,
- "left": 1522,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn123",
- "text": "123",
- "top": 418,
- "left": 1461,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn122",
- "text": "122",
- "top": 418,
- "left": 1399,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn121",
- "text": "121",
- "top": 418,
- "left": 1337,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn120",
- "text": "120",
- "top": 418,
- "left": 1215,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn124",
- "text": "124",
- "top": 418,
- "left": 1522,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn112",
- "text": "112",
- "top": 256,
- "left": 1461,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn111",
- "text": "111",
- "top": 256,
- "left": 1399,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn116",
- "text": "116",
- "top": 321,
- "left": 1461,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn115",
- "text": "115",
- "top": 321,
- "left": 1399,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn114",
- "text": "114",
- "top": 321,
- "left": 1337,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn113",
- "text": "113",
- "top": 321,
- "left": 1215,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn117",
- "text": "117",
- "top": 321,
- "left": 1522,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn105",
- "text": "105",
- "top": 159,
- "left": 1399,
- "width": 60,
- "height": 63
- },
- {
- "type": "stn",
- "id": "stn109",
- "text": "109",
- "top": 224,
- "left": 1461,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn108",
- "text": "108",
- "top": 224,
- "left": 1399,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn107",
- "text": "107",
- "top": 224,
- "left": 1337,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn106",
- "text": "106",
- "top": 224,
- "left": 1215,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn104",
- "text": "104",
- "top": 128,
- "left": 1461,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn103",
- "text": "103",
- "top": 128,
- "left": 1399,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn102",
- "text": "102",
- "top": 128,
- "left": 1337,
- "width": 60,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn101",
- "text": "101",
- "top": 128,
- "left": 1215,
- "width": 120,
- "height": 30
- },
- {
- "type": "stn",
- "id": "stn110",
- "text": "110",
- "top": 224,
- "left": 1522,
- "width": 60,
- "height": 30
- }
-]
-}
-
-function getMap() {
- let mapName = "<div class='mapName'>" + data.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;
- // 璐ф灦
- for (let i = 0;i < rackss.length;i++) {
- let btn =''
- let btns = ''
- var maxBayNo = rackss[i].maxBayNo
- var minBayNo = rackss[i].minBayNo
- let bLen = maxBayNo / minBayNo
- if (data.hpPosition == 1) {
- for (let j = bLen;j > 0; j--) {
- btn = "<button class='racks' style='width: 34px'>" + maxBayNo + "</button>"
- btns = btns + btn
- maxBayNo = maxBayNo - minBayNo;
- }
- }else {
- for (let j = 0;j < bLen; j++) {
- btn = "<button class='racks' style='width: 30px'>" + minBayNo + "</button>"
- btns = btns + btn
- minBayNo = minBayNo + minBayNo;
- }
- }
-
- rack = "<div class='rack' id='" + rackss[i].id +
- "'style='width:"+ rackss[i].width +
- "px;height: "+ rackss[i].height+
- "px;top: "+ rackss[i].top +
- "px;left: "+ rackss[i].left +
- "px'>" + btns + "</div>"
- racks = racks + rack
- }
- // 璐ф灦鎻忚堪
- for (let i = 0;i < rackDescss.length;i++) {
- rackDesc = "<div class='rack' id='" + rackDescss[i].id +
- "'style='width:"+ rackDescss[i].width +
- "px;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") {
- crn = "<div class='crn' 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>"
- crns = crns + crn
- } else {
- track = "<div class='track' 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>"
- tracks = tracks + track
- }
- }
- // 杈撻�佺嚎
- for (let i = 0;i < stnss.length;i++) {
- stn = "<div class='stn' id='" + stnss[i].id +
- "'style='width:"+ stnss[i].width +
- "px;height: "+ stnss[i].height+
- "px;line-height: "+ stnss[i].height+
- "px;top: "+ stnss[i].top +
- "px;left: "+ stnss[i].left +
- "px'>" + stnss[i].text + "</div>"
- stns = stns + stn
- }
- let whycq = mapName + racks + stns + rackDescs + crns + tracks
- $("#main").append(whycq)
-}
--
Gitblit v1.9.1