Files
dvcp_v2_webapp/packages/device/AppEquipmentManage/AppEquipmentManage.vue

62 lines
1.1 KiB
Vue
Raw Normal View History

2021-12-14 18:36:19 +08:00
<template>
<div class="AppEquipmentManage">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List'
2022-06-09 08:39:26 +08:00
import TaskList from './components/TaskList'
2021-12-14 18:36:19 +08:00
export default {
label: '广播设备管理',
name: 'AppEquipmentManage',
props: {
instance: Function,
dict: Object,
},
data() {
return {
2022-06-08 17:57:19 +08:00
component: 'TaskList',
2021-12-14 18:36:19 +08:00
params: {},
include: [],
}
},
components: {
2022-06-08 17:19:32 +08:00
List,
2022-06-08 17:57:19 +08:00
TaskList,
2021-12-14 18:36:19 +08:00
},
methods: {
onChange(data) {
2022-06-08 17:19:32 +08:00
if (data.type === 'taskList') {
2022-06-08 17:57:19 +08:00
this.component = 'TaskList'
2021-12-14 18:36:19 +08:00
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">
.AppEquipmentManage {
height: 100%;
background: #f3f6f9;
overflow: auto;
}
</style>