From 0d4f45b6369922301bde2c30e4aa757a0dea43a5 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Wed, 17 Apr 2024 16:01:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E6=9D=83?= =?UTF-8?q?=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1039288 --user=王旭 【项目管理】项目与权限-应用设置-无缺陷查询权限-仍展示设置项-提示无权限 https://www.tapd.cn/55049933/s/1499638 --- .../menuManagement/components/defectSync.vue | 2 +- .../menuManagement/menuManagement.vue | 90 +++++++++++++------ 2 files changed, 62 insertions(+), 30 deletions(-) diff --git a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue index 8a0c6ee60e..03982e5ca6 100644 --- a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue +++ b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue @@ -10,7 +10,7 @@ :width="680" :ok-loading="okLoading" :ok-disabled="okDisabled" - :ok-permission="['PROJECT_APPLICATION_CASE:UPDATE']" + :ok-permission="['PROJECT_APPLICATION_BUG:UPDATE']" @cancel="handleCancel(false)" @confirm="handleConfirm" > diff --git a/frontend/src/views/project-management/projectAndPermission/menuManagement/menuManagement.vue b/frontend/src/views/project-management/projectAndPermission/menuManagement/menuManagement.vue index 8a0da4da5d..757b23a0be 100644 --- a/frontend/src/views/project-management/projectAndPermission/menuManagement/menuManagement.vue +++ b/frontend/src/views/project-management/projectAndPermission/menuManagement/menuManagement.vue @@ -45,12 +45,9 @@
@@ -59,12 +56,9 @@
{{ t('project.menu.row4') }}
-
{{ t('project.menu.CASE_RELATED') }}
+
{{ + t('project.menu.CASE_RELATED') + }}
@@ -148,12 +142,9 @@
-
{{ t('project.menu.API_ERROR_REPORT_RULE') }}
+
{{ + t('project.menu.API_ERROR_REPORT_RULE') + }}
{ try { if (expandedKeys.value.includes(record.module)) { @@ -688,16 +693,43 @@ expandedKeys.value = expandedKeys.value.filter((item) => item !== record.module); return; } - expandedKeys.value = [...expandedKeys.value, record.module]; - getMenuConfig(record.module); - if (record.module === MenuEnum.apiTest && !apiPoolOption.value.length) { - apiPoolOption.value = await getPoolOptions(currentProjectId.value, record.module); - } else if (record.module === MenuEnum.uiTest && !uiPoolOption.value.length) { - uiPoolOption.value = await getPoolOptions(currentProjectId.value, record.module); - } else if (record.module === MenuEnum.apiTest && !apiAuditorOption.value.length) { - apiAuditorOption.value = await getAuditorOptions(currentProjectId.value, record.module); - } else if (record.module === MenuEnum.loadTest && !performanceAuditorOption.value.length) { - performanceAuditorOption.value = await getAuditorOptions(currentProjectId.value, record.module); + + switch (record.module) { + case MenuEnum.workstation: + if (hasAnyPermission(['PROJECT_APPLICATION_WORKSTATION:READ'])) { + await expanded(record); + } + break; + case MenuEnum.testPlan: + if (hasAnyPermission(['PROJECT_APPLICATION_TEST_PLAN:READ'])) { + await expanded(record); + } + break; + case MenuEnum.bugManagement: + if (hasAnyPermission(['PROJECT_APPLICATION_BUG:READ'])) { + await expanded(record); + } + break; + case MenuEnum.caseManagement: + if (hasAnyPermission(['PROJECT_APPLICATION_CASE:READ'])) { + await expanded(record); + } + break; + case MenuEnum.apiTest: + if (hasAnyPermission(['PROJECT_APPLICATION_API:READ'])) { + await expanded(record); + } + break; + case MenuEnum.uiTest: + if (hasAnyPermission(['PROJECT_APPLICATION_UI:READ'])) { + await expanded(record); + } + break; + default: + if (hasAnyPermission(['PROJECT_APPLICATION_PERFORMANCE_TEST:READ'])) { + await expanded(record); + } + break; } } catch (e) { // eslint-disable-next-line no-console