Files
dvcp_v2_webapp/project/pingchang/apps/AppVillageAuxiliarPolice/AppVillageAuxiliarPolice.vue

67 lines
1.1 KiB
Vue
Raw Normal View History

2022-11-30 09:58:43 +08:00
<template>
<div class="doc-circulation ailist-wrapper">
<keep-alive :include="['List']">
2023-10-09 10:53:30 +08:00
<component ref="component" :is="component" @change="onChange" :params="params" v-bind="$props"></component>
2022-11-30 09:58:43 +08:00
</keep-alive>
</div>
</template>
<script>
2023-10-09 10:53:30 +08:00
import List from './components/List'
import Add from './components/Add'
2022-11-30 09:58:43 +08:00
2023-10-09 10:53:30 +08:00
export default {
name: 'AppVillageAuxiliarPolice',
label: '第一书记',
props: {
instance: Function,
dict: Object,
menuName: {default: "第一书记"}
},
2022-11-30 09:58:43 +08:00
2023-10-09 10:53:30 +08:00
data() {
return {
component: 'List',
params: {},
include: []
}
},
2022-11-30 09:58:43 +08:00
2023-10-09 10:53:30 +08:00
components: {
Add,
List
},
2022-11-30 09:58:43 +08:00
2023-10-09 10:53:30 +08:00
mounted() {
},
2022-11-30 09:58:43 +08:00
2023-10-09 10:53:30 +08:00
methods: {
onChange(data) {
if (data.type === 'Add') {
this.component = 'Add'
this.params = data.params
}
2022-11-30 09:58:43 +08:00
2023-10-09 10:53:30 +08:00
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
2022-11-30 09:58:43 +08:00
2023-10-09 10:53:30 +08:00
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
2022-11-30 09:58:43 +08:00
}
}
}
2023-10-09 10:53:30 +08:00
}
2022-11-30 09:58:43 +08:00
</script>
<style lang="scss">
2023-10-09 10:53:30 +08:00
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
2022-11-30 09:58:43 +08:00
</style>