From 4f47d0af9617511e475879eff74e7788a429d9fd Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期五, 27 五月 2022 14:55:19 +0800
Subject: [PATCH] # ycq

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

diff --git a/src/main/webapp/views/pipeline.html b/src/main/webapp/views/pipeline.html
index 487bad6..56decc6 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>
@@ -118,12 +119,11 @@
     </div>
 
 </div>
-
-
 </body>
 <script>
     // 鍒濆鍖�
     // 绌虹櫧琛屾暟
+    var stop = false
     var plcErrorTableBlankRows = 0;
     var siteTableBlankRows = 0;
     // 瀹為檯琛屾暟
@@ -139,12 +139,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');
@@ -289,6 +295,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 +321,11 @@
                     $('#workNo').val("");
                     $('#staNo').val("");
                     $('#pakMk').val("");
+                    stop = false
                 }
             })
         }
+
     });
 
     $(document).on('click ','#save', function () {

--
Gitblit v1.9.1