zjj
2024-05-24 92ac16fad20cbd4c0035501ef04605bdb960fc18
src/main/webapp/views/realtimeWatch/console.html
@@ -503,6 +503,7 @@
    // 初始化
    getSitesInfo();
    getCrnInfo();
    getHoistInfo();
    getSystemRunningStatus();
    getBarcodeInfo();
    getScaleInfo();
@@ -515,6 +516,7 @@
    }, 1000);
    setInterval(function () {
        getSitesInfo();
        getHoistInfo();
    }, 3000);
    // 系统运行开关
@@ -664,6 +666,27 @@
    }
    // 扫码器实时数据获取
    function getHoistInfo() {
        $.ajax({
            url: baseUrl + "/console/latest/data/hoist",
            headers: {'token': localStorage.getItem('token')},
            method: 'POST',
            success: function (res) {
                if (res.code === 200) {
                    var hoists = res.data;
                    for (var i = 0; i < hoists.length; i++) {
                        $("#hoist-"+hoists[i].hoistId).html(hoists[i].place ? hoists[i].place : "--");
                    }
                } else if (res.code === 403) {
                    parent.location.href = baseUrl + "/login";
                } else {
                    console.log(res.msg);
                }
            }
        });
    }
    // 扫码器实时数据获取
    function getBarcodeInfo() {
        $.ajax({
            url: baseUrl + "/console/latest/data/barcode",