返乡登记
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<ai-list v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="社区管理" :isShowBottomBorder="false"></ai-title>
|
||||
<ai-title title="社区管理" :isShowArea="(currIndex == 0)" :isShowBottomBorder="false" v-model="areaId" :instance="instance" @change="onAreaChange"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" />
|
||||
<component :areaId="areaId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
@@ -19,6 +19,7 @@
|
||||
import List from './components/List.vue'
|
||||
import Statistics from './components/Statistics'
|
||||
import Detail from './components/Detail'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppCommunityManagement',
|
||||
@@ -34,7 +35,8 @@
|
||||
component: 'List',
|
||||
params: {},
|
||||
isShowDetail: false,
|
||||
currIndex: 0
|
||||
currIndex: 0,
|
||||
areaId: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -45,6 +47,8 @@
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
tabs () {
|
||||
const tabList = [
|
||||
{label: '社区管理', name: 'List', comp: List },
|
||||
@@ -55,6 +59,10 @@
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.areaId = this.user.info.areaId
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange (data) {
|
||||
if (data.type === 'Detail') {
|
||||
@@ -74,6 +82,10 @@
|
||||
this.params = data.params
|
||||
this.isShowDetail = false
|
||||
}
|
||||
},
|
||||
|
||||
onAreaChange () {
|
||||
this.$refs[this.currIndex][0].changeArea()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
dict: Object,
|
||||
areaId: String
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -144,7 +145,8 @@
|
||||
params: {
|
||||
...this.search,
|
||||
queryBeginTime: this.search.queryBeginTime ? this.search.queryBeginTime + ' 00:00:00' : '',
|
||||
queryEndTime: this.search.queryEndTime ? this.search.queryEndTime + ' 23:59:59' : ''
|
||||
queryEndTime: this.search.queryEndTime ? this.search.queryEndTime + ' 23:59:59' : '',
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -154,6 +156,14 @@
|
||||
})
|
||||
},
|
||||
|
||||
changeArea () {
|
||||
this.search.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
toDeital (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
|
||||
Reference in New Issue
Block a user