Add reusable HTML template export
- Add template export utilities for standard JSON packages and standalone HTML template packages. - Make the top-level JSON export use the standard surclaw template package format so it can be imported again. - Add an HTML template package export that embeds A4/print styling and template metadata for visual preview and round-trip import. - Extend template import to accept both JSON and HTML template package files while keeping old raw template JSON compatible. - Add tests for package creation, HTML round-trip import, legacy JSON import, and file name cleanup. - Update template management, feature, progress, testing, and AGENTS documentation for the new export formats.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
- 报告 API 已实现列表、详情、创建、保存、完成修订、历史记录和软删除;`ReportManage`、`ReportView`、`ReportEditor` 已优先调用后端,只有开发/显式回退模式下才保留本地回退。
|
||||
- 后端报告校验已区分草稿和完成状态:草稿允许患者姓名/住院号暂空,完成报告仍强制要求。
|
||||
- 模板管理、字段库、模板导入导出已实现;模板 API 已支持可用/可管理列表、详情、创建、更新、删除和个人模板;字段库已优先接入 `/api/library/fields`。
|
||||
- 模板导出已增加可重新导入的 HTML 模板包,用于比 JSON 更完整地保留报告版式观感。
|
||||
- 模板管理新增后保存内容已改为基于当前页面 state 更新,并与本地兼容缓存合并,避免旧缓存把新建模板从列表中冲掉。
|
||||
- 用户管理、部门管理员约束和部门模板授权已优先接入后端 Users/Departments API;签名上传和模板图片资源已通过 Files API 写入后端文件资源。
|
||||
- 系统设置、抽帧策略、AI Provider、语音参数和默认模板已优先接入 Settings API,只有开发/显式回退模式下才保留本地缓存回退。
|
||||
@@ -83,3 +84,4 @@
|
||||
| 2026-05-02 | 增加 Nginx 和 NestJS 请求体上限配置,修复大图文报告保存 `request entity too large`。 |
|
||||
| 2026-05-02 | 新增 Docker HTTPS 演示入口和麦克风访问说明,解决非安全上下文下语音听写不可启动的问题。 |
|
||||
| 2026-05-02 | 修复模板管理中新建模板后点击保存内容导致模板从列表消失的问题,并补充单元测试和 E2E。 |
|
||||
| 2026-05-02 | 模板管理新增 HTML 模板包导出/导入,修正右上角 JSON 导出为标准模板包。 |
|
||||
|
||||
Reference in New Issue
Block a user