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

@@ -326,14 +326,27 @@ npx prisma generate
### Day 2: 后端目录结构创建
> **⭐ 前置条件2025-11-16 更新)**:平台已提供存储服务
> **说明**:存储抽象层已在平台级实现(`backend/src/common/storage/`ASL模块可直接使用
> **参考文档**[平台基础设施规划](../../../09-架构实施/04-平台基础设施规划.md)
> **⭐ 前置条件2025-11-17 更新)**:平台基础设施已完成实施 ✅
> **完成状态**8个核心模块100%测试通过
> **完成报告**[平台基础设施实施完成报告](../../../08-项目管理/03-每周计划/2025-11-17-平台基础设施实施完成报告.md)
> **使用指南**[backend/src/common/README.md](../../../../backend/src/common/README.md)
#### 平台提供的存储服务无需ASL模块实现
#### 平台提供的8个核心模块无需ASL模块实现
**平台已提供**`backend/src/common/storage/`
**平台基础设施路径**`backend/src/common/`
| # | 模块 | 使用方式 | 功能说明 |
|---|------|---------|---------|
| 1 | **存储服务** | `import { storage } from '@/common/storage'` | 文件上传下载(本地/OSS切换 |
| 2 | **日志系统** | `import { logger } from '@/common/logging'` | 结构化JSON日志 |
| 3 | **缓存服务** | `import { cache } from '@/common/cache'` | 内存/Redis缓存 |
| 4 | **异步任务** | `import { jobQueue } from '@/common/jobs'` | 长时间任务处理 |
| 5 | **健康检查** | `import { registerHealthRoutes } from '@/common/health'` | SAE健康检查 |
| 6 | **监控指标** | `import { Metrics } from '@/common/monitoring'` | 性能监控和告警 |
| 7 | **数据库连接池** | `import { prisma } from '@/config/database'` | 全局Prisma实例 |
| 8 | **环境配置** | `import { env } from '@/config/env'` | 统一配置管理 |
**存储服务使用示例**
```typescript
// ASL模块直接使用一行代码
import { storage } from '@/common/storage'
@@ -363,11 +376,11 @@ STORAGE_TYPE=local
STORAGE_TYPE=oss
```
**优势**
- ✅ ASL模块无需关心存储实现细节
- ✅ 代码零改动切换环境
- ✅ 所有业务模块AIA/PKB/DC等复用同一套存储服务
- ✅ 统一维护和升级
**核心优势**
- ✅ ASL模块无需关心基础设施实现细节
- ✅ 代码零改动切换环境(本地 ↔ 云端)
- ✅ 所有业务模块AIA/PKB/DC等复用同一套基础设施
- ✅ 统一维护、统一升级、统一监控
---
@@ -430,6 +443,12 @@ export async function aslRoutes(fastify: FastifyInstance) {
**验收标准**
- ✅ 目录结构清晰
- ✅ 路由文件创建完成
-**可正常使用平台服务**
-`import { storage } from '@/common/storage'` 可用
-`import { logger } from '@/common/logging'` 可用
-`import { prisma } from '@/config/database'` 可用
-`import { jobQueue } from '@/common/jobs'` 可用
-`import { cache } from '@/common/cache'` 可用
---
@@ -908,6 +927,7 @@ export default function ASLRoutes() {
---
**更新日志**
- 2025-11-18: V3.1 更新补充平台基础设施完成状态8个核心模块
- 2025-11-16: V3.0 重写基于真实架构Frontend-v2 + Backend + asl_schema
- 2025-11-16: V2.0 重写,详细到每天的任务和代码示例
- 2025-10-29: V1.0 创建,初始版本