Files
dvcp_v2_webapp/packages/publicity/AppVillageRegulations/AppVillageRegulations.vue

75 lines
1.3 KiB
Vue
Raw Normal View History

2021-12-16 16:31:12 +08:00
<template>
<div class="doc-circulation ailist-wrapper">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" v-bind="$props"/>
2021-12-16 16:31:12 +08:00
</keep-alive>
</div>
</template>
<script>
import List from './components/List'
import Add from './components/Add'
import Detail from './components/Detail'
2021-12-16 16:31:12 +08:00
export default {
name: 'AppVillageRegulations',
label: '村规民约',
2021-12-16 16:31:12 +08:00
props: {
instance: Function,
dict: Object,
menuName: {default: "村规民约"}
},
2021-12-16 16:31:12 +08:00
data() {
return {
component: 'List',
params: {},
include: []
}
},
2021-12-16 16:31:12 +08:00
components: {
Add,
List,
Detail
},
2021-12-16 16:31:12 +08:00
mounted() {
},
2021-12-16 16:31:12 +08:00
methods: {
onChange(data) {
if (data.type === 'Add') {
this.component = 'Add'
this.params = data.params
}
2021-12-16 16:31:12 +08:00
if (data.type === 'Detail') {
this.component = 'Detail'
this.params = data.params
}
2021-12-16 16:31:12 +08:00
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
2021-12-16 16:31:12 +08:00
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
2021-12-16 16:31:12 +08:00
}
}
}
}
2021-12-16 16:31:12 +08:00
</script>
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
2021-12-16 16:31:12 +08:00
</style>