diff --git a/web/src/components/Home/Alarm.vue b/web/src/components/Home/Alarm.vue index 1ac9f99..6b8da47 100644 --- a/web/src/components/Home/Alarm.vue +++ b/web/src/components/Home/Alarm.vue @@ -93,8 +93,11 @@ export default { }, mounted() {}, beforeUnmount() { - this.faultChart = null window.removeEventListener('resize', this.handleResize) + if (this.faultChart) { + this.faultChart.dispose() + this.faultChart = null + } }, methods: { @@ -130,6 +133,9 @@ export default { drawLineChart(activeKey) { this.getChargeData(activeKey) + if(this.faultChart){ + this.faultChart.dispose() + } const chartDom = document.getElementById('alarm-chart') let faultChart = this.$echarts.init(chartDom) this.faultChart = faultChart diff --git a/web/src/components/Home/Charge.vue b/web/src/components/Home/Charge.vue index 6d56dc0..a839e57 100644 --- a/web/src/components/Home/Charge.vue +++ b/web/src/components/Home/Charge.vue @@ -154,7 +154,6 @@ export default { }, drawLineChart(activeKey) { - console.log(this.$refs.charge) // const labelCount = Math.floor(500 / 30); this.getChargeData(activeKey) if(this.chargeChart){ diff --git a/web/src/views/system/service.vue b/web/src/views/system/service.vue index 18e5072..54d576f 100644 --- a/web/src/views/system/service.vue +++ b/web/src/views/system/service.vue @@ -58,7 +58,7 @@ export default { props: {}, data() { return { - tableData:[], + tableData: [], tableOption: { select: false @@ -243,10 +243,9 @@ export default { diff --git a/web/vue.config.js b/web/vue.config.js index 00aa3e2..56dc2c6 100644 --- a/web/vue.config.js +++ b/web/vue.config.js @@ -14,7 +14,7 @@ module.exports = defineConfig({ proxy: { '/api': { // 代理前缀,可以自定义(如 '/api') - target: 'http://192.168.0.187:19801', // 目标服务器地址 + target: 'http://192.168.0.187:19800', // 目标服务器地址 changeOrigin: true, // 是否改变请求源(跨域必备) pathRewrite: { '^/api': '' // 重写路径,去掉 '/api' 前缀