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:
@@ -471,7 +471,14 @@ pageSize?: number
|
||||
|
||||
### `POST /api/settings/system/reset`
|
||||
|
||||
只有超级管理员可重置全局系统设置。
|
||||
只有超级管理员可执行演示模式恢复出厂设置。当前实现不只是重置系统设置,而是把当前租户恢复为 demo mode:
|
||||
|
||||
- 用户只保留默认 `admin`、`manager`、`0001` 三个账号,并重置为默认角色、部门、状态和密码。
|
||||
- 报告、报告历史、报告媒体、文件资源和审计日志会被清空。
|
||||
- 模板只保留默认“腹腔镜胆囊切除术报告”,模板 HTML 与图文报告生成的默认报告内容保持一致。
|
||||
- 系统设置恢复为演示默认值,包含默认模板、抽帧策略、Kimi Provider 和讯飞语音代理配置。
|
||||
|
||||
前端必须做二次确认。该接口面向演示/测试环境,不应作为生产数据恢复或备份机制。
|
||||
|
||||
## Signature Files API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user