fix(项目管理): 针对没有权限的用户隐藏项目名称后面编辑项目的图标

--bug=1036630 --user=宋天阳 【系统设置】系统-项目用户组-用户组只有查询权限-用户组名称仍可编辑-但不生效 https://www.tapd.cn/55049933/s/1472199
This commit is contained in:
song-tianyang 2024-03-09 15:40:14 +08:00 committed by 刘瑞斌
parent 3fe286f7ec
commit 763961856a
1 changed files with 26 additions and 2 deletions

View File

@ -178,7 +178,7 @@
return authRef.value?.canSave; return authRef.value?.canSave;
}); });
const userGroupcolumns: MsTableColumn = [ const userGroupPermissionColumns: MsTableColumn = [
{ {
title: 'project.userGroup.name', title: 'project.userGroup.name',
dataIndex: 'name', dataIndex: 'name',
@ -201,6 +201,28 @@
}, },
]; ];
const userGroupNoPermissionColumns: MsTableColumn = [
{
title: 'project.userGroup.name',
dataIndex: 'name',
slotName: 'name',
showTooltip: true,
},
{
title: 'project.userGroup.memberCount',
slotName: 'memberCount',
showDrag: true,
dataIndex: 'memberCount',
},
{
title: 'common.operation',
slotName: 'operation',
dataIndex: 'operation',
fixed: 'right',
width: 150,
},
];
const handleNameChange = async (record: UserGroupItem) => { const handleNameChange = async (record: UserGroupItem) => {
try { try {
await updateOrAddProjectUserGroup(record); await updateOrAddProjectUserGroup(record);
@ -215,7 +237,9 @@
postUserGroupList, postUserGroupList,
{ {
tableKey: TableKeyEnum.PROJECT_USER_GROUP, tableKey: TableKeyEnum.PROJECT_USER_GROUP,
columns: userGroupcolumns, columns: hasAnyPermission(['PROJECT_GROUP:READ+UPDATE'])
? userGroupPermissionColumns
: userGroupNoPermissionColumns,
selectable: false, selectable: false,
scroll: { x: '100%' }, scroll: { x: '100%' },
noDisable: true, noDisable: true,