From 61090cc2a521db18ccfccb2e02a548ceacd03447 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 27 三月 2023 16:59:27 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/monitor.html |   41 ++++++++++++++++++++++++++++++-----------
 1 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/src/main/webapp/views/monitor.html b/src/main/webapp/views/monitor.html
index 1e10315..a4e7186 100644
--- a/src/main/webapp/views/monitor.html
+++ b/src/main/webapp/views/monitor.html
@@ -329,8 +329,8 @@
                         </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" >2鍙锋樉绀哄櫒</label>
-                            <label for=""><input type="checkbox" name="monitor">3鍙锋樉绀哄櫒</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>
@@ -374,6 +374,7 @@
 </body>
 </html>
 <script>
+    var inputValue = ''
     $(function() {
         $(".label").click(function() {
             $(this).addClass("abc").siblings().removeClass("abc");
@@ -391,12 +392,17 @@
     });
     $('#sendMessage').click(function () {
         var sendMessage = $('#sendContent').val()
-        $('input:checkbox[name=monitor]').each(function () {
-            if ($(this).is(':checked')) {
-                console.log(sendMessage)
-            } else {
-                console.log('m')
-            }
+        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)
+                }
+            })
         })
 
     })
@@ -404,7 +410,7 @@
         var sendMessage = 'K'
         $('input:checkbox[name=monitor]').each(function () {
             if ($(this).is(':checked')) {
-                console.log(sendMessage)
+                console.log($(this).find(':checked'))
             } else {
                 console.log('m')
             }
@@ -440,7 +446,7 @@
     });
 
     var crnId = 1;
-    var lcdId = 110;
+    var lcdId = 100;
     var lcdData = 'TEST DATA'
     var lcdControll = 1;
     $('.lcd').click(function () {
@@ -448,7 +454,7 @@
         switch (id) {
             case 1:
                 crnId = 1;
-                lcdId = 113;
+                lcdId = 100;
                 break;
             case 2:
                 crnId = 2;
@@ -465,6 +471,7 @@
         getOther2(crnId,lcdId)
         getInfo(lcdId);
         getError(lcdId);
+        getProgram(lcdId)
     }, 1000);
 
 
@@ -494,6 +501,18 @@
         });
     }
 
+    function getProgram(ledId) {
+        console.log(ledId)
+        $.ajax({
+            url: baseUrl+"/monitor/led/program",
+            data: {ledId:ledId},
+            method: 'GET',
+            success: function (res) {
+                console.log(res)
+            }
+        });
+    }
+
 
 
 

--
Gitblit v1.9.1