From 30438080e4b44e7b5f68c41f66e42fbff99bd021 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 12 八月 2020 10:07:37 +0800
Subject: [PATCH] #
---
src/main/webapp/views/pipeline.html | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/main/webapp/views/pipeline.html b/src/main/webapp/views/pipeline.html
index 34a483c..96ba05f 100644
--- a/src/main/webapp/views/pipeline.html
+++ b/src/main/webapp/views/pipeline.html
@@ -84,8 +84,6 @@
// 瀹為檯琛屾暟
var plcErrorTableFullRows = 0;
var siteTableFullRows = 0;
-
-
var outputDom = document.getElementById("output");
$(document).ready(function() {
initPlcErrorTable();
@@ -99,7 +97,7 @@
getSite();
}, 1000);
setInterval(function () {
- output("\n" +new Date().toLocaleString() + "銆�2020-5-29 13:14:22銆戞壂鎻弍lcA 鐩爣绔�--27328372372832763643234323432342");
+ getSiteOutput();
},500);
@@ -121,7 +119,7 @@
tr.children("td").eq(2).html(table[i-1].error);
}
} else if (res.code === 403){
- top.location.href = baseUrl+"/login";
+ window.location.href = baseUrl+"/login";
} else {
alert(res.msg);
}
@@ -132,7 +130,6 @@
// 绔欑偣淇℃伅琛ㄨ幏鍙�
function getSite() {
var tableEl = $('#site-table');
- // tableEl.children("tr").children("td").html("");
$.ajax({
url: baseUrl+ "/site/table/site",
headers: {'token': localStorage.getItem('token')},
@@ -169,7 +166,7 @@
// tr.children("td").eq(9).html(table[i-1].staNo);
}
} else if (res.code === 403){
- top.location.href = baseUrl+"/login";
+ window.location.href = baseUrl+"/login";
} else {
alert(res.msg);
}
@@ -177,6 +174,24 @@
});
}
+ // 杈撻�佽澶囨棩蹇楄緭鍑�
+ function getSiteOutput() {
+ $.ajax({
+ url: baseUrl + "/site/output/site",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ output(res.data);
+ } else if (res.code === 403) {
+ window.location.href = baseUrl + "/login";
+ } else {
+ alert(res.msg);
+ }
+ }
+ })
+ }
+
// 鏃ュ織杈撳嚭妗�
function output(content){
outputDom.value += content;
--
Gitblit v1.9.1