feat(rvw): Complete RVW module development Phase 1-3
Summary: - Migrate backend to modules/rvw with v2 API routes (/api/v2/rvw) - Add new database fields: selectedAgents, editorialScore, methodologyStatus, picoExtract, isArchived - Create frontend module in frontend-v2/src/modules/rvw - Implement Dashboard with task list, filtering, batch operations - Implement ReportDetail with dual tabs (editorial/methodology) - Implement AgentModal for intelligent agent selection - Register RVW module in moduleRegistry.ts - Add navigation entry in TopNavigation - Update documentation for RVW module status (v3.0) - Update system status document (v2.9) Features: - User can select agents: editorial, methodology, or both - Support batch task execution - Task status filtering - Replace console.log with logger service - Maintain v1 API backward compatibility Tested: Frontend and backend verified locally Status: 85% complete (Phase 1-3 done)
This commit is contained in:
126
backend/src/modules/rvw/__tests__/api.http
Normal file
126
backend/src/modules/rvw/__tests__/api.http
Normal file
@@ -0,0 +1,126 @@
|
||||
### RVW稿件审查模块 - API测试
|
||||
### Phase 1 验证用例
|
||||
|
||||
@baseUrl = http://localhost:3001
|
||||
@taskId = {{$uuid}}
|
||||
|
||||
### ========================================
|
||||
### 1. 创建任务(上传稿件)
|
||||
### POST /api/v2/rvw/tasks
|
||||
### ========================================
|
||||
|
||||
# 注意:需要使用工具(如Postman)上传文件
|
||||
# curl -X POST http://localhost:3001/api/v2/rvw/tasks \
|
||||
# -F "file=@test.docx" \
|
||||
# -F "modelType=deepseek-v3"
|
||||
|
||||
|
||||
### ========================================
|
||||
### 2. 获取任务列表
|
||||
### GET /api/v2/rvw/tasks
|
||||
### ========================================
|
||||
|
||||
### 获取全部任务
|
||||
GET {{baseUrl}}/api/v2/rvw/tasks
|
||||
Content-Type: application/json
|
||||
|
||||
### 获取待处理任务
|
||||
GET {{baseUrl}}/api/v2/rvw/tasks?status=pending
|
||||
Content-Type: application/json
|
||||
|
||||
### 获取已完成任务
|
||||
GET {{baseUrl}}/api/v2/rvw/tasks?status=completed
|
||||
Content-Type: application/json
|
||||
|
||||
### 分页获取
|
||||
GET {{baseUrl}}/api/v2/rvw/tasks?page=1&limit=10
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
### ========================================
|
||||
### 3. 运行审查(选择智能体)
|
||||
### POST /api/v2/rvw/tasks/:taskId/run
|
||||
### ========================================
|
||||
|
||||
### 只选择规范性智能体
|
||||
POST {{baseUrl}}/api/v2/rvw/tasks/{{taskId}}/run
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"agents": ["editorial"]
|
||||
}
|
||||
|
||||
### 只选择方法学智能体
|
||||
POST {{baseUrl}}/api/v2/rvw/tasks/{{taskId}}/run
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"agents": ["methodology"]
|
||||
}
|
||||
|
||||
### 同时选择两个智能体(默认)
|
||||
POST {{baseUrl}}/api/v2/rvw/tasks/{{taskId}}/run
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"agents": ["editorial", "methodology"]
|
||||
}
|
||||
|
||||
|
||||
### ========================================
|
||||
### 4. 批量运行审查
|
||||
### POST /api/v2/rvw/tasks/batch/run
|
||||
### ========================================
|
||||
|
||||
POST {{baseUrl}}/api/v2/rvw/tasks/batch/run
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"taskIds": ["task-id-1", "task-id-2", "task-id-3"],
|
||||
"agents": ["editorial", "methodology"]
|
||||
}
|
||||
|
||||
|
||||
### ========================================
|
||||
### 5. 获取任务详情
|
||||
### GET /api/v2/rvw/tasks/:taskId
|
||||
### ========================================
|
||||
|
||||
GET {{baseUrl}}/api/v2/rvw/tasks/{{taskId}}
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
### ========================================
|
||||
### 6. 获取审查报告
|
||||
### GET /api/v2/rvw/tasks/:taskId/report
|
||||
### ========================================
|
||||
|
||||
GET {{baseUrl}}/api/v2/rvw/tasks/{{taskId}}/report
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
### ========================================
|
||||
### 7. 删除任务
|
||||
### DELETE /api/v2/rvw/tasks/:taskId
|
||||
### ========================================
|
||||
|
||||
DELETE {{baseUrl}}/api/v2/rvw/tasks/{{taskId}}
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
### ========================================
|
||||
### 旧版API(兼容性测试)
|
||||
### ========================================
|
||||
|
||||
### 旧版:获取任务列表
|
||||
GET {{baseUrl}}/api/v1/review/tasks
|
||||
Content-Type: application/json
|
||||
|
||||
### 旧版:获取任务状态
|
||||
GET {{baseUrl}}/api/v1/review/tasks/{{taskId}}
|
||||
Content-Type: application/json
|
||||
|
||||
### 旧版:获取报告
|
||||
GET {{baseUrl}}/api/v1/review/tasks/{{taskId}}/report
|
||||
Content-Type: application/json
|
||||
|
||||
Reference in New Issue
Block a user