mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 13:22:49 +00:00
feat:优化资源缓存
This commit is contained in:
parent
d3182f278f
commit
7eef3e7989
@ -1250,5 +1250,5 @@ Markdown 格式发送
|
||||
退出
|
||||
会议组件加载失败!
|
||||
|
||||
OkR管理
|
||||
OkR结果分析
|
||||
OKR管理
|
||||
OKR结果分析
|
||||
@ -9,7 +9,6 @@
|
||||
:name='name'
|
||||
:url='url'
|
||||
inline
|
||||
destroy
|
||||
keep-alive
|
||||
disableSandbox
|
||||
:data='appData'
|
||||
@ -68,7 +67,11 @@ export default {
|
||||
this.loading = true;
|
||||
this.$nextTick(() => {
|
||||
this.loading = false;
|
||||
this.appUrl = val
|
||||
let url = $A.apiUrl(val)
|
||||
if (url.indexOf('http') == -1) {
|
||||
url = window.location.origin + url
|
||||
}
|
||||
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || url
|
||||
})
|
||||
},
|
||||
path(val) {
|
||||
@ -80,6 +83,16 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
'$route': {
|
||||
handler(to) {
|
||||
if(to.name == 'manage-apps'){
|
||||
this.appData = {
|
||||
path: to.hash
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
|
||||
@ -85,7 +85,7 @@ export default {
|
||||
[
|
||||
{icon: '', name: 'workReport', label: '工作报告'},
|
||||
{icon: '', name: 'approve', label: '审批中心'},
|
||||
{icon: '', name: 'okrManage', label: 'OkR管理'},
|
||||
{icon: '', name: 'okrManage', label: 'OKR管理'},
|
||||
]
|
||||
],
|
||||
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
}
|
||||
if (this.userIsAdmin) {
|
||||
this.navMore[2].splice(0, 0, {icon: '', name: 'allUser', label: '团队管理'})
|
||||
this.navMore[2].push({icon: '', name: 'okrAnalyze', label: 'OkR结果分析'})
|
||||
this.navMore[2].push({icon: '', name: 'okrAnalyze', label: 'OKR结果分析'})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -402,8 +402,6 @@ export default {
|
||||
operateItem: {},
|
||||
|
||||
needStartHome: false,
|
||||
|
||||
okrUrl: import.meta.env.VITE_OKR_WEB_URL || $.apiUrl(location.origin + "/apps/okr")
|
||||
}
|
||||
},
|
||||
|
||||
@ -477,6 +475,15 @@ export default {
|
||||
return this.$route.name
|
||||
},
|
||||
|
||||
// okr路由
|
||||
okrUrl() {
|
||||
let url = $A.apiUrl("/apps/okr")
|
||||
if (url.indexOf('http') == -1) {
|
||||
url = window.location.origin + url
|
||||
}
|
||||
return import.meta.env.VITE_OKR_WEB_URL || url
|
||||
},
|
||||
|
||||
/**
|
||||
* 综合数(未读、提及、待办)
|
||||
* @returns {string|string}
|
||||
@ -575,14 +582,14 @@ export default {
|
||||
|
||||
{path: 'team', name: '团队管理', divided: true},
|
||||
{path: 'approve', name: '审批中心'},
|
||||
{path: 'okrManage', name: 'OkR管理'},
|
||||
{path: 'okrAnalyze', name: 'OkR结果分析'},
|
||||
{path: 'okrManage', name: 'OKR管理'},
|
||||
{path: 'okrAnalyze', name: 'OKR结果分析'},
|
||||
])
|
||||
} else {
|
||||
array.push(...[
|
||||
{path: 'personal', name: '个人设置', divided: true},
|
||||
{path: 'approve', name: '审批中心'},
|
||||
{path: 'okrManage', name: 'OkR管理'},
|
||||
{path: 'okrManage', name: 'OKR管理'},
|
||||
{path: 'version', name: '更新版本', divided: true, visible: !!this.clientNewVersion},
|
||||
|
||||
{path: 'workReport', name: '工作报告', divided: true},
|
||||
@ -792,10 +799,7 @@ export default {
|
||||
case 'okrManage':
|
||||
case 'okrAnalyze':
|
||||
this.goForward({
|
||||
path:'/manage/apps/' + ( path == 'okrManage' ? '/#/list' : '/#/analysis') ,
|
||||
query: {
|
||||
baseUrl: this.okrUrl
|
||||
}
|
||||
path:'/manage/apps/' + ( path == 'okrManage' ? '/#/list' : '/#/analysis'),
|
||||
});
|
||||
return;
|
||||
case 'logout':
|
||||
|
||||
@ -26,11 +26,11 @@ export default {
|
||||
this.loading = true;
|
||||
this.$nextTick(() => {
|
||||
this.loading = false;
|
||||
let url = $A.apiUrl(this.$route.query.baseUrl)
|
||||
let url = $A.apiUrl("/apps/okr")
|
||||
if (url.indexOf('http') == -1) {
|
||||
url = window.location.origin + url
|
||||
}
|
||||
this.appUrl = url
|
||||
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || url
|
||||
this.path = this.$route.query.path || '';
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user