bug
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
<template>
|
||||
<div class="doc-circulation ailist-wrapper">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :moduleName="moduleName" :moduleId="moduleId" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
<ai-list v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="社区管理" :isShowBottomBorder="false"></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" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<Detail v-else-if="component === 'Detail'" :params="params" :instance="instance" :dict="dict" @change="onChange"></Detail>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import List from './components/List.vue'
|
||||
import Statistics from './components/Statistics'
|
||||
import Detail from './components/Detail'
|
||||
|
||||
export default {
|
||||
@@ -23,15 +33,26 @@
|
||||
return {
|
||||
component: 'List',
|
||||
params: {},
|
||||
moduleId: '',
|
||||
include: [],
|
||||
moduleName: ''
|
||||
isShowDetail: false,
|
||||
currIndex: 0
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
Detail,
|
||||
List
|
||||
List,
|
||||
Statistics
|
||||
},
|
||||
|
||||
computed: {
|
||||
tabs () {
|
||||
const tabList = [
|
||||
{label: '社区管理', name: 'List', comp: List },
|
||||
{label: '管理统计', name: 'Statistics', comp: Statistics }
|
||||
]
|
||||
|
||||
return tabList
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -39,11 +60,19 @@
|
||||
if (data.type === 'Detail') {
|
||||
this.component = 'Detail'
|
||||
this.params = data.params
|
||||
this.isShowDetail = true
|
||||
}
|
||||
|
||||
if (data.type === 'Statistics') {
|
||||
this.component = 'Statistics'
|
||||
this.params = data.params
|
||||
this.isShowDetail = false
|
||||
}
|
||||
|
||||
if (data.type === 'List') {
|
||||
this.component = 'List'
|
||||
this.params = data.params
|
||||
this.isShowDetail = false
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
|
||||
Reference in New Issue
Block a user