From 1726998f8afa838f782f340bb3a2a30773f2b0cc Mon Sep 17 00:00:00 2001 From: vincent <1341870251@qq.com> Date: 星期二, 02 六月 2020 10:47:46 +0800 Subject: [PATCH] # --- src/main/webapp/views/pipeline.html | 47 ++++++++++++++++++++++++++--------------------- 1 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/main/webapp/views/pipeline.html b/src/main/webapp/views/pipeline.html index 8c90b9e..9d8c117 100644 --- a/src/main/webapp/views/pipeline.html +++ b/src/main/webapp/views/pipeline.html @@ -417,30 +417,19 @@ // 鍒濆鍖� var plcErrorTableFieldCount = 0; var outputDom = document.getElementById("output"); + $(document).ready(function() { + initPlcErrorTable(); + getPlcError(); + }); // 瀹炴椂璁块棶 setInterval(function () { getPlcError(); }, 1000); + setInterval(function () { + output("\n" +new Date().toLocaleString() + "銆�2020-5-29 13:14:22銆戞壂鎻弍lcA 鐩爣绔�--27328372372832763643234323432342"); + },500); - // 绌虹櫧琛ㄦ牸娓叉煋 - $(document).ready(function() { - var one = $('#plc-error-table thead').height(); - var total = $('.plc-log-body').height(); - var count = total / one; - count = parseInt(count); - plcErrorTableFieldCount = count - 1; - var html = ""; - for (var i = 0; i < count-1; i ++){ - html += " <tr>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " </tr>\n"; - } - $('#plc-error-table tbody').after(html); - getPlcError(); - }); // plc寮傚父淇℃伅琛ㄨ幏鍙� function getPlcError() { @@ -473,10 +462,26 @@ outputDom.value += content; outputDom.scrollTop = outputDom.scrollHeight; } - setInterval(function () { - output("\n" +new Date().toLocaleString() + "銆�2020-5-29 13:14:22銆戞壂鎻弍lcA 鐩爣绔�--27328372372832763643234323432342"); - },500); + // ------------------------------------------------------------------------------------------------ + + // plc寮傚父绌虹櫧琛ㄦ牸娓叉煋 + function initPlcErrorTable() { + var one = $('#plc-error-table thead').height(); + var total = $('.plc-log-body').height(); + var count = total / one; + count = parseInt(count); + plcErrorTableFieldCount = count - 1; + var html = ""; + for (var i = 0; i < count-1; i ++){ + html += " <tr>\n" + + " <td></td>\n" + + " <td></td>\n" + + " <td></td>\n" + + " </tr>\n"; + } + $('#plc-error-table tbody').after(html); + } </script> </html> \ No newline at end of file -- Gitblit v1.9.1