Files
leaudit-platform-frontend/app/api/evaluation_points
TanWenyan 02a76a0916 feat(evaluation): 优化前端映射逻辑并修复 documentTypeIds 筛选
主要变更:
1.  修复 getRuleTypes 函数的 documentTypeIds 筛选逻辑
   - 添加参数验证:如果未提供 documentTypeIds,返回空数组
   - 添加 PostgREST 过滤条件:id in (documentTypeIds)
   - 确保评查点类型下拉框只显示会话存储中的文档类型关联的评查点类型

2.  简化 getRulesList 的数据映射逻辑
   - 后端已返回 ruleType、groupName、groupId 字段
   - 移除中间 ApiRule 转换步骤,直接映射 EvaluationPointData
   - 代码行数从 35 行减少到 30 行

3.  更新 EvaluationPointData 接口
   - 添加后端新增的 3 个字段:ruleType、groupName、groupId
   - 与后端 Schema 保持一致

技术细节:
- 保留评查点编码清洗逻辑(移除最后的 '--' 后缀)
- 保留风险等级到优先级的映射
- 保留日期格式化处理

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 17:56:19 +08:00
..