自动化立体仓库 - WCS系统
#
luxiaotao1123
2020-11-17 f215a22829d7301535af73e02f91a9ad718e1b22
#
4个文件已修改
46 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/MonitorController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/monitor/js/monitor.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/monitor/monitor.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MonitorController.java
@@ -9,6 +9,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
@@ -48,12 +49,13 @@
     * 获取其他信息
     */
    @GetMapping("/other")
    public R monitorOther() {
    public R monitorOther(@RequestParam("crnId") Integer crnId) {
        return R.ok(
//                Cools.add("year", calendar.get(Calendar.YEAR))
        );
        ).add(crnId);
    }
    /**
src/main/webapp/static/js/common.js
@@ -157,3 +157,15 @@
        return http
    }) : "object" == typeof module && module.exports ? module.exports = http : n.http = http
}(this);
/**
 * 获取url键值对
 */
function getUrlVal(key) {
    var reg = new RegExp('(^|&)' + key + '=([^&]*)(&|$)', 'i');
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
        return unescape(r[2]);
    }
    return null;
}
src/main/webapp/views/monitor/js/monitor.js
@@ -7,6 +7,7 @@
var week = '星期一';
setInterval(function () {
    getOther();
    setDate();
    initlinChart();
    initPieChart();
@@ -45,3 +46,20 @@
}
/**
 * 获取其他数据
 */
function getOther() {
    http.get(baseUrl+"/monitor/other", {crnId: getUrlVal("crnId")}, function (res) {
        if (res.code === 200){
            console.log(res);
        } else if (res.code === 403){
            parent.location.href = baseUrl+"/login";
        }  else {
            layer.msg("连接服务器失败", {icon: 2});
        }
    })
}
src/main/webapp/views/monitor/monitor.html
@@ -358,15 +358,9 @@
            //,anim: 'updown' //切换动画方式
        });
    });
    $('.counter').countUp();
    //  遮罩
    let closeBtn = document.getElementById('closeBtn');
    let detailModal = document.getElementById('detail-modal');
    closeBtn.onclick = function () {
        detailModal.style.display = 'none';
    };
    var data = [];
    // 计数动画
    $('.counter').countUp();
    /***********************************************************************************/
    /************************************* 折线图 ***************************************/