mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(接口测试): 修复场景列表不显示创建性能测试按钮的缺陷
--bug=1032161 --user=王孝刚 【接口测试】接口自动化-接口场景创建性能测试按钮不显示 https://www.tapd.cn/55049933/s/1428483
This commit is contained in:
parent
9a2ab6208b
commit
dd2054dc6f
@ -1,18 +1,20 @@
|
||||
function enableModules(...modules) {
|
||||
let sysModules = JSON.parse(sessionStorage.getItem("modules"));
|
||||
let projectModules = JSON.parse(sessionStorage.getItem("project_modules"));
|
||||
let workModules = JSON.parse(sessionStorage.getItem("workspace_modules"));
|
||||
for (let module of modules) {
|
||||
let modules = JSON.parse(localStorage.getItem("modules"));
|
||||
if (module === "project" || module === "setting") {
|
||||
return modules && modules[module] === "ENABLE";
|
||||
}
|
||||
let projectModules = JSON.parse(sessionStorage.getItem("project_modules"));
|
||||
if (projectModules && projectModules.length > 0) {
|
||||
return (
|
||||
modules[module] === "ENABLE" && projectModules.indexOf(modules) > -1
|
||||
sysModules[module] === "ENABLE" && projectModules.indexOf(module) > -1
|
||||
);
|
||||
}
|
||||
let workModules = JSON.parse(sessionStorage.getItem("workspace_modules"));
|
||||
if (workModules && workModules.length > 0) {
|
||||
return modules[module] === "ENABLE" && workModules.indexOf(modules) > -1;
|
||||
return (
|
||||
sysModules[module] === "ENABLE" && workModules.indexOf(module) > -1
|
||||
);
|
||||
}
|
||||
if (modules && modules[module] === "DISABLE") {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user