From acabc19b58ebdfd71fdd3e9a279989005e7c9e79 Mon Sep 17 00:00:00 2001
From: TQS <56479841@qq.com>
Date: 星期五, 02 十二月 2022 15:16:45 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/pipeline.html |   47 ++++++++++++++++++++++++-----------------------
 1 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/src/main/webapp/views/pipeline.html b/src/main/webapp/views/pipeline.html
index 8361771..6415b2f 100644
--- a/src/main/webapp/views/pipeline.html
+++ b/src/main/webapp/views/pipeline.html
@@ -73,13 +73,12 @@
                             </div>
                         </fieldset>
                     </div>
-
-                    <div>
-                        <span style="color: #1E9FFF">PLC寮傚父淇℃伅琛�:</span>
-                    </div>
                 </div>
                 <!-- 涓讳綋 -->
                 <div class="plc-log-body">
+                    <div>
+                        <span style="color: #1E9FFF">PLC寮傚父淇℃伅琛�:</span>
+                    </div>
                     <table id="plc-error-table">
                         <thead>
                         <tr>
@@ -215,26 +214,28 @@
         if (ioModeData != null && ioModeData.length > 1) {
             ioModeData.forEach(function(e) {
                 if (e.floor === Number(floor)) {
-                    if (e.modeVal === 3 || e.modeVal === 4) {
-                        layer.confirm('纭畾鍒囨崲涓哄叆搴撴ā寮忓悧锛�',function () {
-                            $.ajax({
-                                url: baseUrl+ "/site/io/mode/action/site",
-                                headers: {'token': localStorage.getItem('token')},
-                                data: {floor: e.floor},
-                                method: 'POST',
-                                success: function (res) {
-                                    if (res.code === 200){
-                                        layer.msg("鏆傛椂涓嶈兘鍒囨崲锛�", {icon: 1})
-                                    } else if (res.code === 403){
-                                        window.location.href = baseUrl+"/login";
-                                    }  else {
-                                        console.log(res.msg);
-                                    }
+                    console.log()
+                    layer.confirm('纭畾鍒囨崲鍏呯數鐘舵�佸悧锛�',function () {
+                        $.ajax({
+                            url: baseUrl+ "/site/io/mode/action/site",
+                            headers: {'token': localStorage.getItem('token')},
+                            data: {
+                                floor: e.floor,
+                                charge: !e.modeVal
+                            },
+                            method: 'POST',
+                            success: function (res) {
+                                if (res.code === 200){
+                                    layer.msg("鎿嶄綔鎴愬姛锛岃鑰愬績绛夊緟涓�鍒嗛挓", {icon: 1})
+                                } else if (res.code === 403){
+                                    window.location.href = baseUrl+"/login";
+                                }  else {
+                                    console.log(res.msg);
                                 }
-                            });
-                            layer.closeAll();
-                        })
-                    }
+                            }
+                        });
+                        layer.closeAll();
+                    })
                 }
             });
         }

--
Gitblit v1.9.1