From 774af73065b7623a36d384fc6a63b30535868d75 Mon Sep 17 00:00:00 2001
From: zjj <zjj123456>
Date: 星期一, 20 五月 2024 14:10:38 +0800
Subject: [PATCH] #
---
src/main/webapp/views/monitor/js/monitor.js | 49 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/views/monitor/js/monitor.js b/src/main/webapp/views/monitor/js/monitor.js
index 5fc35d8..8dae67e 100644
--- a/src/main/webapp/views/monitor/js/monitor.js
+++ b/src/main/webapp/views/monitor/js/monitor.js
@@ -12,9 +12,9 @@
initPieChart();
}, 1000);
-setInterval(function () {
- getOther();
-}, 500);
+//setInterval(function () {
+// getOther();
+//}, 500);
function setDate() {
getDate();
@@ -53,7 +53,48 @@
* 鑾峰彇鍏朵粬鏁版嵁
*/
function getOther() {
- http.get(baseUrl+"/monitor/other", {crnId: getUrlVal("crnId")}, function (res) {
+ http.get(baseUrl+"/monitor/other", {crnId: getUrlVal("crnId"), ledId: getUrlVal("ledId")}, 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);
+
+ // 涓笂
+ crnChartOption.series[0].data[0].value = res.data.xSpeed - 0; // 璧拌
+ crnChartOption.series[1].data[0].value = res.data.ySpeed - 0; // 鍗囬檷
+ crnChartOption.series[2].data[0].value = res.data.zSpeed - 0; // 鍙夌墮
+ crnChartOption.series[3].data[0].value = res.data.forkPos - 0; // 璐у弶浣嶇疆
+ // crnChartOption.series[0].data[0].value = (Math.random()*100).toFixed(2) - 0;
+ // crnChartOption.series[1].data[0].value = (Math.random()*7).toFixed(2) - 0;
+ // crnChartOption.series[2].data[0].value = (Math.random()*2).toFixed(2) - 0;
+ // crnChartOption.series[3].data[0].value = (Math.random()*2).toFixed(2) - 0;
+ crnChart.setOption(crnChartOption);
+
+ // 涓笅
+ if (res.data.isShow) {
+ $('#banner').hide();
+ $('#led-content').show();
+ $('#led-p-content').text(res.data.content);
+ } else {
+ $('#led-content').hide();
+ $('#banner').show();
+ $('#led-p-content').text("");
+ }
+
+ } else if (res.code === 403){
+ parent.location.href = baseUrl+"/login";
+ } else {
+ layer.msg("杩炴帴鏈嶅姟鍣ㄥけ璐�", {icon: 2});
+ }
+ })
+
+}
+
+function getOther2(crnId,ledId) {
+ http.get(baseUrl+"/monitor/other", {crnId: crnId, ledId: ledId}, function (res) {
if (res.code === 200){
// 宸�
--
Gitblit v1.9.1