From f3acb8ce787f3df0eda633031473be4e6a9ff448 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 12 十月 2023 16:56:28 +0800
Subject: [PATCH] 油烟 更新了实时监控页面

---
 src/sfc/ExceptionTypeLineChart.vue |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/src/sfc/ExceptionTypeLineChart.vue b/src/sfc/ExceptionTypeLineChart.vue
index 316d062..75576f2 100644
--- a/src/sfc/ExceptionTypeLineChart.vue
+++ b/src/sfc/ExceptionTypeLineChart.vue
@@ -2,7 +2,11 @@
 瀛愮粍浠舵湁鍩烘湰鐨勬牱寮� 
 浣跨敤鍚屼竴涓浘褰㈠疄渚嬶紝鎺ュ彈鐖剁粍浠朵紶鍏ョ殑鎶樼嚎鍥緊ption
 **鐖剁粍浠�
-
+ <ExceptionTypeLineChart
+        :option="option"
+        :is-open-dialog="centerDialogVisible"
+        v-loading="chartLoading"
+      ></ExceptionTypeLineChart>
  -->
 <template>
   <div  id="main" class="line-chart"></div>
@@ -21,7 +25,8 @@
     },
     isOpenDialog:{
       type:Boolean
-    }
+    },
+
   },
   data() {
     return {
@@ -29,6 +34,8 @@
     };
   },
   mounted() {
+     // 鑾峰彇椤甸潰瀹藉害鐨勪竴鍗�
+     
     this.initChart();
     this.chart.clear
     this.chart.setOption(this.option,true)
@@ -44,8 +51,7 @@
     },
     isOpenDialog(){
       window.addEventListener('resize', this.resizeChart);
-      console.log('璋冪敤浜�');
-    }
+    },
   },
   beforeUnmount() {
     if (this.chart) {
@@ -97,7 +103,12 @@
 
     // 璺熼〉闈㈠搷搴斿紡鍙樺寲
     resizeChart() {
-      this.chart.resize();
+      this.$nextTick(() => {
+        if (this.chart) {
+          this.chart.resize();
+        }
+      });
+      // this.chart.resize();
     }
   }
 };
@@ -106,10 +117,10 @@
 
 <style>
 .line-chart {
-  width: 100%;
+  width:920px;
   height: 300px;
   margin-bottom: 20px;
-  margin-left: 10px;
-  min-width: 350px;
+  /* margin-left: 10px; */
+  min-width: 600px;
 }
 </style>

--
Gitblit v1.9.3