From c350b737713fe518c22036dfc9a2574bcafcb15c Mon Sep 17 00:00:00 2001 From: vincent <1341870251@qq.com> Date: 星期二, 02 六月 2020 15:18:08 +0800 Subject: [PATCH] # --- src/main/webapp/views/crn.html | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/views/crn.html b/src/main/webapp/views/crn.html index ac5eb55..6eb1082 100644 --- a/src/main/webapp/views/crn.html +++ b/src/main/webapp/views/crn.html @@ -163,7 +163,6 @@ </div> </body> <script> - // 绌虹櫧琛屾暟 var crnStateTableBlankRows = 0; var crnMsgTableBlankRows = 0; @@ -182,11 +181,33 @@ setInterval(function () { getCrnStateInfo(); getCrnMsgInfo(); + getCommandLog(); },1000); setInterval(function () { getSiteOutput(); },500); + // 鑾峰彇鍫嗗灈鏈烘墽琛屼腑鐨勫懡浠� + function getCommandLog() { + $.ajax({ + url: baseUrl + "/crn/command/ongoing", + headers: {'token': localStorage.getItem('token')}, + method: 'POST', + success: function (res) { + if (res.code === 200) { + var commands = res.data; + for (var i=0; i<commands.length;i++){ + $("#crn"+commands[i].crnNo).val(commands[i].command); + } + } else if (res.code === 403) { + top.location.href = baseUrl + "/login"; + } else { + alert(res.msg); + } + } + }) + } + // 鍫嗗灈鏈轰俊鎭〃鑾峰彇 ---- 琛ㄤ竴 function getCrnStateInfo() { -- Gitblit v1.9.1