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 @@
-
+
-
+
@@ -60,11 +60,13 @@
currIndex: '0',
componentName: '',
params: {},
+ areaId: '',
isShowDetail: false
}
},
created () {
+ this.areaId = this.user.info.areaId
if (this.$route.query.id) {
this.componentName = this.$route.query?.type
this.params = {id: this.$route.query?.id}
@@ -73,6 +75,14 @@
},
methods: {
+ onAreaChange () {
+ if (this.currIndex === '0') {
+ this.$nextTick(() => {
+ this.$refs[this.currIndex][0].getList()
+ })
+ }
+ },
+
onChange (data) {
if (data.type === 'list') {
this.componentName = 'List'
diff --git a/packages/3.0.0/AppVillageActivity/components/List.vue b/packages/3.0.0/AppVillageActivity/components/List.vue
index 85b3f199..d2ee0e96 100644
--- a/packages/3.0.0/AppVillageActivity/components/List.vue
+++ b/packages/3.0.0/AppVillageActivity/components/List.vue
@@ -56,7 +56,8 @@
props: {
instance: Function,
- dict: Object
+ dict: Object,
+ areaId: String
},
data () {
@@ -115,7 +116,8 @@
getList() {
this.instance.post(`/app/appvillageactivityinfo/list`, null, {
params: {
- ...this.search
+ ...this.search,
+ areaId: this.areaId
}
}).then(res => {
if (res.code == 0) {
diff --git a/packages/3.0.0/AppVillageActivity/components/Statistics.vue b/packages/3.0.0/AppVillageActivity/components/Statistics.vue
index adcd6fee..4a44d60c 100644
--- a/packages/3.0.0/AppVillageActivity/components/Statistics.vue
+++ b/packages/3.0.0/AppVillageActivity/components/Statistics.vue
@@ -23,7 +23,7 @@
node-key="id"
:data="areaTree"
highlight-current
- :current-node-key="search.areaId"
+ :current-node-key="areaId"
:default-expanded-keys="defaultExpanded"
:default-checked-keys="defaultChecked"
@current-change="onTreeChange">
@@ -44,6 +44,7 @@
v-model="time1"
type="month"
size="small"
+ :clearable="false"
@change="getInfo"
value-format="yyyy-MM"
placeholder="请选择月份">
@@ -87,19 +88,18 @@
+
+
+
+
-
-
-
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
@@ -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)