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 |   44 ++++++++++++++++++++++++++++++++++++--------
 1 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/src/main/webapp/views/monitor/js/monitor.js b/src/main/webapp/views/monitor/js/monitor.js
index c35e91c..2cfaaac 100644
--- a/src/main/webapp/views/monitor/js/monitor.js
+++ b/src/main/webapp/views/monitor/js/monitor.js
@@ -1,13 +1,16 @@
-var year = null;
-var month = null;
-var day = null;
-var hour = null;
-var minute = null;
-var second = null;
-var week = null;
+var year = '2020';
+var month = '05';
+var day = '01';
+var hour = '08';
+var minute = '00';
+var second = '00';
+var week = '鏄熸湡涓�';
 
 setInterval(function () {
+    getOther();
     setDate();
+    initlinChart();
+    initPieChart();
 }, 1000);
 
 function setDate() {
@@ -43,4 +46,29 @@
 
 }
 
-getDate();
\ No newline at end of file
+/**
+ * 鑾峰彇鍏朵粬鏁版嵁
+ */
+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