From 035331e18802456a070b61a01b1466f59d43a29d Mon Sep 17 00:00:00 2001
From: lsh <lsh123456>
Date: 星期二, 07 三月 2023 14:16:50 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/ste.html |  119 ++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 60 insertions(+), 59 deletions(-)

diff --git a/src/main/webapp/views/ste.html b/src/main/webapp/views/ste.html
index 6c031f3..14a025d 100644
--- a/src/main/webapp/views/ste.html
+++ b/src/main/webapp/views/ste.html
@@ -24,27 +24,7 @@
                     <div data-steNo="1" class="ste-command-item">
                         <label>1#</label>
                         <button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
-                        <button id="mode-1" class="demoBtn mode-btn" > - </button>
-                    </div>
-                    <div data-steNo="2" class="ste-command-item">
-                        <label>2#</label>
-                        <button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
-                        <button id="mode-2" class="demoBtn mode-btn" > - </button>
-                    </div>
-                    <div data-steNo="3" class="ste-command-item">
-                        <label>3#</label>
-                        <button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
-                        <button id="mode-3" class="demoBtn mode-btn" > - </button>
-                    </div>
-                    <div data-steNo="4" class="ste-command-item">
-                        <label>4#</label>
-                        <button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
-                        <button id="mode-4" class="demoBtn mode-btn" > - </button>
-                    </div>
-                    <div data-steNo="5" class="ste-command-item">
-                        <label>5#</label>
-                        <button class="demoBtn pos-btn">鏁版嵁缁存姢</button>
-                        <button id="mode-5" class="demoBtn mode-btn" > - </button>
+                        <button id="mode-1" class="demoBtn mode-btn" >璁惧淇℃伅</button>
                     </div>
                 </div>
                 <!-- 鍫嗗灈鏈虹姸鎬佷綅淇℃伅 -->
@@ -109,10 +89,6 @@
                         <span class="select-title">绌挎杞﹀彿</span>
                         <div class="select-container">
                             <label><input type="radio" name="steSelect" value="1" checked>&nbsp;1鍙风┛姊溅</label>
-                            <label><input type="radio" name="steSelect" value="2">&nbsp;2鍙风┛姊溅</label>
-                            <label><input type="radio" name="steSelect" value="3">&nbsp;3鍙风┛姊溅</label>
-                            <label><input type="radio" name="steSelect" value="4">&nbsp;4鍙风┛姊溅</label>
-                            <label><input type="radio" name="steSelect" value="5">&nbsp;5鍙风┛姊溅</label>
                         </div>
                     </div>
                 </div>
@@ -123,21 +99,21 @@
                         <div class="button-group">
                             <button class="item" onclick="steOperator(99)">鑱旀満</button>
                             <button class="item" onclick="steOperator(100)">鑴辨満</button>
-                            <button class="item" onclick="steOperator(2)">鍚戝乏鍑哄簱</button>
                             <button class="item" onclick="steOperator(1)">鍚戝彸鍑哄簱</button>
-                            <button class="item" onclick="steOperator(4)">浠庡乏鍏ュ簱</button>
+                            <button class="item" onclick="steOperator(2)">鍚戝乏鍑哄簱</button>
                             <button class="item" onclick="steOperator(3)">浠庡彸鍏ュ簱</button>
+                            <button class="item" onclick="steOperator(4)">浠庡乏鍏ュ簱</button>
                             <button class="item" onclick="steOperator(5)">宸︾Щ搴�</button>
                             <button class="item" onclick="steOperator(6)">鍙崇Щ搴�</button>
-                            <button class="item" onclick="steOperator(7)">鍘诲乏绔�</button>
-                            <button class="item" onclick="steOperator(8)">鍘诲彸绔�</button>
-                            <button class="item" onclick="steOperator(9)">宸﹀緟鏈�</button>
-                            <button class="item" onclick="steOperator(10)">鍙冲緟鏈�</button>
+                            <button class="item" onclick="steOperator(7)">鍘诲彸绔�</button>
+                            <button class="item" onclick="steOperator(8)">鍘诲乏绔�</button>
+                            <button class="item" onclick="steOperator(9)">鍙冲緟鏈�</button>
+                            <button class="item" onclick="steOperator(10)">宸﹀緟鏈�</button>
 <!--                            <button class="item" onclick="steOperator(11)">宸︽惉绉�</button>-->
 <!--                            <button class="item" onclick="steOperator(12)">鍙虫惉绉�</button>-->
-                            <button class="item" onclick="steOperator(13)">宸﹀厖鐢�</button>
-                            <button class="item" onclick="steOperator(14)">鍙冲厖鐢�</button>
-                            <button class="item" onclick="steOperator(17)">鏂紑鍏呯數</button>
+<!--                            <button class="item" onclick="steOperator(13)">宸﹀厖鐢�</button>-->
+<!--                            <button class="item" onclick="steOperator(14)">鍙冲厖鐢�</button>-->
+<!--                            <button class="item" onclick="steOperator(17)">鏂紑鍏呯數</button>-->
 <!--                            <button class="item" onclick="steOperator(14)">宸︾洏鐐�</button>-->
 <!--                            <button class="item" onclick="steOperator(15)">鍙崇洏鐐�</button>-->
                             <button class="item" onclick="steOperator(16)">浠诲姟瀹屾垚</button>
@@ -281,33 +257,58 @@
         })
     })
 
+    var layerIdx0;
     $(document).on('click ','.mode-btn', function () {
         let steNo = Number($(this).parent().attr("data-steNo"));
-        layer.confirm("鏀瑰彉" + steNo + ' 鍙风┛姊溅鍦ㄧ嚎鐘舵�佸悧锛�', function(){
-            var index = layer.load(1, {
-                shade: [0.1,'#fff']
-            });
-            $.ajax({
-                url: baseUrl+ "/ste/mode/switch",
-                headers: {'token': localStorage.getItem('token')},
-                data: {
-                    steNo: Number(steNo),
-                    password: 'root'
-                },
-                method: 'POST',
-                success: function (res) {
-                    layer.close(index);
-                    if (res.code === 200){
-                        layer.msg(res.msg, {icon: 1});
-                    } else if (res.code === 403){
-                        window.location.href = baseUrl+"/login";
-                    }  else {
-                        layer.msg(res.msg, {icon: 2});
-                    }
-                }
-            });
-        });
+        layerIdx0 = layer.open({
+            type: 1,
+            title: false,
+            shadeClose: true,
+            offset: [$(this).offset().top + 30 + 'px', $(this).offset().left + 'px'],
+            anim: 5,
+            shade: [0],
+            area: ['310px', '370px'],
+            closeBtn: 0,
+            content: $("#ste-detl"),
+            success: function(layero, index){
+                http.get(baseUrl+ "/ste/sensor/detl/"+steNo, null, function (res) {
+                    $('#steNo').val(steNo);
+
+                })
+            },
+            end: function () {
+                $('#steNo').val("");
+            }
+        })
     })
+
+    // $(document).on('click ','.mode-btn', function () {
+    //     let steNo = Number($(this).parent().attr("data-steNo"));
+    //     layer.confirm("鏀瑰彉" + steNo + ' 鍙风┛姊溅鍦ㄧ嚎鐘舵�佸悧锛�', function(){
+    //         var index = layer.load(1, {
+    //             shade: [0.1,'#fff']
+    //         });
+    //         $.ajax({
+    //             url: baseUrl+ "/ste/mode/switch",
+    //             headers: {'token': localStorage.getItem('token')},
+    //             data: {
+    //                 steNo: Number(steNo),
+    //                 password: 'root'
+    //             },
+    //             method: 'POST',
+    //             success: function (res) {
+    //                 layer.close(index);
+    //                 if (res.code === 200){
+    //                     layer.msg(res.msg, {icon: 1});
+    //                 } else if (res.code === 403){
+    //                     window.location.href = baseUrl+"/login";
+    //                 }  else {
+    //                     layer.msg(res.msg, {icon: 2});
+    //                 }
+    //             }
+    //         });
+    //     });
+    // })
 
 
 
@@ -345,7 +346,7 @@
                         steStateTableFullRows = table.length;
                     }
                     for (let i=1;i<=table.length;i++){
-                        $("#mode-"+table[i-1].steNo).html(table[i-1].statusVal===0?'鑱旀満':'鑴辨満');
+                        // $("#mode-"+table[i-1].steNo).html(table[i-1].statusVal===0?'鑱旀満':'鑴辨満');
                         let tr = tableEl.find("tr").eq(i);
                         setVal(tr.children("td").eq(0), table[i-1].steNo);
                         setVal(tr.children("td").eq(1), table[i-1].statusType);

--
Gitblit v1.9.1