Add demo mode factory reset

- Align the backend seeded default surgery template with the report editor's default report content.

- Add backend demo defaults for the default template, Kimi provider, and Xunfei speech proxy configuration.

- Change system reset into a super-admin demo mode factory reset that clears reports, audit logs, files, custom templates, and non-default users.

- Keep only the default admin, manager, doctor, and default surgery template after demo reset.

- Replace the old local-only reset all data button with a two-confirmation backend reset flow.

- Add tests covering demo default alignment and database-backed demo reset behavior.

- Update docs to describe demo mode reset semantics and production credential cautions.
This commit is contained in:
2026-05-02 02:52:30 +08:00
parent bc235b2358
commit 911b96b883
17 changed files with 361 additions and 85 deletions

View File

@@ -64,7 +64,7 @@
- 超级管理员可配置 AI 服务商、接口地址、API Key 和模型名。
- 超级管理员可配置讯飞语音听写参数。
- 所有角色可设置默认报告模板。
- 超级管理员可恢复系统设置;清空全部本地数据仅作为开发/显式本地回退模式下的浏览器缓存操作,不代表清空后端业务数据
- 超级管理员可恢复演示出厂设置该操作会二次确认后清空当前租户报告、审计、自定义模板和非默认用户并恢复默认演示账号、模板、AI 和语音配置
## 非功能需求与约束