From 3613f5414bef610d8486c01eea3a795d62dabb16 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 05 三月 2021 13:55:01 +0800 Subject: [PATCH] 跨aap打开新app --- src/pages/desktop/index/components/ToolsEntry.vue | 40 ++++++++++++++++++++++------------------ 1 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue index aa26486..eefc72f 100644 --- a/src/pages/desktop/index/components/ToolsEntry.vue +++ b/src/pages/desktop/index/components/ToolsEntry.vue @@ -88,7 +88,6 @@ ], //rowSize: 3, badgeNum: 0, - curDock: {} } }, computed: { @@ -139,18 +138,15 @@ let params = msg.substring(7); this.addFrameByName("search", params) } + + if (msg.indexOf("toOpenApp") >= 0) { + let id = msg.substring(10); + console.log(id); + this.addFrameByID(id) + } } }); - this.$nextTick( () =>{ - bus.$on("open-app", (val)=> { - debugger - const cur = this.stateDocks.find( (item)=> { - return item.id == val - }) - this.dockClick(cur) - this.curDock = cur - }) - }) + }, methods: { chunk (arr, size) { @@ -218,7 +214,6 @@ dockMask.style.width = dockItems.length * 60 + 40 + 'px'; }, addFrameByName (name, params) { - let dock = null; this.$store.state.desktop.docks.forEach(app => { if (app.name === name) { @@ -244,13 +239,22 @@ url: dock.url, screenshot: '' }); + }, + addFrameByID (id, params) { + + let dock = null; + let toClose = null + this.$store.state.desktop.docks.forEach(app => { + if (app.id == id) { + dock = app; + } + if(app.name=="algorithmManage"){ + toClose = app + } + }); + this.dockClick(dock) } - }, - watch:{ - curDock:function (val) { - this.dockClick(val) - } - }, + } }; </script> -- Gitblit v1.8.0