智慧园区前端大屏
linwe
2024-12-03 39d91d2b2042e86a45c8b56b53f35d4a8b53b365
src/views/survey/components/box/dataContent.vue
@@ -12,13 +12,13 @@
// import { ref, reactive, onMounted, nextTick, inject } from 'vue'
import { useEchartsResize } from "hooks/useEchartsResize"
import { getRescueTeamStatistic } from "@/api/indParkInfo"
import { nextTick } from "vue"
import { nextTick, onUnmounted } from "vue"
let $echarts = inject("echarts")
const curEcharts = ref(null)
let myEcharts = reactive({
  chart: ''
  chart: null
})
const echartsColors = ['#1E90FF', '#36A2EB', '#FFD700', '#FFA500', '#228B22', '#8FBC8F']
@@ -129,6 +129,15 @@
}
useEchartsResize(echartsResize)
onUnmounted(() => {
  if (myEcharts.chart) {
    myEcharts.chart.clear()
    myEcharts.chart.dispose()
    myEcharts.chart = null
  }
})
</script>
<template>