revert(系统设置): 回退测试计划过滤模块代码

--bug=1032204
--user=王孝刚
【系统设置】系统-默认空间配额未配置接口、UI、性能模块-修改为配置上述模块后-测试计划-未显示上述tab页
https://www.tapd.cn/55049933/s/1428709
This commit is contained in:
wxg0103 2023-10-19 19:06:42 +08:00 committed by wxg0103
parent f5bd24f410
commit 68cc23e377
1 changed files with 1 additions and 16 deletions

View File

@ -1,21 +1,6 @@
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) {
if (module === "project" || module === "setting") {
return modules && modules[module] === "ENABLE";
}
if (projectModules && projectModules.length > 0) {
return (
sysModules[module] === "ENABLE" && projectModules.indexOf(module) > -1
);
}
if (workModules && workModules.length > 0) {
return (
sysModules[module] === "ENABLE" && workModules.indexOf(module) > -1
);
}
let modules = JSON.parse(localStorage.getItem("modules"));
if (modules && modules[module] === "DISABLE") {
return false;
}