From 761dc97c8ac017e5d57b331f7bcf3cfaf1ca1159 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Fri, 08 Nov 2024 15:44:06 +0800
Subject: [PATCH] fix: 无人机轨迹修改

---
 src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue b/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue
index a44c3d4..adb2650 100644
--- a/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue
+++ b/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue
@@ -1,5 +1,8 @@
 <template>
-  <div :class="className" :style="{ height: height, width: width }" />
+  <div
+    :class="className"
+    :style="{ height: height, width: width }"
+  />
 </template>
 
 <script>
@@ -28,7 +31,7 @@
       default: () => []
     }
   },
-  data() {
+  data () {
     return {
       chart: null,
       seriesData: []
@@ -36,7 +39,7 @@
   },
   watch: {
     'chartData': {
-      handler(newVal) {
+      handler (newVal) {
         console.log('newVal', newVal)
         this.seriesData = []
         this.seriesData = newVal
@@ -48,12 +51,12 @@
       immediate: true
     }
   },
-  mounted() {
+  mounted () {
     this.$nextTick(() => {
       this.initChart()
     })
   },
-  beforeDestroy() {
+  beforeDestroy () {
     if (!this.chart) {
       return
     }
@@ -61,11 +64,12 @@
     this.chart = null
   },
   methods: {
-    initChart() {
+    initChart () {
       this.chart = echarts.init(this.$el, 'macarons')
+      this.chart.clear()
       this.setOptions()
     },
-    setOptions() {
+    setOptions () {
       // function fontSize(res) {
       //     let clientWidth =
       //         window.innerWidth ||
@@ -96,7 +100,7 @@
                   fontSize: 16
                 },
                 value: {
-                  width: 20,
+                  width: 100,
                   align: 'right',
                   fontFamily: 'Medium',
                   fontSize: 16
@@ -147,4 +151,3 @@
   }
 }
 </script>
-

--
Gitblit v1.8.0