BUG 54
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="AppConflictMediation">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
<component :is="currentPage" v-bind="$props"/>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
@@ -13,45 +13,16 @@ import Detail from './components/Detail'
|
||||
export default {
|
||||
name: 'AppConflictMediation',
|
||||
label: '矛盾调解',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {}
|
||||
}
|
||||
computed: {
|
||||
currentPage: v => v.$route.hash == "#add" ? Detail : List
|
||||
},
|
||||
|
||||
components: {
|
||||
List,
|
||||
Detail
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user