mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
feat:多应用配置
This commit is contained in:
parent
10d68790e7
commit
fead758660
@ -573,7 +573,6 @@ export default {
|
||||
{path: 'personal', name: '个人设置', divided: true},
|
||||
{path: 'approve', name: '审批中心'},
|
||||
{path: 'okrManage', name: 'OkR管理'},
|
||||
{path: 'okrAnalyze', name: 'OkR结果分析'},
|
||||
{path: 'version', name: '更新版本', divided: true, visible: !!this.clientNewVersion},
|
||||
|
||||
{path: 'workReport', name: '工作报告', divided: true},
|
||||
@ -782,8 +781,10 @@ export default {
|
||||
return;
|
||||
case 'okrManage':
|
||||
case 'okrAnalyze':
|
||||
if (this.menu.findIndex((m) => m.path == path) > -1) {
|
||||
this.goForward({path: '/manage/microapp/'});
|
||||
if(path=='okrManage'){
|
||||
this.goForward({path: '/manage/microapp/' });
|
||||
}else{
|
||||
this.goForward({path: '/manage/microapp/#/main' });
|
||||
}
|
||||
return;
|
||||
case 'logout':
|
||||
|
||||
@ -713,7 +713,6 @@ export default {
|
||||
this.quill.on('text-change', _ => {
|
||||
this.textTimer && clearTimeout(this.textTimer)
|
||||
this.textTimer = setTimeout(_ => {
|
||||
console.log(11);
|
||||
if (this.maxlength > 0 && this.quill.getLength() > this.maxlength) {
|
||||
this.quill.deleteText(this.maxlength, this.quill.getLength());
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ export default {
|
||||
props: {
|
||||
dialogId: {
|
||||
type: Number,
|
||||
default: 1
|
||||
default: 0
|
||||
},
|
||||
msgId: {
|
||||
type: Number,
|
||||
@ -559,9 +559,6 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
dialogId:1,
|
||||
|
||||
msgItem: DialogItem,
|
||||
msgText: '',
|
||||
msgNew: 0,
|
||||
|
||||
@ -5,13 +5,11 @@
|
||||
<Loading/>
|
||||
</div>
|
||||
</transition>
|
||||
<!-- <div class="messenger-msg" style="width: 500px;position: relative;height: 100%;">
|
||||
<DialogWrapper :dialogId="1" is-messenger/>
|
||||
</div> -->
|
||||
<micro-app name='micro-app' v-if="microAppUrl && !loading"
|
||||
:url='microAppUrl'
|
||||
baseRoute="/"
|
||||
baseRoute="/main"
|
||||
inline
|
||||
destroy
|
||||
disableSandbox
|
||||
:data='microAppData'
|
||||
@created='handleCreate'
|
||||
@ -26,23 +24,18 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import store from '../../store/index'
|
||||
import {mapState} from "vuex";
|
||||
import { EventCenterForMicroApp } from '@micro-zoe/micro-app'
|
||||
import ProjectDialog from "./components/ProjectDialog.vue";
|
||||
import DialogWrapper from "./components/DialogWrapper.vue";
|
||||
|
||||
window.DialogWrapper = DialogWrapper;
|
||||
// Vue.component('MyComponent', {
|
||||
// // 组件的配置和代码...
|
||||
// })
|
||||
window.Vue = Vue;
|
||||
import DialogWrapper from './components/DialogWrapper'
|
||||
import {languageList, languageType} from "../../language";
|
||||
|
||||
export default {
|
||||
components: { ProjectDialog, DialogWrapper },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
microAppUrl: 'http://localhost:5567/',
|
||||
microAppData: { }
|
||||
microAppUrl: 'http://localhost:5567/manage/microapp/#/main',
|
||||
microAppData: {}
|
||||
}
|
||||
},
|
||||
|
||||
@ -54,14 +47,24 @@ export default {
|
||||
'$route': {
|
||||
handler(to) {
|
||||
if( to.name == 'manage-microapp' ){
|
||||
this.loading = false;
|
||||
window.eventCenterForAppNameVite = new EventCenterForMicroApp("micro-app")
|
||||
this.loading = true;
|
||||
this.$nextTick(()=>{
|
||||
this.loading = false;
|
||||
window.eventCenterForAppNameVite = new EventCenterForMicroApp("micro-app")
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'userInfo',
|
||||
'themeMode',
|
||||
])
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleCreate(e) {
|
||||
console.log("子应用创建了",e)
|
||||
@ -70,9 +73,21 @@ export default {
|
||||
console.log("子应用即将被渲染",e)
|
||||
},
|
||||
handleMount(e) {
|
||||
console.log("子应用已经渲染完成",e)
|
||||
this.microAppData = {
|
||||
msg: '来自基座的数据'
|
||||
this.microAppData = {
|
||||
type: 'init',
|
||||
vues:{
|
||||
Vue,
|
||||
store,
|
||||
components:{
|
||||
DialogWrapper
|
||||
}
|
||||
},
|
||||
theme: this.themeMode,
|
||||
languages: {
|
||||
languageList,
|
||||
languageType,
|
||||
},
|
||||
userInfo: this.userInfo,
|
||||
}
|
||||
},
|
||||
handleUnmount(e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user