From d0391dba3708d3f32bcd94e1881d1b598a0d9ef0 Mon Sep 17 00:00:00 2001
From: zhangshuaibao <15731629597@163.com>
Date: 星期四, 15 四月 2021 17:21:10 +0800
Subject: [PATCH] 修改图表问题

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

diff --git a/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue b/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
index aa37207..fffd525 100644
--- a/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
+++ b/src/components/BaseNav/PublicBounced/common/echarts/EChartsRealWasteWater.vue
@@ -344,14 +344,19 @@
     this.formInline.timeStart = dayjs().subtract(1, 'minute').format('YYYY-MM-DD HH:mm:ss')
     // console.log(this.formInline.timeStart)
     // console.log(this.JsonRealWasteWater.ydatas[0].data[0].value[0])
-    this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
+  },
+  updated () {
+    this.DrawRealTimeDateChart()
   },
   methods: {
     onSubmit () {
-      this.DrawRealTimeDateChart(this.JsonRealWasteWater.id, this.JsonRealWasteWater.title, this.JsonRealWasteWater.legend, this.JsonRealWasteWater.ydatas, this.JsonRealWasteWater.yname)
+      this.DrawRealTimeDateChart()
     },
     // 鐢诲簾姘存姌绾垮浘--瀹炴椂鏁版嵁
-    DrawRealTimeDateChart (id, title, legend, ydatas, yname) {
+    DrawRealTimeDateChart () {
+      var legend = this.JsonRealWasteWater.legend
+      var ydatas = this.JsonRealWasteWater.ydatas
+      var yname = this.JsonRealWasteWater.yname
       this.RealTimeChart = this.$echarts.init(this.$refs.main)
       var serLists = []
       for (var i = 0; i < ydatas.length; i++) {

--
Gitblit v1.8.0