From c2204792166cb77e0d8b76e53eced8aa695f2922 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Tue, 20 Aug 2024 16:52:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=AE=A1=E7=90=86=E8=AF=AF=E6=8A=A5=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menuManagement/components/falseAlermRule.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue index d2ddb688bb..0f5ceaf146 100644 --- a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue +++ b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/falseAlermRule.vue @@ -29,7 +29,7 @@ @@ -86,6 +86,7 @@ import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import { useAppStore, useTableStore } from '@/store'; + import { hasAnyPermission } from '@/utils/permission'; import { FakeTableListItem } from '@/models/projectManagement/menuManagement'; import { ProjectManagementRouteEnum } from '@/enums/routeEnum'; @@ -132,7 +133,7 @@ label: 'common.delete', eventTag: 'batchDelete', danger: true, - permission: ['PROJECT_APPLICATION_API:UPDATE'], + permission: ['PROJECT_APPLICATION_API:DELETE'], }, ], }; @@ -188,6 +189,10 @@ }, ]; + const hasOperationPermission = computed(() => + hasAnyPermission(['PROJECT_APPLICATION_API:UPDATE', 'PROJECT_APPLICATION_API:DELETE']) + ); + const batchFormModels: Ref = ref([...initBatchFormModels]); const rulesColumn: MsTableColumn = [ @@ -230,11 +235,11 @@ width: 210, }, { - title: 'project.menu.rule.operation', + title: hasOperationPermission.value ? 'project.menu.rule.operation' : '', dataIndex: 'operation', slotName: 'operation', showTooltip: true, - width: 169, + width: hasOperationPermission.value ? 150 : 50, }, ]; await tableStore.initColumn(TableKeyEnum.PROJECT_MANAGEMENT_MENU_FALSE_ALERT, rulesColumn, 'drawer');