From 3fc96f06985fe61b51aa200a6821f795ee9671c0 Mon Sep 17 00:00:00 2001
From: 18516761980 <56479841@qq.com>
Date: 星期三, 22 六月 2022 12:50:43 +0800
Subject: [PATCH] #

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

diff --git a/src/main/webapp/views/pipeline.html b/src/main/webapp/views/pipeline.html
index 487bad6..01be111 100644
--- a/src/main/webapp/views/pipeline.html
+++ b/src/main/webapp/views/pipeline.html
@@ -59,9 +59,10 @@
             <!-- 绔欑偣鐘舵�佹暟鎹洃鎺х増 -->
             <div id="site-monitor" class="main-board">
                 <!-- 琛ㄦ牸 -->
-                <table id="site-table">
+                <!--鍥哄畾琛ㄥご table 鍔爐able-layout: fixed;  th 鍔� position:sticky;top: 0;-->
+                <table id="site-table" style="table-layout: fixed;">
                     <!-- 琛ㄥご -->
-                    <thead>
+                    <thead style="position:sticky;top: 0;">
                     <tr>
                         <th>绔欏彿</th>
                         <th>宸ヤ綔鍙�</th>
@@ -72,6 +73,7 @@
                         <th>鍏ュ簱鏍囪</th>
                         <th>绌烘澘淇″彿</th>
                         <th>鐩爣绔�</th>
+                        <th>楂樹綆搴撲綅</th>
                     </tr>
                     </thead>
                     <!-- 琛ㄦ牸鍐呭 -->
@@ -118,12 +120,11 @@
     </div>
 
 </div>
-
-
 </body>
 <script>
     // 鍒濆鍖�
     // 绌虹櫧琛屾暟
+    var stop = false
     var plcErrorTableBlankRows = 0;
     var siteTableBlankRows = 0;
     // 瀹為檯琛屾暟
@@ -139,12 +140,18 @@
     // 瀹炴椂璁块棶
     setInterval(function () {
         getPlcError();
-        getSite();
+        starGetSite();
     }, 1000);
     setInterval(function () {
         getSiteOutput();
     },500);
-
+    function starGetSite() {
+        if (stop) {
+            return
+        } else {
+            getSite();
+        }
+    }
     // plc寮傚父淇℃伅琛ㄨ幏鍙�
     function getPlcError() {
         var tableEl = $('#plc-error-table');
@@ -196,6 +203,7 @@
                         setVal(tr.children("td").eq(6), table[i-1].pakMk);
                         setVal(tr.children("td").eq(7), table[i-1].emptyMk);
                         setVal(tr.children("td").eq(8), table[i-1].staNo);
+                        setVal(tr.children("td").eq(9), table[i-1].locType1);
                     }
                 } else if (res.code === 403){
                     window.location.href = baseUrl+"/login";
@@ -281,6 +289,7 @@
                 "       <td></td>\n" +
                 "       <td></td>\n" +
                 "       <td></td>\n" +
+                "       <td></td>\n" +
                 "     </tr>\n";
         }
         $('#site-table tbody').after(html);
@@ -289,6 +298,7 @@
     // 璇︽儏鎿嶄綔 -------------------------------------------------------------------------
     var layerDetl;
     $(document).on('dblclick ','#site-table tr', function () {
+        stop = true
         var siteId = $(this).children("td").eq(0).html();
         if (siteId !== null && siteId !== "") {
             layerDetl = layer.open({
@@ -314,9 +324,11 @@
                     $('#workNo').val("");
                     $('#staNo').val("");
                     $('#pakMk').val("");
+                    stop = false
                 }
             })
         }
+
     });
 
     $(document).on('click ','#save', function () {

--
Gitblit v1.9.1