fix(系统设置): 新增工作空间后切换空的工作空间展示模块内容有误
This commit is contained in:
parent
7f7afdc566
commit
4708d936cb
|
@ -143,7 +143,13 @@ export default {
|
||||||
return this.modules[key] === 'ENABLE';
|
return this.modules[key] === 'ENABLE';
|
||||||
}
|
}
|
||||||
let microApps = JSON.parse(sessionStorage.getItem("micro_apps"));
|
let microApps = JSON.parse(sessionStorage.getItem("micro_apps"));
|
||||||
|
if (sessionStorage.getItem("project_id") === 'no_such_project') {
|
||||||
|
// 如果是空的工作空间, 模块只启用工作台, 系统设置
|
||||||
|
return (key === 'workstation' && microApps && microApps[key]) || (key === 'setting' && microApps && microApps[key]);
|
||||||
|
} else {
|
||||||
|
// 如果是有项目的工作空间, 模块按原有逻辑展示
|
||||||
return this.modules[key] === 'ENABLE' && microApps && microApps[key];
|
return this.modules[key] === 'ENABLE' && microApps && microApps[key];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getUiIndex() {
|
getUiIndex() {
|
||||||
if (hasLicense()) {
|
if (hasLicense()) {
|
||||||
|
|
|
@ -246,6 +246,7 @@ public class BaseUserService {
|
||||||
if (StringUtils.equals("workspace", sign)) {
|
if (StringUtils.equals("workspace", sign)) {
|
||||||
user.setLastWorkspaceId(sourceId);
|
user.setLastWorkspaceId(sourceId);
|
||||||
sessionUser.setLastWorkspaceId(sourceId);
|
sessionUser.setLastWorkspaceId(sourceId);
|
||||||
|
user.setLastProjectId(StringUtils.EMPTY);
|
||||||
List<Project> projects = getProjectListByWsAndUserId(sessionUser.getId(), sourceId);
|
List<Project> projects = getProjectListByWsAndUserId(sessionUser.getId(), sourceId);
|
||||||
if (CollectionUtils.isNotEmpty(projects)) {
|
if (CollectionUtils.isNotEmpty(projects)) {
|
||||||
user.setLastProjectId(projects.get(0).getId());
|
user.setLastProjectId(projects.get(0).getId());
|
||||||
|
|
Loading…
Reference in New Issue