From 17282e0f87c44b925c1b1c073c65be2370d0a274 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期二, 05 十二月 2023 15:51:45 +0800 Subject: [PATCH] 设备负荷组件切换时间的问题修改 --- src/views/cockpitPage/components/DeviceChart.vue | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/cockpitPage/components/DeviceChart.vue b/src/views/cockpitPage/components/DeviceChart.vue index faf08b0..530e342 100644 --- a/src/views/cockpitPage/components/DeviceChart.vue +++ b/src/views/cockpitPage/components/DeviceChart.vue @@ -50,7 +50,7 @@ }, watch: { "chartData.datay"(val) { - console.log(val, "ddddddddddddddd"); + console.log(val, "璁惧鍙樻洿鏁版嵁"); this.ydata = val; this.startValue = 0; this.endValue = 5; @@ -64,14 +64,17 @@ //鍦ㄨ亴 pieChart(chartName, data) { let that = this; + let chartDomTwo = this.$refs[chartName]; + let myChartTwo = echarts.init(chartDomTwo) + myChartTwo.dispose() let chartDom = this.$refs[chartName]; - if (myChart != null && myChart != "" && myChart != undefined) { - console.log("222222222"); - myChart.dispose(); //閿�姣� - myChart.resize(); - } - console.log(myChart, "ssssssss"); myChart = echarts.init(chartDom); + // if (myChart != null && myChart != "" && myChart != undefined) { + // console.log("222222222"); + // myChart.dispose(); //閿�姣� + // myChart.resize(); + // } + // console.log(myChart, "ssssssss"); let option; let lineColor = "#35ddc74d"; if (this.ydata) { -- Gitblit v1.8.0