feat: 角色权限管理v3.0及错误处理优化
1. 角色权限管理升级: - 添加路由下展开式API权限管理功能 - 新增 getRoleRoutesWithPermissions 和 saveRoleApiPermissions API - 支持按路由展开/收起查看和勾选权限 - 过滤"所有权限"选项,只显示具体权限 2. 错误处理优化: - 403 无权限错误显示为"无权限访问该资源" - 修复评查点分组批量删除显示"成功删除 undefined 个分组"的问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -314,10 +314,14 @@ export default function RuleGroupsIndex() {
|
||||
onConfirm: async () => {
|
||||
try {
|
||||
const result = await batchDeleteEvaluationPointGroups(selectedIds, frontendJWT);
|
||||
toastService.success(`成功删除 ${result.deleted_count} 个分组`);
|
||||
if (result.failed_ids.length > 0) {
|
||||
toastService.warning(`有 ${result.failed_ids.length} 个分组删除失败`);
|
||||
|
||||
// 检查返回状态
|
||||
if (!result.success) {
|
||||
toastService.error(result.error || '删除失败');
|
||||
return;
|
||||
}
|
||||
|
||||
toastService.success(`成功删除 ${result.deleted_groups || 0} 个分组`);
|
||||
// 刷新页面以重新加载数据
|
||||
window.location.reload();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user