From b4946988c1cdcb33f0d3c27154f61aec512b5aca Mon Sep 17 00:00:00 2001
From: zhangshuaibao <15731629597@163.com>
Date: 星期三, 14 四月 2021 15:15:48 +0800
Subject: [PATCH] 图标信息

---
 src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue |  102 +++++++++++++++++++++++++-------------------------
 1 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue b/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
index fbd04d6..05f8f76 100644
--- a/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
+++ b/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
@@ -3,9 +3,9 @@
   <div id="Tab">
     <div class="animation">
       <div class="infomation">
-        <span class="grid-content">COD : <i style="color: #e8ee0b">11.24385</i> 鏍囧噯 : 50</span>
-        <span class="grid-content">姘哀 :<i style="color: #e8ee0b">0.1889014</i>  鏍囧噯 : 30</span>
-        <span class="grid-content">鎬荤7 : <i style="color: #e8ee0b">0.03812287</i> 鏍囧噯 : 5</span>
+        <span class="grid-content">COD : <i style="color: #e8ee0b">11.24385</i> 鏍囧噯 : <i style="color: #fff">50</i>></span>
+        <span class="grid-content">姘哀 :<i style="color: #e8ee0b">0.1889014</i>  鏍囧噯 : <i style="color: #fff">30</i></span>
+        <span class="grid-content">鎬荤7 : <i style="color: #e8ee0b">0.03812287</i> 鏍囧噯 : <i style="color: #fff">5</i></span>
         <span class="grid-content">搴熸按娴侀噺 : <i style="color: #e8ee0b">32.16287</i></span>
       </div>
     </div>
@@ -250,14 +250,16 @@
     }
   },
   mounted () {
-    this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
+    // this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss')
+    // this.formInline.timeStart = dayjs().subtract(1, 'minute').format('YYYY-MM-DD HH:mm:ss')
+    // this.DrawEXHRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
   },
   methods: {
     onSubmit () {
       this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
     },
     DrawRealTimeDateChart (id, title, legend, ydatas, yname) {
-      this.RealTimeChart = this.$echarts.init(this.$refs.main)
+      this.RealTimeChart = this.$echarts.init(this.$refs.echarts)
       var serLists = []
       for (var i = 0; i < ydatas.length; i++) {
         // var zdcbcolor = ydatas[i].zdcbcolor
@@ -272,20 +274,20 @@
             itemStyle: {
               normal: {
                 color: function (c) { // 鏍规嵁value 鏄剧ず涓嶅悓鐨勬姌鐐归鑹�
-                  /* var biaozhuiz
-                  for (var i = 0; i < bzzList.length; i++) {
-                    if (bzzList[i].name == c.seriesName) {
-                      biaozhuiz = bzzList[i].bzhui
-                    }
-                  }
-                  if (c.value[1] > biaozhuiz) {
-                    return zdcbcolor
-                  } else if (c.value[1] > biaozhuiz * 0.9) {
-                    return '#FFA500'
-                  }
-                  {
-                    return '#33c95f'
-                  } */
+                  // var biaozhuiz
+                  // for (var i = 0; i < bzzList.length; i++) {
+                  //   if (bzzList[i].name == c.seriesName) {
+                  //     biaozhuiz = bzzList[i].bzhui
+                  //   }
+                  // }
+                  // if (c.value[1] > biaozhuiz) {
+                  //   return zdcbcolor
+                  // } else if (c.value[1] > biaozhuiz * 0.9) {
+                  //   return '#FFA500'
+                  // }
+                  // {
+                  //   return '#33c95f'
+                  // }
                 },
                 lineStyle: { // 鎶樼嚎鐨勯鑹�
                   color: ydatas[i].zxcolor,
@@ -348,7 +350,7 @@
           }
         }
 
-        if (ydatas[i].name === '搴熸按娴侀噺' || ydatas[i].name === '搴熸按') {
+        if (ydatas[i].name === '搴熸皵娴侀噺' || ydatas[i].name === '搴熸皵') {
           obj.yAxisIndex = 1
         }
         serLists.push(obj)
@@ -374,19 +376,29 @@
               var seriesName = params[i].seriesName
               // 鍊�
               var value = params[i].value[1]
-              var valueFliter = this.formatter(value)
+
+              var valueFliter = formatter(value)
+
               var maker = params[i].marker
-              if (seriesName === 'COD') {
-                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#fff21c;"></span>'
-              } else if (seriesName === '姘ㄦ爱') {
-                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#00B0F0;"></span>'
-              } else if (seriesName === '鎬荤7') {
-                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#f48183;"></span>'
-              } else if (seriesName === '鎬绘爱') {
-                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#d9f2f4;"></span>'
-              } else {
-                maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#9ACD32;"></span>'
+              var colo = ''
+              switch (seriesName) {
+                case 'COD':
+                  colo = '#fff21c'
+                  break
+                case '姘ㄦ爱':
+                  colo = '#00B0F0'
+                  break
+                case '鎬荤7':
+                  colo = '#f48183'
+                  break
+                case '鎬绘爱':
+                  colo = '#e0ffff'
+                  break
+                default:
+                  colo = '#9ACD32'
+                  break
               }
+              maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + colo + ';"></span>'
               s += maker + seriesName + ':' + valueFliter + '<br />'
             }
             return s
@@ -399,7 +411,9 @@
           }
         },
         grid: { // 缃戞牸
-          top: '20%'
+          top: '20%',
+          left: '7%',
+          bottom: '10%'
         },
         legend: {
           data: legend
@@ -425,9 +439,6 @@
         xAxis: { // x 杞磋缃�
           type: 'time',
           boundaryGap: false,
-          nameTextStyle: {
-            fontSize: 15
-          },
           axisLabel: { // x杞村叏閮ㄦ樉绀�
             // rotate: 30,
             margin: 6,
@@ -457,8 +468,7 @@
           type: 'value',
           name: yname,
           max: function (value) {
-            var ma = value.max > 100 ? value.max : 100
-            return parseInt(ma)
+            return parseInt(value.max + 30)
           },
           axisLabel: {
             formatter: '{value}',
@@ -493,6 +503,9 @@
           splitLine: {
             show: false
           }, // y杞� 缃戞牸绾夸笉鏄剧ず,
+          // inverse: true,
+          // nameLocation: 'start',
+          // max:500,
           axisLine: {
             lineStyle: {
               color: '#FFFFFF',
@@ -578,20 +591,7 @@
           }
         }
         RealTimeChart.setOption(op)
-      })
-    },
-    drawChart: function () {
-      window.onresize = function () {
-        var h1 = document.documentElement.clientHeight// 鑾峰彇灞忓箷鐨勯珮搴�
-        if (h1 > 700) {
-          this.myChart.getDom().style.height = 3 + 'rem'
-          this.myChart.getDom().style.width = 6 + 'rem'
-        } else {
-          this.myChart.getDom().style.height = 3 + 'rem'
-          this.myChart.getDom().style.width = 6 + 'rem'
-        }
-        this.myChart.resize()
-      } */
+      }) */
     }
   }
 }

--
Gitblit v1.8.0