From 959895b80e8915cacb17e4f36830254c6c271572 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期二, 16 三月 2021 18:32:22 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/vue-smart-ai
---
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