diff --git a/back/src/views/modules/workBench/components/dept-chart-view.vue b/back/src/views/modules/workBench/components/dept-chart-view.vue index 79291918..e7a95a2e 100644 --- a/back/src/views/modules/workBench/components/dept-chart-view.vue +++ b/back/src/views/modules/workBench/components/dept-chart-view.vue @@ -42,12 +42,7 @@ export default { handler(newVal, oldVal) { if (newVal) { this.dataListCopy = newVal; - if (document.getElementById(this.id)) { - // 解决数据初始渲染不出来的问题 - setTimeout(() => { - this.initChart() - }, 2000) - } + this.initChart() } }, deep: true, @@ -55,9 +50,6 @@ export default { }, }, mounted() { - setTimeout(() => { - this.initChart() - }, 2000) }, methods: { initChart() { @@ -68,7 +60,6 @@ export default { this.myChart = chartDom && echarts.init(chartDom); let lengendArr = this.dataListCopy.filter(v => v.name); - let total = 0; this.dataListCopy.map(v => { if (v.value || v.value === 0) {