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 @@