diff --git a/packages/device/AppEquipmentManage/AppEquipmentManage.vue b/packages/device/AppEquipmentManage/AppEquipmentManage.vue index 591f6859..570b82f5 100644 --- a/packages/device/AppEquipmentManage/AppEquipmentManage.vue +++ b/packages/device/AppEquipmentManage/AppEquipmentManage.vue @@ -1,7 +1,7 @@ @@ -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() - } - }) - } - }, - }, + } } diff --git a/packages/device/AppEquipmentManage/components/List.vue b/packages/device/AppEquipmentManage/components/List.vue index 0bd476ed..2e7d5539 100644 --- a/packages/device/AppEquipmentManage/components/List.vue +++ b/packages/device/AppEquipmentManage/components/List.vue @@ -49,9 +49,7 @@ export default { props: { dict: Object, instance: Function, - params: Object, }, - data() { return { isAdd: false, @@ -113,17 +111,13 @@ export default { locate: false } }, - computed: { ...mapState(['user']), }, - created() { - this.dict.load('dlbDevStatus', 'yesOrNo').then(() => { - this.getList() - }) + this.getList() + this.dict.load('dlbDevStatus', 'yesOrNo') }, - methods: { bind(item) { this.areaId = '' @@ -186,13 +180,7 @@ export default { }, toTaskList(id) { - this.$emit('change', { - type: 'taskList', - params: { - id: id || '', - // areaId: this.areaId, - }, - }) + this.$router.push({hash: "#taskList", query: {id}}) }, update() { this.btnLoading = true diff --git a/packages/device/AppEquipmentManage/components/taskList.vue b/packages/device/AppEquipmentManage/components/taskList.vue index 898b884a..15705f0c 100644 --- a/packages/device/AppEquipmentManage/components/taskList.vue +++ b/packages/device/AppEquipmentManage/components/taskList.vue @@ -1,7 +1,7 @@