From 30dea6cb47cd52c8a9857ed5be71bac1c86e7225 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 18 十一月 2020 17:27:15 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/monitor/monitor.html |   80 +++++++++++++++++++++++----------------
 1 files changed, 47 insertions(+), 33 deletions(-)

diff --git a/src/main/webapp/views/monitor/monitor.html b/src/main/webapp/views/monitor/monitor.html
index 7747c00..22a3fac 100644
--- a/src/main/webapp/views/monitor/monitor.html
+++ b/src/main/webapp/views/monitor/monitor.html
@@ -395,10 +395,10 @@
         },
         series: [
             {
-                name: '閫熷害',
+                name: '璧拌閫熷害',
                 type: 'gauge',
                 min: 0,
-                max: 220,
+                max: 110,
                 splitNumber: 11,
                 radius: '50%',
                 axisLine: {            // 鍧愭爣杞寸嚎
@@ -458,17 +458,17 @@
                         color: '#fff'
                     }
                 },
-                data: [{value: 40, name: 'km/h'}]
+                data: [{value: 40, name: 'm/min'}]
             },
             {
-                name: '杞��',
+                name: '鍗囬檷閫熷害',
                 type: 'gauge',
                 center: ['25%', '55%'],    // 榛樿鍏ㄥ眬灞呬腑
                 radius: '30%',
                 min: 0,
-                max: 7,
-                endAngle: 45,
-                splitNumber: 7,
+                max: 30,
+                endAngle: 30,
+                splitNumber: 6,
                 axisLine: {            // 鍧愭爣杞寸嚎
                     lineStyle: {       // 灞炴�ineStyle鎺у埗绾挎潯鏍峰紡
                         color: [[0.29, 'lime'], [0.86, '#1e90ff'], [1, '#ff4500']],
@@ -529,15 +529,16 @@
                         color: '#fff'
                     }
                 },
-                data: [{value: 1.5, name: 'x1000 r/min'}]
+                data: [{value: 1.5, name: 'm/min'}]
             },
+            // 璐у弶鏈�澶ч�熷害锛�3.鍑犵背
             {
-                name: '娌硅〃',
+                name: '璐у弶閫熷害',
                 type: 'gauge',
                 center: ['75%', '50%'],    // 榛樿鍏ㄥ眬灞呬腑
                 radius: '30%',
                 min: 0,
-                max: 2,
+                max: 4,
                 startAngle: 135,
                 endAngle: 45,
                 splitNumber: 2,
@@ -678,7 +679,7 @@
         xAxis: {
             type: 'category',
             boundaryGap: false,
-            data: ['1', '2', '3', '4', '5', '6', '7'],
+            data:  ['1', '2', '3', '4', '5', '6', '7'],
             axisLabel: {
                 textStyle:{
                     color:'#aaa',  //鍧愭爣鐨勫瓧浣撻鑹�
@@ -712,45 +713,58 @@
             }
 
         },
-        series: [{
-            data: [820, 932, 901, 934, 1290, 1330, 1320],
-            type: 'line',
-            areaStyle: {
-                color: '#7494ae' // 鎶樼嚎鍖哄煙棰滆壊
+        series: [
+            {
+                data: [820, 932, 901, 934, 1290, 1330, 1320],
+                type: 'line',
+                // areaStyle: {
+                //     color: '#7494ae' // 鎶樼嚎鍖哄煙棰滆壊
+                // },
+                itemStyle:{
+                    normal:{
+                        color:'#3590ac', //鎶樼偣棰滆壊
+                        lineStyle:{
+                            color:'#3590ac' //鎶樼嚎棰滆壊
+                        }
+                    }
+                }
             },
-            itemStyle:{
-                normal:{
-                    color:'#3590ac', //鎶樼偣棰滆壊
-                    lineStyle:{
-                        color:'#3590ac' //鎶樼嚎棰滆壊
+            {
+                data: [820, 932, 901, 934, 1290, 1330, 1320],
+                type: 'line',
+                // areaStyle: {
+                //     color: '#d55b35' // 鎶樼嚎鍖哄煙棰滆壊
+                // },
+                itemStyle:{
+                    normal:{
+                        color:'#0cbad9', //鎶樼偣棰滆壊
+                        lineStyle:{
+                            color:'#07a093' //鎶樼嚎棰滆壊
+                        }
                     }
                 }
             }
-        }]
+        ]
     };
 
     // 璁块棶閲忔姤琛ㄥ姞杞�
     function initlinChart() {
         var reportView = lineChartOption;
-        var xAxisDate = [];
-        var seriesDate=[];
         $.ajax({
-            url: baseUrl+"/monitor/pakin/rep",
+            url: baseUrl+"/monitor/line/charts",
             method: 'GET',
             success: function (res) {
                 if (res.code === 200){
-                    var json = res.data;
-                    for (var i = 0; i < json.length; i++) {
-                        xAxisDate[i]=json[i].node;
-                        seriesDate[i]=json[i].val;
-                    }
-                    reportView.xAxis.data=xAxisDate;
-                    reportView.series[0].data=seriesDate;
+                    var json = res.data.rows;
+                    reportView.xAxis.data=[getDateFormat(-11), getDateFormat(-10), getDateFormat(-9), getDateFormat(-8), getDateFormat(-7), getDateFormat(-6),
+                        getDateFormat(-5), getDateFormat(-4), getDateFormat(-3), getDateFormat(-2), getDateFormat(-1), getDateFormat(-0)];
+                    reportView.series[0].data=res.data.rows[0].data;
+                    reportView.series[1].data=res.data.rows[1].data;
                     lineCharts.setOption(reportView)
                 } else if (res.code === 403){
                     top.location.href = "/";
                 } else {
-                    layer.msg(res.msg);
+                    console.log(res.msg);
                 }
             }
         });

--
Gitblit v1.9.1