heyujie
2021-03-04 a935450c18aa54589abce1c32bac4a18faeaea57
src/pages/desktop/index/components/ToolsEntry.vue
@@ -65,6 +65,7 @@
import draggable from "vuedraggable"
import { findAllSdk } from '@/api/taskMange';
import {chunkArr} from '@/scripts/util';
import bus from '@/plugin/bus'
export default {
  name: 'toolsEntry',
  components: { draggable },
@@ -87,6 +88,7 @@
      ],
      //rowSize: 3,
      badgeNum: 0,
      curDock: {}
    }
  },
  computed: {
@@ -139,7 +141,16 @@
        }
      }
    });
    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) {
@@ -163,7 +174,9 @@
        console.log(e)
      })
    },
    dockClick (dock) {
      if (dock.type === '1') {
        window.open(dock.url);
      } else if (dock.type === '2' && !dock.isOpen) {
@@ -232,7 +245,12 @@
        screenshot: ''
      });
    }
  }
  },
  watch:{
    curDock:function (val) {
      this.dockClick(val)
    }
  },
};
</script>