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

64 lines
1.2 KiB
Vue
Raw Normal View History

2022-11-21 16:19:12 +08:00
<template>
2022-11-22 14:19:52 +08:00
<div class="doc-circulation">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
2022-11-21 16:19:12 +08:00
</template>
<script>
2022-11-22 14:19:52 +08:00
import List from './components/List'
import Detail from './components/Detail'
2022-11-21 16:19:12 +08:00
2022-11-22 14:19:52 +08:00
export default {
name: 'AppInterview',
label: '调查走访',
props: {
instance: Function,
dict: Object
2022-11-21 16:19:12 +08:00
},
2022-11-22 14:19:52 +08:00
data () {
return {
component: 'List',
params: {},
include: []
}
2022-11-21 16:19:12 +08:00
},
2022-11-22 14:19:52 +08:00
components: {
Detail,
List
2022-11-21 16:19:12 +08:00
},
2022-11-22 14:19:52 +08:00
methods: {
onChange (data) {
if (data.type === 'Detail') {
this.component = 'Detail'
this.params = data.params
}
2022-11-21 16:19:12 +08:00
2022-11-22 14:19:52 +08:00
if (data.type === 'List') {
this.component = 'List'
this.params = data.params
2022-11-21 16:19:12 +08:00
2022-11-22 14:19:52 +08:00
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
2022-11-21 16:19:12 +08:00
}
}
2022-11-22 14:19:52 +08:00
</script>
2022-11-21 16:19:12 +08:00
2022-11-22 14:19:52 +08:00
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
2022-11-21 16:19:12 +08:00
}
</style>