| | |
| | | // 实际行数 |
| | | var plcErrorTableFullRows = 0; |
| | | var siteTableFullRows = 0; |
| | | |
| | | |
| | | var outputDom = document.getElementById("output"); |
| | | $(document).ready(function() { |
| | | initPlcErrorTable(); |
| | |
| | | getSite(); |
| | | }, 1000); |
| | | setInterval(function () { |
| | | output("\n" +new Date().toLocaleString() + "【2020-5-29 13:14:22】扫描plcA 目标站--27328372372832763643234323432342"); |
| | | getSiteOutput(); |
| | | },500); |
| | | |
| | | |
| | |
| | | // 站点信息表获取 |
| | | function getSite() { |
| | | var tableEl = $('#site-table'); |
| | | // tableEl.children("tr").children("td").html(""); |
| | | $.ajax({ |
| | | url: baseUrl+ "/site/table/site", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | }); |
| | | } |
| | | |
| | | // 输送设备日志输出 |
| | | 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) { |
| | | top.location.href = baseUrl + "/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 日志输出框 |
| | | function output(content){ |
| | | outputDom.value += content; |