5 Commits

Author SHA1 Message Date
Developer c166d298b8 fix(ui): 批量修复字号/间距/弹窗/表格 UI 问题(接续)
- 密码修改弹窗: max-w-md→max-w-lg, py-3.5→py-3, text-[10px]→text-xs
- 角色选择按钮: flex-wrap + min-w-[100px] 防窄屏换行
- 用户表格: overflow-x-auto + min-w-[700px] 响应式
- 全部 42 处 text-[10px] → text-xs(标签/徽章/说明文字)
- PermissionSettingsView 剩余 2 处 text-[10px]→text-xs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 10:39:48 +08:00
Developer ffe365201a fix(ui): 统一设计语言——颜色、字号、间距、控件样式
UI 修正清单:
┌────────────────────────────────────────────────────────────┐
│ 问题                     │ 修复                          │
├──────────────────────────┼────────────────────────────────┤
│ 登录页 blue → 不一致     │ 统一改为 indigo 系             │
│ text-[10px] 标签难读     │ → text-xs (设置页所有标签)     │
│ text-[9px] 徽章太小      │ → text-xs (角色/租户/权限)    │
│ text-[14px] 输入框不统一  │ → text-sm (编辑弹窗)          │
│ py-3 vs py-3.5 不一致    │ → py-3 统一 (所有输入框)      │
│ 表格头 py-4 过大         │ → py-3                        │
│ 编辑弹窗 max-w-md 太窄   │ → max-w-lg (更宽松)           │
│ 操作列 opacity-0 隐藏     │ → opacity-60 始终可见         │
│ 原生 checkbox 不匹配      │ → 自定义圆角 checkbox + Check  │
│ 登录页 rounded-lg         │ → rounded-xl 统一             │
│ 登录按钮缺阴影            │ → 加 shadow-lg                │
└────────────────────────────────────────────────────────────┘

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 10:28:49 +08:00
Developer 9b4412792b feat: 用户管理页加角色列和角色编辑弹窗
- 用户表新增「角色」列,显示超级管理员/管理员/用户徽章
- 编辑用户弹窗增加角色选择(USER/TENANT_ADMIN/SUPER_ADMIN)
- 角色选择时同步显示该角色的权限预览
- 保存时自动调用 PATCH /tenants/:id/members/:userId 更新角色
- 新增 test-permission-flow.mjs 三层用户权限测试脚本

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 23:37:13 +08:00
Developer ba33d517c1 feat: 分层 RBAC 权限管理系统
后端:
- 新增 Role / RolePermission 实体(自动 seed 系统角色)
- PermissionService——通过 isAdmin / TenantMember 链路解析用户权限
- @Permission() 装饰器 + PermissionsGuard 守卫
- /api/permissions 和 /api/roles REST API
- UserController 内联 role 检查迁移到 @Permission()
- PermissionModule 全局注册

前端:
- usePermissions hook——获取当前用户权限集
- PermissionGate 组件级门控
- PermissionSettingsView——角色列表+权限矩阵编辑页面
- SettingsView 新增「权限管理」Tab(仅 admin 可见)
- 权限预览(26 项,7 分类)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 23:25:22 +08:00
Developer 0a9588abb7 feat: implement QuestionBank CRUD with pagination and template query
- Add pagination support to findAll (page, limit query params)
- Add findByTemplateId method to service
- Add GET /by-template/:templateId endpoint to controller
- Service already includes CRUD for QuestionBank and QuestionBankItem
2026-04-23 17:19:11 +08:00