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,9 @@ }, mounted () { - this.search.areaId = this.user.info.areaId + this.time1 = this.$moment(new Date()).format('YYYY-MM') + this.time2 = this.$moment(new Date()).format('YYYY-MM') + this.areaId = this.user.info.areaId this.areaName = this.user.info.areaName this.getTree() this.getAreaList() @@ -195,7 +181,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 +198,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 +222,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 +255,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)