25695
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="居民活动" :isShowBottomBorder="false" :isShowArea="currIndex === '0'" 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" :permissions="permissions"/>
|
||||
<component :areaId="areaId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user