From 17a81d641608545682e3f79f7c6090cac48fe81a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 15 Sep 2025 18:10:01 +0800
Subject: [PATCH] feat:去除高亮

---
 src/views/survey/components/box/fireContent.vue |   48 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/src/views/survey/components/box/fireContent.vue b/src/views/survey/components/box/fireContent.vue
index 523b548..c6239bd 100644
--- a/src/views/survey/components/box/fireContent.vue
+++ b/src/views/survey/components/box/fireContent.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-11-04 16:32:04
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-05 17:42:44
+ * @LastEditTime: 2025-01-12 01:00:02
  * @FilePath: \bigScreen\src\views\survey\components\box\fireContent.vue
  * @Description:
  *
@@ -15,51 +15,52 @@
 let $echarts = inject('echarts')
 const curEcharts = ref(null)
 
-let myEcharts = reactive(null)
+let myEcharts = reactive({
+  chart: ''
+})
 
 let typeLevel = [
   {
-    name: '低',
+    name: '其他',
     itemStyle: {
-      color: '#31B5FF'
+      color: '#ADADAD'
     }
   },
   {
     name: '一般',
     itemStyle: {
-      color: '#FFC000'
+      color: '#FFFF00'
     }
   },
   {
     name: '较大',
     itemStyle: {
-
-      color: '#F4090F'
+      color: '#FFA500'
     }
   },
   {
     name: '重大',
     itemStyle: {
-      color: '#FE0000'
+      color: '#FF0000'
     }
   }
 ]
 
-function getRiskSource() {
+function getRiskSource () {
   getRiskSourceStatistic().then(res => {
     let data = res.data.data
     let dataRsult = []
-    var total = 0;
+    var total = 0
     data.forEach(item => {
       dataRsult.push({
         name: item.riskLevel,
         value: item.num,
         itemStyle: typeLevel.find(i => i.name == item.riskLevel).itemStyle
       })
-      total = total + item.num;
+      total = total + item.num
     })
 
-    myEcharts.setOption({
+    myEcharts.chart.setOption({
       title: {
         text: "总数",
         subtext: String(total),
@@ -80,7 +81,7 @@
 
       legend: {
         orient: "vertical",
-        top: "5%",
+        top: "40%",
         left: "5%",
         textStyle: {
           color: "#fff",
@@ -106,7 +107,13 @@
           left: '-5%',
           radius: ['45%', '75%'],
           data: dataRsult,
-          left: "25%"
+          left: "25%",
+          label: {
+            show: false,
+          },
+          labelLine: {
+            show: false,
+          },
         }
       ]
     })
@@ -114,15 +121,24 @@
 }
 
 nextTick(() => {
-  myEcharts = $echarts.init(curEcharts.value)
+  myEcharts.chart = $echarts.init(curEcharts.value)
   getRiskSource()
 })
 
 const echartsResize = () => {
-  myEcharts && myEcharts.resize()
+  myEcharts.chart && myEcharts.chart.resize()
 }
 
 useEchartsResize(echartsResize)
+
+onUnmounted(() => {
+  if (myEcharts.chart) {
+    myEcharts.chart.clear()
+    myEcharts.chart.dispose()
+
+    myEcharts.chart = null
+  }
+})
 </script>
 
 <template>

--
Gitblit v1.9.3