refactor(系统设置): 模块管理已经开源
--task=1010909 --user=刘瑞斌 【开源计划】功能模块... https://www.tapd.cn/55049933/s/1323488
This commit is contained in:
parent
86c276db3a
commit
17aed53797
|
@ -84,6 +84,14 @@ export default {
|
|||
this.headerHeight = "30px";
|
||||
}
|
||||
this.initSessionTimer();
|
||||
getModuleList()
|
||||
.then(response => {
|
||||
let modules = {};
|
||||
response.data.forEach(m => {
|
||||
modules[m.key] = m.status;
|
||||
});
|
||||
localStorage.setItem('modules', JSON.stringify(modules));
|
||||
});
|
||||
if (!hasLicense()) {
|
||||
setDefaultTheme();
|
||||
setCustomizeColor();
|
||||
|
@ -96,13 +104,6 @@ export default {
|
|||
// this.$store.commit('setTheme', res.data);
|
||||
});
|
||||
this.getDisplayInfo();
|
||||
getModuleList().then(response => {
|
||||
let modules = {};
|
||||
response.data.forEach(m => {
|
||||
modules[m.key] = m.status;
|
||||
});
|
||||
localStorage.setItem('modules', JSON.stringify(modules));
|
||||
});
|
||||
}
|
||||
|
||||
this.isFixed = localStorage.getItem('app-fixed') === 'true' || false;
|
||||
|
|
|
@ -147,6 +147,14 @@ export default {
|
|||
this.openLdap = response.data;
|
||||
});
|
||||
}
|
||||
getModuleList()
|
||||
.then(response => {
|
||||
let modules = {};
|
||||
response.data.forEach(m => {
|
||||
modules[m.key] = m.status;
|
||||
});
|
||||
localStorage.setItem('modules', JSON.stringify(modules));
|
||||
});
|
||||
//
|
||||
checkLicense()
|
||||
.then(() => {
|
||||
|
@ -171,13 +179,6 @@ export default {
|
|||
document.title = title;
|
||||
}
|
||||
})
|
||||
getModuleList().then(response => {
|
||||
let modules = {};
|
||||
response.data.forEach(m => {
|
||||
modules[m.key] = m.status;
|
||||
});
|
||||
localStorage.setItem('modules', JSON.stringify(modules));
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
import {MODULE_CHANGE, ModuleEvent} from "metersphere-frontend/src/components/head/ListEvent";
|
||||
import {hasPermission} from "metersphere-frontend/src/utils/permission";
|
||||
import {getModuleList, updateStatus} from "@/api/module";
|
||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||
|
||||
export default {
|
||||
name: "MsModule",
|
||||
|
@ -78,9 +77,7 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
if (hasLicense()) {
|
||||
this.list();
|
||||
}
|
||||
this.list();
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
|
|
Loading…
Reference in New Issue