fix:地图图例,数据栏右上角切换清空选择框绑定,病害弹窗功能完善

This commit is contained in:
2024-10-29 14:46:32 +08:00
parent b768ae8d4b
commit fe0d8f9b54
9 changed files with 208 additions and 58 deletions
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 10:19:56
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-24 16:37:52
* @LastEditTime: 2024-10-29 13:43:38
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\disease-current.vue
* @Description: 病害巡检-病害三维饼图
-->
@@ -73,12 +73,15 @@ export default {
],
// echart数据
dataList: [],
// echart实例
chart: "",
};
},
watch: {
select: {
handler(val) {
if (val) {
this.itemSelect = "";
this.getCurrentList();
this.getChartList();
}
@@ -132,8 +135,11 @@ export default {
drawChart() {
const data = this.dataList;
if (this.$refs.currentChart) {
const chart = echarts.init(this.$refs.currentChart);
chart.setOption({
if (this.chart) {
this.chart.dispose();
}
this.chart = echarts.init(this.$refs.currentChart);
this.chart.setOption({
legend: {
show: false,
},
@@ -193,7 +199,7 @@ export default {
series: this.getPie3D(this.dataList, 0.8),
});
window.addEventListener("resize", () => {
chart.resize();
this.chart.resize();
});
}
},