feat(admin): Add user management and upgrade to module permission system
Features - User Management (Phase 4.1): - Database: Add user_modules table for fine-grained module permissions - Database: Add 4 user permissions (view/create/edit/delete) to role_permissions - Backend: UserService (780 lines) - CRUD with tenant isolation - Backend: UserController + UserRoutes (648 lines) - 13 API endpoints - Backend: Batch import users from Excel - Frontend: UserListPage (412 lines) - list/filter/search/pagination - Frontend: UserFormPage (341 lines) - create/edit with module config - Frontend: UserDetailPage (393 lines) - details/tenant/module management - Frontend: 3 modal components (592 lines) - import/assign/configure - API: GET/POST/PUT/DELETE /api/admin/users/* endpoints Architecture Upgrade - Module Permission System: - Backend: Add getUserModules() method in auth.service - Backend: Login API returns modules array in user object - Frontend: AuthContext adds hasModule() method - Frontend: Navigation filters modules based on user.modules - Frontend: RouteGuard checks requiredModule instead of requiredVersion - Frontend: Remove deprecated version-based permission system - UX: Only show accessible modules in navigation (clean UI) - UX: Smart redirect after login (avoid 403 for regular users) Fixes: - Fix UTF-8 encoding corruption in ~100 docs files - Fix pageSize type conversion in userService (String to Number) - Fix authUser undefined error in TopNavigation - Fix login redirect logic with role-based access check - Update Git commit guidelines v1.2 with UTF-8 safety rules Database Changes: - CREATE TABLE user_modules (user_id, tenant_id, module_code, is_enabled) - ADD UNIQUE CONSTRAINT (user_id, tenant_id, module_code) - INSERT 4 permissions + role assignments - UPDATE PUBLIC tenant with 8 module subscriptions Technical: - Backend: 5 new files (~2400 lines) - Frontend: 10 new files (~2500 lines) - Docs: 1 development record + 2 status updates + 1 guideline update - Total: ~4900 lines of code Status: User management 100% complete, module permission system operational
This commit is contained in:
@@ -1,37 +1,37 @@
|
||||
# RVW - 稿件审查系统
|
||||
|
||||
> **妯″潡浠e彿锛?* RVW (Review)
|
||||
> **寮€鍙戠姸鎬侊細** 鈿?鏍稿績鍔熻兘宸插畬鎴愶紝寰呮墿灞?
|
||||
> **鍟嗕笟浠峰€硷細** 猸愨瓙猸愨瓙猸?鍙<>嫭绔嬪敭鍗?
|
||||
> **鐙<EFBFBD>珛鎬э細** 猸愨瓙猸愨瓙猸?鏋侀珮
|
||||
> **模块代号:** RVW (Review)
|
||||
> **开发状态:** ⚡ 核心功能已完成,待扩展
|
||||
> **商业价值:** ⭐⭐⭐⭐⭐ 可独立售卖
|
||||
> **独立性:** ⭐⭐⭐⭐⭐ 极高
|
||||
> **优先级:** P1
|
||||
|
||||
---
|
||||
|
||||
## 📋 模块概述
|
||||
|
||||
绋夸欢瀹℃煡绯荤粺鎻愪緵AI杈呭姪鐨勭ǹ浠舵櫤鑳藉<EFBFBD>鏌ュ姛鑳姐€?
|
||||
稿件审查系统提供AI辅助的稿件智能审查功能。
|
||||
|
||||
**鏍稿績浠峰€硷細** 瀹屽叏鐙<E58F8F>珛鐨勪骇鍝侊紝鍙<E7B49D>嫭绔嬪敭鍗栫粰鏈熷垔缂栬緫閮?
|
||||
**核心价值:** 完全独立的产品,可独立售卖给期刊编辑部
|
||||
|
||||
---
|
||||
|
||||
## 🎯 核心功能
|
||||
|
||||
### 宸插畬鎴愬姛鑳?
|
||||
1. 鉁?**鏂囨。涓婁紶** - Word绋夸欢涓婁紶
|
||||
2. 鉁?**鏂囨湰鎻愬彇** - 璋冪敤鏂囨。澶勭悊寮曟搸
|
||||
3. 鉁?**绋跨害瑙勮寖鎬ц瘎浼?* - 11椤硅瘎浼帮紙editorial_review锛?
|
||||
4. 鉁?**鏂规硶瀛﹁瘎浼?* - 3閮ㄥ垎璇勪及锛坢ethodology_review锛?
|
||||
5. 鉁?**缁煎悎璇勫垎** - 鍙岀淮搴﹁瘎鍒?
|
||||
6. 鉁?**PDF瀵煎嚭** - 璇勪及鎶ュ憡瀵煎嚭
|
||||
### 已完成功能
|
||||
1. ✅ **文档上传** - Word稿件上传
|
||||
2. ✅ **文本提取** - 调用文档处理引擎
|
||||
3. ✅ **稿约规范性评估** - 11项评估(editorial_review)
|
||||
4. ✅ **方法学评估** - 3部分评估(methodology_review)
|
||||
5. ✅ **综合评分** - 双维度评分
|
||||
6. ✅ **PDF导出** - 评估报告导出
|
||||
|
||||
### 未来扩展
|
||||
- 鈴?瀹$ǹ浜虹<E6B59C>鐞?
|
||||
- 鈴?瀹$ǹ娴佺▼绠$悊
|
||||
- 鈴?澶氳疆瀹$ǹ
|
||||
- 鈴?瀹$ǹ鎰忚<E98EB0>妯℃澘
|
||||
- 鈴?鏈熷垔搴撶<E690B4>鐞?
|
||||
- ⏳ 审稿人管理
|
||||
- ⏳ 审稿流程管理
|
||||
- ⏳ 多轮审稿
|
||||
- ⏳ 审稿意见模板
|
||||
- ⏳ 期刊库管理
|
||||
|
||||
---
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
|
||||
```
|
||||
RVW-稿件审查系统/
|
||||
鈹溾攢鈹€ [AI瀵规帴] RVW蹇<EFBFBD>€熶笂涓嬫枃.md # 鈴?寰呭垱寤?
|
||||
├── [AI对接] RVW快速上下文.md # ⏳ 待创建
|
||||
├── 00-项目概述/
|
||||
鈹? 鈹溾攢鈹€ 01-浜у搧闇€姹傛枃妗?PRD).md # 鈴?寰呭垱寤?
|
||||
鈹? 鈹溾攢鈹€ 02-鐙<>珛绯荤粺瑙勫垝.md # 鈴?寰呭垱寤?
|
||||
鈹? 鈹斺攢鈹€ 03-鍟嗕笟妯″紡璁捐<E79281>.md # 鈴?寰呭垱寤?
|
||||
│ ├── 01-产品需求文档(PRD).md # ⏳ 待创建
|
||||
│ ├── 02-独立系统规划.md # ⏳ 待创建
|
||||
│ └── 03-商业模式设计.md # ⏳ 待创建
|
||||
├── 01-设计文档/
|
||||
├── 02-业务规则/
|
||||
鈹? 鈹溾攢鈹€ 01-鏂规硶瀛﹁瘎浼版爣鍑?md # 鈴?寰呰縼绉?
|
||||
鈹? 鈹斺攢鈹€ 02-绋跨害瑙勮寖鎬ц瘎浼版爣鍑?md # 鈴?寰呰縼绉?
|
||||
鈹斺攢鈹€ README.md # 鉁?褰撳墠鏂囨。
|
||||
│ ├── 01-方法学评估标准.md # ⏳ 待迁移
|
||||
│ └── 02-稿约规范性评估标准.md # ⏳ 待迁移
|
||||
└── README.md # ✅ 当前文档
|
||||
```
|
||||
|
||||
---
|
||||
@@ -62,18 +62,18 @@ RVW-稿件审查系统/
|
||||
|
||||
## 🎯 商业模式
|
||||
|
||||
**鐩<EFBFBD>爣瀹㈡埛锛?* 鏈熷垔缂栬緫閮ㄣ€佸嚭鐗堢ぞ銆佸<E98A86>浼?
|
||||
**鍞<EFBFBD>崠鏂瑰紡锛?* 瀹屽叏鐙<E58F8F>珛浜у搧
|
||||
**瀹氫环绛栫暐锛?* 鎸夋湡鍒婅<E98D92>闃?鎴?鎸夌ǹ浠舵暟閲忚<E996B2>璐?
|
||||
**目标客户:** 期刊编辑部、出版社、学会
|
||||
**售卖方式:** 完全独立产品
|
||||
**定价策略:** 按期刊订阅 或 按稿件数量计费
|
||||
|
||||
---
|
||||
|
||||
## 猸?涓轰粈涔堥€傚悎鐙<E6828E>珛锛?
|
||||
## ⭐ 为什么适合独立?
|
||||
|
||||
1. 鉁?**鐢ㄦ埛缇ょ嫭绔?* - 鏈熷垔缂栬緫閮?vs 涓村簥鍖荤敓锛堝畬鍏ㄤ笉鍚岋級
|
||||
2. 鉁?**涓氬姟閫昏緫鐙<E7B7AB>珛** - 涓庡叾浠栨ā鍧楁棤鍏宠仈
|
||||
3. 鉁?**閮ㄧ讲鍦烘櫙鐙<E6AB99>珛** - 鏈熷垔缂栬緫閮ㄦ湁鑷<EFBFBD>繁鐨勯儴缃查渶姹?
|
||||
4. 鉁?**鍟嗕笟妯″紡鐙<E7B4A1>珛** - 鍙<EFBFBD>互鎸夋湡鍒婅<EFBFBD>闃?
|
||||
1. ✅ **用户群独立** - 期刊编辑部 vs 临床医生(完全不同)
|
||||
2. ✅ **业务逻辑独立** - 与其他模块无关联
|
||||
3. ✅ **部署场景独立** - 期刊编辑部有自己的部署需求
|
||||
4. ✅ **商业模式独立** - 可以按期刊订阅
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user