Files
shanxia2.0/docs/superpowers/plans/2026-08-20-user-list-role-view.md
T
2026-08-21 09:35:11 +08:00

39 lines
1.4 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.
# 用户列表角色展示与角色详情复用 — Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 用户管理列表展示角色,点击打开与角色管理完全一致的查看/配置弹窗(本页复用)。
**Architecture:** 抽取 `RoleManageDialogs`;列表接口补 `roleIds`;按 roleId 拉详情打开查看。
**Tech Stack:** FastAPI + Vue 3 + Element Plus
---
### Task 1: 后端列表 roleIds + 角色详情
**Files:**
- Modify: `backend/app/api/admin.py`
- Modify: `web-admin/src/api/admin.ts`
- [x] 用户列表批量填充 `roleIds`
- [x] 新增 `GET /web/admin/role-management/{role_id}` 与 `fetchRoleDetail`
### Task 2: 抽取 RoleManageDialogs
**Files:**
- Create: `web-admin/src/components/business/role-manage-dialogs/index.vue`
- Modify: `web-admin/src/views/system/role/index.vue`
- [x] 抽出查看/编辑/菜单/数据权限弹窗与逻辑
- [x] expose: `openAdd` / `openEdit` / `openView` / `openMenuConfig` / `openDataScope` / `openDelete`
- [x] emit `changed`;角色页接入
### Task 3: 用户管理接入
**Files:**
- Modify: `web-admin/src/views/system/user/index.vue`
- [x] 列表「角色」列(可点 tag)
- [x] 挂载 RoleManageDialogs;详情区角色可点