From dd2054dc6f7e420a36818a86f538f7fa75d375fb Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 19 Oct 2023 14:57:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E5=88=97=E8=A1=A8=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=9B=E5=BB=BA=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=8C=89=E9=92=AE=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1032161 --user=王孝刚 【接口测试】接口自动化-接口场景创建性能测试按钮不显示 https://www.tapd.cn/55049933/s/1428483 --- .../frontend/src/directive/module/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/framework/sdk-parent/frontend/src/directive/module/index.js b/framework/sdk-parent/frontend/src/directive/module/index.js index 66f24faf08..63a41420a4 100644 --- a/framework/sdk-parent/frontend/src/directive/module/index.js +++ b/framework/sdk-parent/frontend/src/directive/module/index.js @@ -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;