fix(任务中心): 修复批量操作权限缺陷

This commit is contained in:
teukkk 2024-04-23 14:37:24 +08:00 committed by 刘瑞斌
parent 95484d90f4
commit 98fe4b09fa
3 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,10 @@
moreActionLength.value = 0;
} else {
moreAction.value?.forEach((key) => {
if (key.permission && hasAllPermission(key.permission as string[])) {
if (
(key.anyPermission && hasAnyPermission(key.anyPermission as string[])) ||
(key.permission && hasAllPermission(key.permission as string[]))
) {
moreActionLength.value += 1;
}
});

View File

@ -487,7 +487,6 @@
label: 'project.taskCenter.batchStop',
eventTag: 'batchStop',
anyPermission: permissionsMap[props.group][props.moduleType].stop,
permission: permissionsMap[props.group][props.moduleType].stop,
},
// {
// label: 'project.taskCenter.batchExecution',

View File

@ -394,13 +394,11 @@
label: 'project.taskCenter.batchEnable',
eventTag: 'batchEnable',
anyPermission: permissionsMap[props.group][props.moduleType].edit,
permission: permissionsMap[props.group][props.moduleType].edit,
},
{
label: 'project.taskCenter.batchDisable',
eventTag: 'batchDisable',
anyPermission: permissionsMap[props.group][props.moduleType].edit,
permission: permissionsMap[props.group][props.moduleType].edit,
},
],
};