From 1553352c88c1bec331e3a164350b9f3d0dbfdef2 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 22 Dec 2021 19:04:41 +0800 Subject: [PATCH 1/2] 25695 --- .../AppVillageActivity/AppVillageActivity.vue | 14 ++++++- .../AppVillageActivity/components/List.vue | 6 ++- .../components/Statistics.vue | 40 ++++++------------- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/packages/3.0.0/AppVillageActivity/AppVillageActivity.vue b/packages/3.0.0/AppVillageActivity/AppVillageActivity.vue index 4c0c6726..7fdf5578 100644 --- a/packages/3.0.0/AppVillageActivity/AppVillageActivity.vue +++ b/packages/3.0.0/AppVillageActivity/AppVillageActivity.vue @@ -1,12 +1,12 @@ @@ -154,24 +144,18 @@ total: 0, colConfigs: [ { prop: 'name', label: '姓名', align: 'left' }, - { prop: 'gender', label: '性别', align: 'center' }, - { prop: 'number1', label: '报名次数', align: 'center' }, - { prop: 'number2', label: '发布动态条数', align: 'center' } + { prop: 'gender', label: '性别', align: 'center', formart: v => this.dict.getLabel('sex', v) }, + { prop: 'num1', label: '报名次数', align: 'center' }, + { prop: 'num2', label: '发布动态条数', align: 'center' } ], time1: '', time2: '', chart2: '', - areaId: '', currIndex: -1, list: [], areaList: [], unitName: '', - search: { - current: 1, - areaId: '', - size: 10, - name: '' - } + areaId: '' } }, @@ -186,7 +170,7 @@ }, mounted () { - this.search.areaId = this.user.info.areaId + this.areaId = this.user.info.areaId this.areaName = this.user.info.areaName this.getTree() this.getAreaList() @@ -195,7 +179,10 @@ this.chart1 = echarts.init(document.querySelector('.chart1')) this.chart2 = echarts.init(document.querySelector('.chart2')) window.addEventListener('resize', this.onResize) - this.getInfo() + + this.dict.load('sex').then(() => { + this.getInfo() + }) }) }, @@ -209,9 +196,8 @@ }, onTreeChange (e) { - this.search.areaId = e.id + this.areaId = e.id this.areaName = e.name - this.search.current = 1 this.$nextTick(() => { this.getInfo() @@ -234,7 +220,7 @@ }).filter(e => !e.parentid)[0] this.defaultExpanded = [parent.id] this.defaultChecked = [parent.id] - this.search.areaId = parent.id + this.areaId = parent.id this.addChild(parent, res.data) this.areaTree = [parent] @@ -267,7 +253,7 @@ getInfo () { this.loading = true - this.instance.post(`/app/appvillageactivityinfo/statistic?time1=${this.time1}&time2=${this.time2}`).then(res => { + this.instance.post(`/app/appvillageactivityinfo/statistic?areaId=${this.areaId}&time1=${this.time1 || ''}&time2=${this.time2 || '-'}`).then(res => { if (res.code == 0) { this.info = res.data.total this.initChart1(res.data.twelve) From ca7d06b6a615856706cb876ab3f69b8d578b8b8a Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 22 Dec 2021 19:10:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Statistics.vue | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/3.0.0/AppVillageActivity/components/Statistics.vue b/packages/3.0.0/AppVillageActivity/components/Statistics.vue index 27e66bf3..4a44d60c 100644 --- a/packages/3.0.0/AppVillageActivity/components/Statistics.vue +++ b/packages/3.0.0/AppVillageActivity/components/Statistics.vue @@ -44,6 +44,7 @@ v-model="time1" type="month" size="small" + :clearable="false" @change="getInfo" value-format="yyyy-MM" placeholder="请选择月份"> @@ -87,19 +88,18 @@ +