From b1fcf4f0ee91f87ba2d557ab10b825bd24c881d8 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Tue, 28 May 2024 10:51:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=B4=A7=E6=80=A5bug&?= =?UTF-8?q?moreAction=E6=9D=83=E9=99=90=E7=A6=81=E7=94=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pure/ms-table-more-action/index.vue | 11 ++-- .../template/components/templateItem.vue | 1 + .../testPlan/components/planTable.vue | 52 +++++++++++++------ .../views/test-plan/testPlan/locale/en-US.ts | 2 +- 4 files changed, 44 insertions(+), 22 deletions(-) diff --git a/frontend/src/components/pure/ms-table-more-action/index.vue b/frontend/src/components/pure/ms-table-more-action/index.vue index 4a4314fcb9..d053366f2d 100644 --- a/frontend/src/components/pure/ms-table-more-action/index.vue +++ b/frontend/src/components/pure/ms-table-more-action/index.vue @@ -92,14 +92,13 @@ return result; }); - // 判断是否有所有权限 + // 判断是否有任一权限 const isHasAllPermission = computed(() => { - return props.list.some((item: ActionsItem) => { - if (item.permission) { - return hasAnyPermission(item.permission); - } - return false; + const permissionList = props.list.map((item) => { + return item.permission || []; }); + const permissionResult = permissionList.flat(); + return hasAnyPermission(permissionResult); }); function selectHandler(value: SelectedValue) { diff --git a/frontend/src/views/setting/organization/template/components/templateItem.vue b/frontend/src/views/setting/organization/template/components/templateItem.vue index b4e612e74d..2610892ff0 100644 --- a/frontend/src/views/setting/organization/template/components/templateItem.vue +++ b/frontend/src/views/setting/organization/template/components/templateItem.vue @@ -139,6 +139,7 @@ label: t('system.orgTemplate.enable'), eventTag: 'enable', danger: true, + permission: ['ORGANIZATION_TEMPLATE:READ+ENABLE'], }, ]); const showEnableVisible = ref(false); diff --git a/frontend/src/views/test-plan/testPlan/components/planTable.vue b/frontend/src/views/test-plan/testPlan/components/planTable.vue index e9280a1183..29a3d7d89a 100644 --- a/frontend/src/views/test-plan/testPlan/components/planTable.vue +++ b/frontend/src/views/test-plan/testPlan/components/planTable.vue @@ -185,35 +185,57 @@