Include field library metadata in template exports

- Add fieldLibrary metadata to HTML template packages, including form fields, custom time formats, multi-select options, and anesthesia options.

- Restore imported template field metadata into local compatibility caches and the backend field library API when available.

- Preserve legacy JSON template import compatibility while keeping user-facing exports on HTML packages.

- Prevent template field saves from overwriting stored multi-select and anesthesia options with empty values.

- Update README, AGENTS, feature, requirement, design, module, progress, component, and testing docs for complete template export behavior.

- Extend template export tests to cover field library metadata round-tripping.
This commit is contained in:
2026-05-02 04:27:08 +08:00
parent 03b54fe18b
commit 44decaa396
12 changed files with 171 additions and 37 deletions

View File

@@ -13,7 +13,7 @@
- AI 辅助撰写:通过后端 `/api/ai/chat` 代理 OpenAI 兼容接口,对报告内容进行对话或指定区域改写。
- 语音输入:通过后端 `/api/speech/iat` WebSocket 代理讯飞 IAT 听写,把识别文本写入 AI 输入框。
- 报告管理:后端权限过滤的列表/详情/保存/删除,支持搜索、筛选、查看、编辑、历史恢复和打印/PDF 导出。
- 模板管理:后端权限过滤的模板新增/编辑/删除,字段库和模板图片资源优先走后端 API支持 AI 可编辑区域、导入导出
- 模板管理:后端权限过滤的模板新增/编辑/删除,字段库和模板图片资源优先走后端 API支持 AI 可编辑区域、可回导 HTML 模板包导入导出HTML 包内嵌模板字段和字段管理设置
- 用户管理:后端用户/部门权限 API支持用户、角色、部门、模板授权、账号状态和电子签名文件。
- 系统设置:后端 Settings API支持抽帧策略、默认模板、AI Provider、讯飞语音配置。
@@ -200,6 +200,7 @@ cp .env.example .env.local
- 报告管理按角色过滤报告。
- 本地存储封装和系统设置兼容。
- 默认报告模板结构和字段配置。
- 模板 HTML 导出包字段库元数据。
- 打印导出入口。
- 后端权限策略、AI 入参和语音代理帧处理。