Files
Mdeical_Sur_Report/工程分析/实现方案-2026-04-19-01-14-19.md
2026-04-19 01:15:30 +08:00

22 lines
723 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 实现方案 —— 2026-04-19-01-14-19
## 方案目标
将默认 admin 用户的部门从空字符串改为 "admin"。
## 修改点
### 修改文件:`src/pages/Login.tsx`
`initData()``defaultUsers` 数组中,将 admin 用户的 `department``''` 改为 `'admin'`
同时在 `handleLogin` 的 fallback 默认值中同步修改。
## 涉及文件及修改点
| 文件 | 修改点 |
|------|--------|
| `src/pages/Login.tsx` | defaultUsers 中 admin 的 department 改为 'admin'handleLogin fallback 中同步修改 |
## 风险与注意事项
1. 只影响新系统初始化或 localStorage 被清空后的首次登录。
2. 已有用户的 localStorage 中 admin 部门不会被自动更新。