| | |
| | | <div id="app" @contextmenu.prevent> |
| | | <tools @jumpToDock="onJumpToDock"></tools> |
| | | <desktop></desktop> |
| | | <tools-entry @changeBg="onChangeBg" ref="dock_model"></tools-entry> |
| | | <tools-entry @changeBackground="onChangeBg" ref="dock_model"></tools-entry> |
| | | <notice-tip ref="notice_tip_model"></notice-tip> |
| | | <notification-center></notification-center> |
| | | </div> |
| | |
| | | import NoticeTip from './components/NoticeTip'; |
| | | import Tools from './components/Tools'; |
| | | import ToolsEntry from './components/ToolsEntry'; |
| | | import axios from 'axios' |
| | | |
| | | import { getApps } from '@/api/app' |
| | | import { findAllSdk } from '@/api/taskMange' |
| | | |
| | | import config from '../../../../package.json' |
| | | |
| | |
| | | }, |
| | | mounted() { |
| | | // document.getElementById('app').style.backgroundImage = process.env.VUE_APP_MAIN_URL; |
| | | document.getElementById('app').style.backgroundImage = `url(${this.defaultBgUrl})` |
| | | const url = localStorage.getItem("backgroundPic") |
| | | document.getElementById('app').style.backgroundImage = `url(${url||this.defaultBgUrl})` |
| | | |
| | | this.showApps(); |
| | | |
| | |
| | | }, 1000); |
| | | window.addEventListener('message', (e) => { |
| | | if (e.data.msg == 'AppUpdate') { |
| | | debugger |
| | | this.showApps(); |
| | | } |
| | | // if (e.data.msg && e.data.msg.indexOf("refreshDesk")>-1) { |
| | | // this.showApps(); |
| | | // } |
| | | }); |
| | | }, |
| | | methods: { |
| | | onJumpToDock(item){ |
| | | this.$refs.dock_model.onJumpToDock(item) |
| | | onJumpToDock(name){ |
| | | this.$refs.dock_model.onJumpToDock(name) |
| | | }, |
| | | onChangeBg(v){ |
| | | document.getElementById('app').style.backgroundImage = "url(" + v + ")" |
| | | this.defaultBgUrl = v |
| | | localStorage.setItem("backgroundPic", v) |
| | | }, |
| | | showApps() { |
| | | let _that = this; |