From 9268216bd60942e53fb42b1b7e88c7ae78fa92d2 Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期二, 13 四月 2021 11:09:57 +0800
Subject: [PATCH] 废气图表

---
 src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue |   54 +++++++++++++++++++++++++-----------------------------
 1 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
index d613182..2dd2517 100644
--- a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
+++ b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
@@ -141,24 +141,20 @@
       }
     }
   },
+  // mounted () {
+  //   // this.$nextTick(() => {
+  //   //   console.log(1)
+  //   this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype)
+  //   // }
+  // },
   methods: {
     onSubmit () {
-      console.log(1)
-
-      // const date = [this.value1, this.value2, this.formInline.region]
+      console.log(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype)
       this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype)
-      // console.log(date)
-      // if (date) {
-      //   var date1 = new Date(date)
-      //   date1 = new Date(date1.getTime() - (8 * 3600000))
-      //   console.log(date1)
-      // var dateUtil = new DateUtil()
-      // var datePkg = dateUtil.getTowDate(date1, "a", 24 * 3600000 - 1);
-      // var datatype = 2;
     },
     CreateChart: function (id, title, legend, xdata, ydatas, yname, jcdID, datatype) {
       this.myChart = this.$echarts.init(this.$refs.main)
-      this.myChart.clear()
+      // this.myChart.clear()
       var dataUnit = ''
       if (datatype === 1) {
         dataUnit = '姘旈噺(m鲁/d)'
@@ -309,9 +305,10 @@
               var valueFliter
               if (value === 'NaN') {
                 valueFliter = ''
-              } else {
-                // valueFliter = formatter(value)
               }
+              // else {
+              //   // valueFliter = formatter(value)
+              // }
               var maker = params[i].marker
               if (seriesName === '浜屾哀鍖栫~') {
                 maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#fff21c;"></span>'
@@ -342,6 +339,7 @@
         },
         legend: { // 鍥句緥
           data: legend
+          // color:
         },
         dataZoom: [{
           type: 'inside',
@@ -524,23 +522,21 @@
         }
         // createDivByMouse("s",params.event);
       }) */
-    },
-    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()
-      }
     }
-
+    // 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()
+    //   }
+    // }
   }
-
 }
 </script>
 

--
Gitblit v1.8.0