From dfd17535bff020595da0f7b98a9d12cf5318a8e6 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 18 十一月 2020 10:55:47 +0800 Subject: [PATCH] # --- src/main/webapp/views/monitor/js/monitor.js | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/src/main/webapp/views/monitor/js/monitor.js b/src/main/webapp/views/monitor/js/monitor.js index 18cf17d..2cfaaac 100644 --- a/src/main/webapp/views/monitor/js/monitor.js +++ b/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,30 @@ }) } + +/** + * 鑾峰彇鍏朵粬鏁版嵁 + */ +function getOther() { + http.get(baseUrl+"/monitor/other", {crnId: getUrlVal("crnId")}, function (res) { + if (res.code === 200){ + + $('#xDistance').text(res.data.xDistance); + $('#yDistance').text(res.data.yDistance); + $('#xDuration').text(res.data.xDuration); + $('#yDuration').text(res.data.yDuration); + + $('#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}); + } + }) + +} + -- Gitblit v1.9.1