改造广播设备管理
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="AppEquipmentManage">
|
||||
<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>
|
||||
@@ -17,38 +17,13 @@ export default {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {},
|
||||
include: [],
|
||||
}
|
||||
computed: {
|
||||
currentPage: v => v.$route.hash == "#taskList" ? taskList : List
|
||||
},
|
||||
|
||||
components: {
|
||||
List,
|
||||
taskList,
|
||||
},
|
||||
methods: {
|
||||
onChange(data) {
|
||||
if (data.type === 'taskList') {
|
||||
this.component = 'taskList'
|
||||
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