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:
2025-11-18 21:51:51 +08:00
parent e3e7e028e8
commit 3634933ece
213 changed files with 20054 additions and 442 deletions

View 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);
}