From 93ec8c50adfce76322d55b785c7ed08b83bf4654 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 18 十一月 2020 10:54:59 +0800 Subject: [PATCH] # --- src/main/webapp/views/monitor/js/monitor.js | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/views/monitor/js/monitor.js b/src/main/webapp/views/monitor/js/monitor.js index 4f325c8..2cfaaac 100644 --- a/src/main/webapp/views/monitor/js/monitor.js +++ b/src/main/webapp/views/monitor/js/monitor.js @@ -7,9 +7,10 @@ var week = '鏄熸湡涓�'; setInterval(function () { + getOther(); setDate(); initlinChart(); - // initPieChart(); + initPieChart(); }, 1000); function setDate() { @@ -45,3 +46,29 @@ } +/** + * 鑾峰彇鍏朵粬鏁版嵁 + */ +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