#
luxiaotao1123
2020-11-17 90ffa7515c367e9be9a2c41e954757898ad2df94
src/main/webapp/views/monitor/js/monitor.js
@@ -7,7 +7,10 @@
var week = '星期一';
setInterval(function () {
    getOther();
    setDate();
    initlinChart();
    initPieChart();
}, 1000);
function setDate() {
@@ -42,3 +45,28 @@
    })
}
/**
 * 获取其他数据
 */
function getOther() {
    http.get(baseUrl+"/monitor/other", {crnId: getUrlVal("crnId")}, function (res) {
        if (res.code === 200){
            $('#totalLoc').text(res.data.totalLoc);
            $('#totalWrk').text(res.data.totalWrk);
            $('#xSpeed').text(res.data.xSpeed);
            $('#ySpeed').text(res.data.ySpeed);
            // 计数动画
            $('.counter').countUp();
        } else if (res.code === 403){
            parent.location.href = baseUrl+"/login";
        }  else {
            layer.msg("连接服务器失败", {icon: 2});
        }
    })
}