#
vincent
2020-06-02 2997f60bcb60e3960ae6665cb5dfa97be2fedfd0
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】扫描plcA 目标站--27328372372832763643234323432342");
        getSiteOutput();
    },500);
@@ -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')},
@@ -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) {
                    top.location.href = baseUrl + "/login";
                } else {
                    alert(res.msg);
                }
            }
        })
    }
    // 日志输出框
    function output(content){
        outputDom.value += content;