Files
Edu/apps/portal-shell/docs/needtodo/SUMMARY-NeedTodo.md
SpecialX 04b7a40bdc feat(portal-shell): 学生域全页面迁移与规范合规修复
- 学生域 32 页全量迁移(含作答/自动保存/提交/诊断)

- 补齐 4 个 MSW mock 缺口,修 diagnostic case 名

- 修 4 处 Tailwind 任意值;新增共享组件与路由
2026-08-31 11:25:21 +08:00

230 lines
8.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# portal-shell 全角色模块页面核查汇总2026-08-04
> 核查日期2026-08-04
> 核查范围:教师、学生、家长、管理员四个角色域全部页面
> 核查方法:逐页面读取 page.tsx 源码,判断实现状态(完整/占位/缺失)
> 详细报告:见各角色域 NeedTodo.md 文档
---
## 一、总体统计
| 角色域 | 页面总数 | ✅ 完整实现 | 🟡 占位空态 | ❌ 缺失 | 详细报告 |
| -------- | -------- | ----------- | ----------- | ------- | -------------------------------------------- |
| 教师域 | 63 | 60 | 3 | 0 | [teacher-NeedTodo.md](./teacher-NeedTodo.md) |
| 学生域 | 32 | 32 | 0 | 0 | [student-NeedTodo.md](./student-NeedTodo.md) |
| 家长域 | 1 | 1 | 0 | 22 | [parent-NeedTodo.md](./parent-NeedTodo.md) |
| 管理员域 | 49 | 49 | 0 | 0 | [admin-NeedTodo.md](./admin-NeedTodo.md) |
| **合计** | **145** | **142** | **3** | **22** | — |
---
## 二、各角色域核查结论
### 2.1 教师域63 页)
**状态**:基本完成,仅 3 个占位页需处理
**3 个占位页(均为 CICD 重定向路径,有等价实现)**
1. `/shell/teacher/classes/students` → 重定向到 `/shell/teacher/students`
2. `/shell/teacher/exams/grading` → 重定向到 `/shell/teacher/homework/submissions`
3. `/shell/teacher/exams/grading/[submissionId]` → 重定向到 `/shell/teacher/homework/submissions/[submissionId]`
**已有资产**
- 55 个 client 组件features/teacher/
- 20 个 lib/api 模块
- 116 个 mock 数据集
**P1-P2 功能增强 backlog**15 页已集成但与 CICD 有功能差距(详见 teacher-NeedTodo.md §三.B
### 2.2 学生域32 页)
**状态**全部真实业务实现4 页 mock 数据缺口
**4 页 mock 数据缺口**
1. `learning-path` - mockMyLearningPath 缺失
2. `elective/[id]` - mockElectiveCourseDetail 缺失
3. `diagnostic` - mockDiagnosticReports 缺失
4. `elective` - 部分字段缺失
**已有资产**
- 28 页 mock 数据齐全,可完整运行
- 全部页面集成 client 组件 + API hook + 三态处理
### 2.3 家长域1 页 + 22 缺失)
**状态**:严重缺失,仅 dashboard 完成
**当前实现**
- `/shell/parent` - 完整实现useParentDashboard hook + 三态处理 + StatCard×2 + DashboardSection×2
**22 个缺失页面**(按 ARCH §9.3 规划 24 页):
1. dashboard 子页trend趋势详情、weakness薄弱点详情
2. children子女管理列表 + [studentId] 详情
3. grades成绩列表 + [id] 详情
4. exams考试列表 + [id] 详情
5. homework作业列表
6. attendance考勤列表
7. classes班级列表
8. course-plans课程计划列表 + [id] 详情
9. lesson-plans教案列表 + [planId]/view
10. error-book错题本列表
11. diagnostic诊断列表
12. learning-path学习路径列表
13. practice练习列表
14. elective选修列表
15. leave请假列表
16. preferences偏好设置列表
17. notifications通知- 共享路由
18. settings设置- 共享路由
**关键阻塞项**
- `features/parent/` 目录完全不存在,所有 client 组件待建
- `myChildren` 契约缺失(子女详情页前置阻塞)
- 5 个 API hooks 已就绪,其余 18+ 页面 hooks 未建立
- 仅 1 项 mock 数据mockParentDashboard
### 2.4 管理员域49 页)
**状态**全部落地0 占位 0 缺失
**已有资产**
- 49 个 page.tsx 入口
- 44 个 features/admin/*-client.tsx 业务组件
- lib/api hooksadmin.ts 973 行 + admin-p5.ts 3371 行)
- mocks/graphql-data.ts9867 行)兜底数据全覆盖
**契约状态**
- 仅 2 页契约就绪dashboard adminDashboard ✅ + plugins config-service ✅)
- 47 页 schema 未就绪,前端用 MSW 兜底先行(@contract-pending 标注)
---
## 三、按优先级排序的待办事项
### P0 - 必须立即处理
#### P0-1: 教师域 3 个占位页改为重定向
- `/shell/teacher/classes/students/page.tsx` → 改为 redirect 到 `/shell/teacher/students`
- `/shell/teacher/exams/grading/page.tsx` → 改为 redirect 到 `/shell/teacher/homework/submissions`
- `/shell/teacher/exams/grading/[submissionId]/page.tsx` → 改为 redirect 到 `/shell/teacher/homework/submissions/[submissionId]`
#### P0-2: 家长域 22 个缺失页面(核心业务)
按业务重要性排序:
1. children子女列表 + 详情)- 家长域核心功能
2. grades成绩查看- 家长最关注
3. homework作业查看
4. attendance考勤查看
5. exams考试结果
6. course-plans课程计划
7. lesson-plans教案查看
8. error-book错题本
9. diagnostic诊断报告
10. leave请假申请
11. learning-path学习路径
12. practice练习记录
13. elective选修课
14. preferences偏好设置
15. trend趋势详情
16. weakness薄弱点详情
17. notifications + settings共享路由
### P1 - 重要功能补全
#### P1-1: 学生域 4 页 mock 数据缺口
- 补齐 mockMyLearningPath
- 补齐 mockElectiveCourseDetail
- 补齐 mockDiagnosticReports
- 补齐 elective 部分字段
#### P1-2: 教师域 15 页功能增强(与 CICD 对齐)
详见 teacher-NeedTodo.md §三.B包括
- exams 富文本编辑器接入exam-edit + new/create
- lesson-plans Tiptap 编辑器 + blocks + AI + 版本历史
- grades 批量录入 + 高级图表 + 成绩单打印
- classes 详情页 widgets + schedule 组件
- attendance 图表 + report-print
- course-plans calendar/form/progress 组件
- error-book 图表组件
- leave 3 个组件 + questions 4 个组件
- schedule-changes grid/rules/auto + practice 图表
- textbooks reader + content-panel
- elective course-list/form/detail
### P2 - 架构优化
#### P2-1: 管理员域契约补齐
- 47 页 schema 未就绪,需后端补齐 GraphQL 契约
- 前端已用 MSW 兜底先行,可继续开发
#### P2-2: 家长域契约补齐
- `myChildren` 契约缺失是核心阻塞
- 需后端补齐家长域相关 GraphQL schema
---
## 四、关键风险
### 4.1 家长域整体缺失(高风险)
- 仅 1/24 页完成,完成率 4.2%
- features/parent/ 目录不存在,需从零建设
- 影响家长端用户体验,无法上线
### 4.2 契约脱节(中风险)
- 管理员域 47/49 页契约 pending
- 家长域核心契约myChildren缺失
- 前端依赖 MSW 兜底,后端就绪前无法真实数据验证
### 4.3 Mock 数据缺口(低风险)
- 学生域 4 页 mock 缺口影响 dev 环境演示
- 家长域仅 1 项 mock新建页面需同步补 mock
---
## 五、建议执行顺序
1. **立即执行 P0-1**:教师域 3 个占位页改为重定向(工作量小,立即见效)
2. **立即执行 P0-2**:家长域 22 个缺失页面(工作量大,需分配专门 AI/开发者)
- 先建立 features/parent/ 目录结构
- 先实现 children 模块(核心功能)
- 逐步实现其他模块
3. **并行执行 P1-1**:学生域 mock 数据补齐(工作量小)
4. **后续执行 P1-2**:教师域功能增强(工作量中等,可分批进行)
5. **后端协同 P2**:契约补齐需后端团队配合
---
## 六、核查文档清单
| 文档 | 路径 | 核查日期 |
| ---------------- | -------------------------------------------- | ---------- |
| 教师域核查报告 | [teacher-NeedTodo.md](./teacher-NeedTodo.md) | 2026-08-04 |
| 学生域核查报告 | [student-NeedTodo.md](./student-NeedTodo.md) | 2026-08-04 |
| 家长域核查报告 | [parent-NeedTodo.md](./parent-NeedTodo.md) | 2026-08-04 |
| 管理员域核查报告 | [admin-NeedTodo.md](./admin-NeedTodo.md) | 2026-08-04 |
| 本汇总报告 | [SUMMARY-NeedTodo.md](./SUMMARY-NeedTodo.md) | 2026-08-04 |
---
**核查完成。四个角色域共 145 个页面142 个已完整实现3 个占位教师域重定向22 个缺失(家长域待建)。**