From b11822039100b5cf07297a59ef92947b47c0f1f5 Mon Sep 17 00:00:00 2001 From: dhy1725534722 <1725534722@qq.com> Date: Fri, 6 Oct 2023 16:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/yingji/echarts/completePlan.vue | 22 ++++++++-- src/views/yingji/echarts/executionPlan.vue | 19 +++++++-- src/views/yingji/echarts/finishRate.vue | 19 +++++++-- src/views/yingji/enforcing.vue | 5 ++- src/views/yingji/home.vue | 48 +++++++++------------- 5 files changed, 73 insertions(+), 40 deletions(-) diff --git a/src/views/yingji/echarts/completePlan.vue b/src/views/yingji/echarts/completePlan.vue index 7f0d792..794b26b 100644 --- a/src/views/yingji/echarts/completePlan.vue +++ b/src/views/yingji/echarts/completePlan.vue @@ -14,22 +14,36 @@ export default { arr2: [], }; }, - props: { loadS: { type: Boolean, default: true, }, + newTable: { + type: Array, + default: [], + }, + }, + mounted() { + this.$nextTick(() => { + this.getData(); + }); + }, + watch: { + newTable(newVal, oldVal) { + this.getData() + }, }, - mounted() {}, methods: { - getData(e) { + getData() { this.arr1 = []; this.arr2 = []; - e.forEach((value) => { + this.newTable.forEach((value) => { this.arr1.push(value.institutionName); this.arr2.push(value.checkEnterpriseCount); }); + this.arr1.reverse(); + this.arr2.reverse(); this.initChart(); }, initChart() { diff --git a/src/views/yingji/echarts/executionPlan.vue b/src/views/yingji/echarts/executionPlan.vue index f331c33..b787346 100644 --- a/src/views/yingji/echarts/executionPlan.vue +++ b/src/views/yingji/echarts/executionPlan.vue @@ -17,13 +17,26 @@ export default { type: Boolean, default: true, }, + newTable:{ + type: Array, + default: [], + } + }, + mounted() { + this.$nextTick(()=>{ + this.getData() + }) + }, + watch: { + newTable(newVal, oldVal) { + this.getData() + }, }, - mounted() {}, methods: { - getData(e) { + getData() { this.arr1 = []; this.arr2 = []; - e.forEach((value) => { + this.newTable.forEach((value) => { if (value.institutionName == "苏州市") { this.arr1.unshift(value.institutionName); this.arr2.unshift(value.plannedEnterpriseCount); diff --git a/src/views/yingji/echarts/finishRate.vue b/src/views/yingji/echarts/finishRate.vue index 9276d45..7ffbfac 100644 --- a/src/views/yingji/echarts/finishRate.vue +++ b/src/views/yingji/echarts/finishRate.vue @@ -15,18 +15,31 @@ export default { numTotal: 0, }; }, - mounted() {}, + mounted() { + this.$nextTick(() => { + this.getData(); + }); + }, props: { loadS: { type: Boolean, default: true, }, + newTable: { + type: Array, + default: [], + }, + }, + watch: { + newTable(newVal, oldVal) { + this.getData(); + }, }, methods: { - getData(e) { + getData() { this.arr1 = []; this.arr2 = []; - e.forEach((value1) => { + this.newTable.forEach((value1) => { if (value1.institutionName != "苏州市") { this.arr1.push({ value: value1.checkEnterpriseCount, diff --git a/src/views/yingji/enforcing.vue b/src/views/yingji/enforcing.vue index abc30b5..2d54117 100644 --- a/src/views/yingji/enforcing.vue +++ b/src/views/yingji/enforcing.vue @@ -87,7 +87,7 @@