From 01a2d01abeadef5488a100ddf58a22dbcf7b95d6 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期二, 23 四月 2024 20:18:03 +0800
Subject: [PATCH] #
---
src/main/webapp/views/monitor.html | 227 ++++++++++++++++++++++++++++----------------------------
1 files changed, 114 insertions(+), 113 deletions(-)
diff --git a/src/main/webapp/views/monitor.html b/src/main/webapp/views/monitor.html
index a4e7186..d4b9aef 100644
--- a/src/main/webapp/views/monitor.html
+++ b/src/main/webapp/views/monitor.html
@@ -33,25 +33,37 @@
<div style="padding: 10px;height: 100%">
<div style="width: 100%;height: 100%;">
<div class="head">
- <label id="lcd-1" class="label lcd">LCD1</label>
- <label id="lcd-2" class="label lcd">LCD2</label>
- <label id="lcd-3" class="label lcd">LCD3</label>
+ <label id="lcd-100" class="label lcd">LCD1</label>
+ <label id="lcd-110" class="label lcd">LCD2</label>
+ <label id="lcd-113" class="label lcd">LCD3</label>
</div>
<div class="body">
<!--<div class="time-tools">-->
<!-- <span id="bar-year"></span>-<span id="bar-month"></span>-<span id="bar-day"></span> <span id="bar-hour"></span>:<span id="bar-minute"></span>:<span id="bar-second"></span> <span id="bar-week"></span>-->
<!--</div>-->
- <div class="canves1">
- <div style="width: 25%;height: 100%;font-size: 30px;display: flex;flex-direction: column;justify-content: space-around;display: none">
- <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱琛岃蛋锛�10869绫�</div>
- <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱琛岃蛋锛�10869绫�</div>
- <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱琛岃蛋锛�10869绫�</div>
- <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱琛岃蛋锛�10869绫�</div>
+ <div class="canves1 aData">
+ <div style="width: 25%;height: 100%;font-size: 30px;display: flex;flex-direction: column;justify-content: space-around;">
+ <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱璧拌璺濈锛�<span id="xDistance"></span>绫�</div>
+ <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱鍗囬檷璺濈锛�<span id="yDistance"></span>绫�</div>
+ <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱璧拌鏃堕暱锛�<span id="xDuration"></span>绉�</div>
+ <div style="width: 100%;height: 100px;line-height: 100px;text-align: center">绱鍗囬檷鏃堕暱锛�<span id="yDuration"></span>绉�</div>
</div>
- <div id="ledData" style="width: 50%;height: 100%;font-size: 30px;display: flex;flex-direction: column;justify-content: space-around;background-color: #93D1FF;text-align: center;display: none">
+ <div id="ledData" style="width: 50%;height: 100%;font-size: 30px;display: flex;flex-direction: column;justify-content: space-around;background-color: #93D1FF;text-align: center;">
AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM
</div>
- <div id="ledData1" style="width: 100%;height: 100%;font-size: 30px;display: flex;flex-direction: column;background-color: #93D1FF;">
+ <div style="width: 25%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
+ <div style="width: 80%;height: 40%">
+ <div id="line-charts"></div>
+ </div>
+ <div style="width: 80%;height: 40%">
+ <div id="pie-charts"></div>
+ </div>
+ </div>
+
+ </div>
+ <div class="canves1 bData">
+ <!--灞曠ず鍑哄簱淇℃伅-->
+ <div id="ledData4" style="width: 100%;height: 100%;font-size: 30px;display: flex;flex-direction: column;background-color: #93D1FF;display: none">
<div class="info-head">
<!--澶撮儴-->
<div style="flex: 2">鎵樼洏鐮�:80001289</div>
@@ -66,14 +78,6 @@
<div style="flex: 2">瑗跨摐</div>
<div style="flex: 2">500g</div>
<div style="flex: 1">30</div>
- </div>
- </div>
- <div style="width: 25%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;display: none">
- <div style="width: 80%;height: 40%">
- <div id="line-charts"></div>
- </div>
- <div style="width: 80%;height: 40%">
- <div id="pie-charts"></div>
</div>
</div>
</div>
@@ -112,7 +116,7 @@
<img src="monitor/img/a1.png">
<div class="info-detail">
<div class="real-data">
- <i class="count" id="xDistance">0</i>
+ <i class="count" id="xDistance0">0</i>
<span class="unit">m</span>
</div>
<div class="content">绱璧拌璺濈(绫�)</div>
@@ -122,7 +126,7 @@
<img src="monitor/img/b1.png">
<div class="info-detail">
<div class="real-data">
- <i class="count" id="yDistance">0</i>
+ <i class="count" id="yDistance0">0</i>
<span class="unit">m</span>
</div>
<div class="content">绱鍗囬檷璺濈(绫�)</div>
@@ -132,7 +136,7 @@
<img src="monitor/img/c1.png">
<div class="info-detail">
<div class="real-data">
- <i class="count" id="xDuration">0</i>
+ <i class="count" id="xDuration0">0</i>
<span class="unit">s</span>
</div>
<div class="content">绱璧拌鏃堕暱(绉�)</div>
@@ -142,7 +146,7 @@
<img src="monitor/img/d1.png">
<div class="info-detail">
<div class="real-data">
- <i class="count" id="yDuration">0</i>
+ <i class="count" id="yDuration0">0</i>
<span class="unit">s</span>
</div>
<div class="content">绱鍗囬檷鏃堕暱(绉�)</div>
@@ -154,7 +158,7 @@
<div class="image-border image-border2"></div>
<div class="image-border image-border3"></div>
<div class="image-border image-border4"></div>
- <span>娴欐睙涓壃绔嬪簱鎶�鏈湁闄愬叕鍙�</span>
+ <span>绫冲</span>
<img src="../static/images/barcode.png">
</div>
</div>
@@ -328,34 +332,9 @@
<button id="unSelectAll">鍙栨秷鍏ㄩ��</button>
</div>
<div id="checked" style="overflow-y: scroll;height: 80%;border: 1px solid #888" >
- <label for=""><input type="checkbox" name="monitor" checked="checked" value="1">1鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor" value="113">2鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor" value="3">3鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor">4鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor">5鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor">6鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor">7鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor">1鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox" name="monitor">2鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">3鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">4鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">5鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">6鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">7鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">1鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">2鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">3鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">4鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">5鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">6鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">7鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">1鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">2鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">3鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">4鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">5鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">6鍙锋樉绀哄櫒</label>
- <label for=""><input type="checkbox">7鍙锋樉绀哄櫒</label>
+ <label for=""><input type="checkbox" name="monitor" checked="checked" value="100">1鍙锋樉绀哄櫒</label>
+ <label for=""><input type="checkbox" name="monitor" value="110">2鍙锋樉绀哄櫒</label>
+ <label for=""><input type="checkbox" name="monitor" value="113">3鍙锋樉绀哄櫒</label>
</div>
</div>
<!--鏂囨湰鍐呭-->
@@ -374,52 +353,6 @@
</body>
</html>
<script>
- var inputValue = ''
- $(function() {
- $(".label").click(function() {
- $(this).addClass("abc").siblings().removeClass("abc");
- });
- });
- $("#selectAll").click(function(){
- $('input:checkbox[name=monitor]').each(function () {
- $(this).prop("checked",true);
- })
- });
- $("#unSelectAll").click(function(){
- $('input:checkbox[name=monitor]').each(function () {
- $(this).prop("checked",false);
- })
- });
- $('#sendMessage').click(function () {
- var sendMessage = $('#sendContent').val()
- inputValue = ''
- $('input:checkbox[name=monitor]:checked').each(function () {
- var ledId = parseInt($(this).val())
- $.ajax({
- url: baseUrl+"/monitor/led/add/program",
- data: {ledId:ledId,msg:sendMessage},
- method: 'GET',
- success: function (res) {
- console.log(res)
- }
- })
- })
-
- })
- $('#removeMessage').click(function () {
- var sendMessage = 'K'
- $('input:checkbox[name=monitor]').each(function () {
- if ($(this).is(':checked')) {
- console.log($(this).find(':checked'))
- } else {
- console.log('m')
- }
- })
-
- })
-</script>
-<script>
-
layui.use(['element', 'carousel'], function(){
var carousel = layui.carousel;
var element = layui.element;
@@ -452,18 +385,75 @@
$('.lcd').click(function () {
var id = this.id.split("-")[1];
switch (id) {
- case 1:
+ case '100':
crnId = 1;
lcdId = 100;
break;
- case 2:
- crnId = 2;
+ case '110':
+ crnId = 1;
lcdId = 110;
+ break;
+ case '113':
+ crnId = 2;
+ lcdId = 113;
break;
}
getOther2(crnId,lcdId)
})
+ // lcd鍒囨崲鎸夐挳
+ $(function() {
+ $(".label").click(function() {
+ $(this).addClass("abc").siblings().removeClass("abc");
+ });
+ });
+ // 鍏ㄩ�夋寜閽�
+ $("#selectAll").click(function(){
+ $('input:checkbox[name=monitor]').each(function () {
+ $(this).prop("checked",true);
+ })
+ });
+ // 鍙栨秷鍏ㄩ�夋寜閽�
+ $("#unSelectAll").click(function(){
+ $('input:checkbox[name=monitor]').each(function () {
+ $(this).prop("checked",false);
+ })
+ });
+ // 鍙戦�佽妭鐩寜閽�
+ $('#sendMessage').click(function () {
+ var sendMessage = $('#sendContent').val()
+ $('input:checkbox[name=monitor]:checked').each(function () {
+ var ledId = parseInt($(this).val())
+ console.log(typeof ledId,ledId,sendMessage)
+ $.ajax({
+ url: baseUrl+"/monitor/led/add/program",
+ data: {ledId:ledId,msg:sendMessage},
+ method: 'GET',
+ success: function (res) {
+ console.log(res)
+ }
+ })
+ })
+
+ })
+ // 绉婚櫎鑺傜洰鎸夐挳
+ $('#removeMessage').click(function () {
+ var sendMessage = ''
+ inputValue = ''
+ $('input:checkbox[name=monitor]:checked').each(function () {
+ var ledId = parseInt($(this).val())
+ console.log(ledId)
+ $.ajax({
+ url: baseUrl+"/monitor/led/add/program",
+ data: {ledId:ledId,msg:sendMessage},
+ method: 'GET',
+ success: function (res) {
+ console.log(res)
+ }
+ })
+ })
+
+ })
setInterval(function () {
setDate();
initlineChart();
@@ -474,48 +464,59 @@
getProgram(lcdId)
}, 1000);
-
+ // 鍑哄簱淇℃伅
function getInfo(ledId) {
$.ajax({
url: baseUrl+"/monitor/led",
data: {ledId:ledId},
method: 'GET',
success: function (res) {
- if (lcdControll == 3) {
- $('#ledData')
+ if (lcdControll < 3) {
+ $('.aData').attr('display','none')
+ $('.bData').attr('display','flex')
}
}
});
}
+ // 寮傚父淇℃伅
function getError(ledId) {
$.ajax({
url: baseUrl+"/monitor/led/error",
data: {ledId:ledId},
method: 'GET',
success: function (res) {
- if (lcdControll == 2) {
- $('#ledData').text(res.data)
+ if (lcdControll < 4) {
+ if (res.data == null) {
+ lcdControll = 0
+ } else {
+ lcdControll = 3
+ $('.bData').attr('display','none')
+ $('.aData').attr('display','flex')
+ $('#ledData').text(res.data)
+ }
}
}
});
}
-
+ // 鑺傜洰淇℃伅
function getProgram(ledId) {
- console.log(ledId)
$.ajax({
url: baseUrl+"/monitor/led/program",
data: {ledId:ledId},
method: 'GET',
success: function (res) {
- console.log(res)
+ if (res.data != '') {
+ lcdControll = 4
+ $('.bData').attr('display','none')
+ $('.aData').attr('display','flex')
+ $('#ledData').text(res.data)
+ } else {
+ lcdControll = 0
+ }
}
});
}
-
-
-
-
/***********************************************************************************/
/************************************ 鍫嗗灈鏈洪�熷害 *************************************/
--
Gitblit v1.9.1