Files
dvcp_v2_webapp/packages/work/AppHelpDeclaration/AppHelpDeclaration.vue
2022-05-19 11:43:39 +08:00

62 lines
1.2 KiB
Vue

<template>
<div class="AppHelpDeclaration">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import Detail from './components/Detail'
import List from './components/List'
export default {
name: "AppHelpDeclaration",
label: '帮扶申报',
components: {List, Detail},
props: {
instance: Function,
dict: Object,
permissions: Function
},
data() {
return {
component: 'List',
params: {},
include: []
}
},
created(){
},
methods:{
onChange (data) {
if (data.type === 'detail') {
this.component = 'Detail'
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.AppHelpDeclaration{
width: 100%;
height: 100%;
}
</style>