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

@@ -46,7 +46,7 @@
- 支持模板新增、编辑、删除、批量删除。
- 支持模板内容富文本编辑、智能字段插入、图片占位符、AI 可编辑区域。
- 支持模板导出可回导 HTML 模板包;导入兼容 HTML 模板包和历史 JSON 模板包。
- 支持模板导出可回导 HTML 模板包;HTML 包需包含模板正文、模板对应字段和字段管理设置,导入兼容 HTML 模板包和历史 JSON 模板包。
- 支持表单字段库维护,包括字段显示、选项、时间格式、默认值和下划线样式。
- 新增模板后会同步当前用户或部门用户的模板权限。