改造广播设备管理

This commit is contained in:
aixianling
2023-04-18 09:34:11 +08:00
parent d49d93b19d
commit da9b3b2add
3 changed files with 29 additions and 73 deletions

View File

@@ -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>