修复任务详情字段过滤契约
This commit is contained in:
@@ -242,6 +242,8 @@ Content-Type: application/json
|
||||
后端已按 `docs/project/requirements/M002-task-field-control-contract-v1.md` 返回字段控件契约 V1。前端接入时注意:
|
||||
|
||||
- 任务详情 `fields[]` 已新增 `control_type`、`edit_scope`、`write_target`、`options_source`、`raw_readonly`、`control_hint`。
|
||||
- 任务详情 `fields[]` 是后端按当前任务生效规则过滤后的字段集合,不是完整字段矩阵;前端不得自行补齐后端未返回的字段,也不要依赖固定 `fields.length`。
|
||||
- 未出现在 `fields[]` 的字段表示当前任务不展示、不校验、不提交。例如 `new_group_block` 不返回 FIT 专属 `case_keys.confirmation_number`,也不返回 Allotment 专属 `extracted_fields.child_room_items[]`;无附件时可以不返回 `attachments`。
|
||||
- 前端应优先按 `control_type` 渲染字段;旧 `input_editable`、`select_editable`、`date_picker`、`number_input`、`file_display`、`table_editable` 只作为兼容兜底。
|
||||
- `raw_readonly=true`、`edit_scope=never/system_only` 或 `write_target=none` 的字段不能展示普通编辑控件。
|
||||
- `source_message`、邮件正文、附件引用、raw evidence、`event_type`、`source_event_index`、关系索引、`route_code`、`result_type`、`task_type`、`task_subtype`、`manual_review.reason_code` 等字段必须只读。
|
||||
|
||||
Reference in New Issue
Block a user