refactor(asl): ASL frontend architecture refactoring with left navigation
- feat: Create ASLLayout component with 7-module left navigation - feat: Implement Title Screening Settings page with optimized PICOS layout - feat: Add placeholder pages for Workbench and Results - fix: Fix nested routing structure for React Router v6 - fix: Resolve Spin component warning in MainLayout - fix: Add QueryClientProvider to App.tsx - style: Optimize PICOS form layout (P+I left, C+O+S right) - style: Align Inclusion/Exclusion criteria side-by-side - docs: Add architecture refactoring and routing fix reports Ref: Week 2 Frontend Development Scope: ASL module MVP - Title Abstract Screening
This commit is contained in:
57
backend/src/modules/asl/routes/index.ts
Normal file
57
backend/src/modules/asl/routes/index.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* ASL模块路由注册
|
||||
*/
|
||||
|
||||
import { FastifyInstance } from 'fastify';
|
||||
import * as projectController from '../controllers/projectController.js';
|
||||
import * as literatureController from '../controllers/literatureController.js';
|
||||
|
||||
export async function aslRoutes(fastify: FastifyInstance) {
|
||||
// ==================== 筛选项目路由 ====================
|
||||
|
||||
// 创建筛选项目
|
||||
fastify.post('/projects', projectController.createProject);
|
||||
|
||||
// 获取用户的所有项目
|
||||
fastify.get('/projects', projectController.getProjects);
|
||||
|
||||
// 获取单个项目详情
|
||||
fastify.get('/projects/:projectId', projectController.getProjectById);
|
||||
|
||||
// 更新项目
|
||||
fastify.put('/projects/:projectId', projectController.updateProject);
|
||||
|
||||
// 删除项目
|
||||
fastify.delete('/projects/:projectId', projectController.deleteProject);
|
||||
|
||||
// ==================== 文献管理路由 ====================
|
||||
|
||||
// 导入文献(JSON)
|
||||
fastify.post('/literatures/import', literatureController.importLiteratures);
|
||||
|
||||
// 导入文献(Excel上传)
|
||||
fastify.post('/literatures/import-excel', literatureController.importLiteraturesFromExcel);
|
||||
|
||||
// 获取项目的文献列表
|
||||
fastify.get('/projects/:projectId/literatures', literatureController.getLiteratures);
|
||||
|
||||
// 删除文献
|
||||
fastify.delete('/literatures/:literatureId', literatureController.deleteLiterature);
|
||||
|
||||
// ==================== 筛选任务路由(后续实现) ====================
|
||||
|
||||
// TODO: 启动筛选任务
|
||||
// fastify.post('/projects/:projectId/screening/start', screeningController.startScreening);
|
||||
|
||||
// TODO: 获取筛选进度
|
||||
// fastify.get('/tasks/:taskId/progress', screeningController.getProgress);
|
||||
|
||||
// TODO: 获取筛选结果
|
||||
// fastify.get('/projects/:projectId/results', screeningController.getResults);
|
||||
|
||||
// TODO: 审核冲突文献
|
||||
// fastify.post('/results/review', screeningController.reviewConflicts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user