From 44f10e71d146093d1a90afb13c0cb1af930349f4 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 29 三月 2023 09:10:14 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/monitor.html |   74 ++++++++++++++++++++++++------------
 1 files changed, 49 insertions(+), 25 deletions(-)

diff --git a/src/main/webapp/views/monitor.html b/src/main/webapp/views/monitor.html
index 03b7593..4f4606c 100644
--- a/src/main/webapp/views/monitor.html
+++ b/src/main/webapp/views/monitor.html
@@ -41,17 +41,29 @@
                     <!--<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>&nbsp;&nbsp;<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 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">绱琛岃蛋锛�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>
-                        <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>
@@ -355,21 +359,25 @@
 </html>
 <script>
     var inputValue = ''
+    // 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()
         inputValue = ''
@@ -386,6 +394,7 @@
         })
 
     })
+    // 绉婚櫎鑺傜洰鎸夐挳
     $('#removeMessage').click(function () {
         var sendMessage = 'K'
         $('input:checkbox[name=monitor]').each(function () {
@@ -432,11 +441,11 @@
     $('.lcd').click(function () {
         var id = this.id.split("-")[1];
         switch (id) {
-            case 1:
+            case '1':
                 crnId = 1;
                 lcdId = 100;
                 break;
-            case 2:
+            case '2':
                 crnId = 2;
                 lcdId = 110;
                 break;
@@ -454,48 +463,63 @@
         getProgram(lcdId)
     }, 1000);
 
-
+    // 鍑哄簱淇℃伅
     function getInfo(ledId) {
+        console.log(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')
+
                 }
             }
         });
     }
 
+    // 寮傚父淇℃伅
     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)
+                        console.log('**')
+                    }
                 }
             }
         });
     }
-
+    // 鑺傜洰淇℃伅
     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
+                    console.log("2222")
+                }
             }
         });
     }
-
-
-
-
 
     /***********************************************************************************/
     /************************************ 鍫嗗灈鏈洪�熷害 *************************************/

--
Gitblit v1.9.1