Files
one-pipe-system/openspec/changes/add-platform-account-management/proposal.md
2026-01-23 17:18:24 +08:00

44 lines
2.0 KiB
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.
# Change: 平台账号管理功能
## Why
系统需要完整的平台账号管理能力,允许超级管理员管理平台内部的运营和管理人员账号。虽然后端已提供完整的平台账号 API参考 `docs/部分API.md`),但缺少前端管理界面,导致管理员无法通过界面直观地管理平台账号、分配角色和控制账号状态。
## What Changes
- 新增平台账号管理页面(`src/views/system/platform-account/index.vue`
- 完整实现平台账号 CRUD 功能
- 支持平台账号列表查询和筛选
- 提供角色分配功能(为账号分配/移除角色)
- 支持修改账号密码
- 支持启用/禁用账号
- 添加国际化支持(中英文)
- 添加路由配置
- 平台账号 API 模块已完善(已补全缺失接口)
## Impact
- 新增规范:`specs/platform-account-management/spec.md`
- 新增文件:
- `src/views/system/platform-account/index.vue` (平台账号管理页面)
- 修改文件:
- `src/router/routes/asyncRoutes.ts` (添加平台账号管理路由)
- `src/router/routesAlias.ts` (添加路由别名)
- `src/locales/langs/zh.json` (添加中文翻译)
- `src/locales/langs/en.json` (添加英文翻译)
- 依赖接口(参考 `docs/部分API.md`
- 平台账号列表 (GET /api/platform-accounts)
- 新增平台账号 (POST /api/platform-accounts)
- 删除平台账号 (DELETE /api/platform-accounts/:id)
- 获取平台账号详情 (GET /api/platform-accounts/:id)
- 编辑平台账号 (PUT /api/platform-accounts/:id)
- 修改密码 (POST /api/platform-accounts/:id/password)
- 获取账号角色 (GET /api/platform-accounts/:id/roles)
- 分配角色 (POST /api/platform-accounts/:id/roles)
- 移除角色 (DELETE /api/platform-accounts/:id/roles)
- 启用/禁用账号 (PUT /api/platform-accounts/:id/status)
- 依赖模块:
- `src/api/modules/account.ts` (✅ 已补全所有接口)
- 角色管理:获取角色列表用于分配
- 权限系统:控制页面访问权限