智慧园区前端大屏
shuishen
2024-12-03 9eda86f1b33b9d2a95eae89eb7bdb3e99ad745d5
首页内存泄漏优化
4 files modified
45 ■■■■ changed files
src/views/survey/components/box/dataContent.vue 13 ●●●● patch | view | raw | blame | history
src/views/survey/components/box/fireContent.vue 17 ●●●● patch | view | raw | blame | history
src/views/survey/components/box/unitContent.vue 11 ●●●●● patch | view | raw | blame | history
src/views/survey/index.vue 4 ●●●● patch | view | raw | blame | history
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>
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-27 15:37:28
 * @LastEditTime: 2024-12-03 12:57:49
 * @FilePath: \bigScreen\src\views\survey\components\box\fireContent.vue
 * @Description:
 *
@@ -21,9 +21,9 @@
let typeLevel = [
  {
    name: '低',
    name: '暂定',
    itemStyle: {
      color: '#31B5FF'
      color: '#ADADAD'
    }
  },
  {
@@ -47,7 +47,7 @@
  }
]
function getRiskSource() {
function getRiskSource () {
  getRiskSourceStatistic().then(res => {
    let data = res.data.data
    let dataRsult = []
@@ -131,6 +131,15 @@
}
useEchartsResize(echartsResize)
onUnmounted(() => {
  if (myEcharts.chart) {
    myEcharts.chart.clear()
    myEcharts.chart.dispose()
    myEcharts.chart = null
  }
})
</script>
<template>
src/views/survey/components/box/unitContent.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-13 14:54:26
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-28 11:34:00
 * @LastEditTime: 2024-12-03 12:31:17
 * @FilePath: \bigScreen\src\views\survey\components\box\unitContent.vue
 * @Description:
 *
@@ -121,6 +121,15 @@
}
useEchartsResize(echartsResize)
onUnmounted(() => {
  if (myEcharts.chart) {
    myEcharts.chart.clear()
    myEcharts.chart.dispose()
    myEcharts.chart = null
  }
})
</script>
<template>
src/views/survey/index.vue
@@ -2,8 +2,8 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-10 15:27:59
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-13 16:02:07
 * @FilePath: \forest-fire\src\views\statistics\index.vue
 * @LastEditTime: 2024-12-03 12:28:27
 * @FilePath: \bigScreen\src\views\survey\index.vue
 * @Description: 综合设计
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.