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

@@ -143,7 +143,7 @@ VITE_API_PROXY_TARGET="http://localhost:3002"
| `manager` | `123456` | 管理员 |
| `0001` | `123456` | 医生 |
登录后建议先进入“系统设置”确认 AI Provider、讯飞语音配置、默认模板和抽帧策略。AI 与语音密钥保存在后端 Settings API 中,不应写入源码、文档或提交记录
登录后建议先进入“系统设置”确认 AI Provider、讯飞语音配置、默认模板和抽帧策略。当前 demo mode 已内置演示用 AI 与语音配置;正式生产部署前必须替换或移除这些演示凭据,后续通过后端 Settings API 或正式密钥管理流程维护
## 初次验收