提交代码

This commit is contained in:
zlwu committed 2025-08-14 18:13:34 +08:00
1 parent 1db2f91af1
commit 574660ce9f
20 files changed
+2790 -144

No files matched your search

@@ -147,4 +147,32 @@
**📞 联系方式**:如有问题或建议,请联系开发团队
**📅 最后更新**:2025-01-14
**🔄 模块状态**:设计阶段
**🔄 模块状态**:设计阶段
## 🆕 前端功能更新(班主任分配床位给学生)
- 新增页面:`web/src/views/xg/xgss/bzrfp/bzrfp.vue`
- 班主任可在“我的班级”Tab 中,针对每个班级进行床位分配给学生
- 左侧:宿舍楼树(通过接口获取,仅宿舍楼节点可选)
- 右侧:房间/床位树表,支持选择空闲床位与状态查看
- 操作:选择性分配(弹窗)、一键随机分配、按学号分配、一键收回
- 弹窗组件:`web/src/views/xg/xgss/bzrfp/components/SelectiveAllocationDialog.vue`
- 左侧为可用床位列表,右侧为该班级未分配且有住宿需求的学生列表
- 支持随机分配/按学号分配,两侧数量需一致
- 相关前端API(已存在于相应模块,无需新增后端接口):
- 获取班主任宿舍楼树:`getClassTeacherDormTree(classId)` → `@/api/xg/xgss/dormBedStudent/dormBedStudent` 目录
- 获取房间床位详情(含学生):`getClassTeacherBedDetails(buildingId, classId)`
- 获取未分配学生列表:`getClassTeacherUnallocatedStudents(classId)`
- 选择性分配:`classTeacherSelectiveAllocation({ bedIds, studentIds, allocationType }, classId)`
- 一键随机分配:`classTeacherRandomAllocation(buildingId, classId)`
- 按学号分配:`classTeacherStudentNoAllocation(buildingId, classId)`
- 一键收回:`classTeacherRecallBeds(buildingId, classId)`
- 获取我管理的班级列表:`getMyClassListAsTeacher()` → `@/api/xg/xsjcxx/classMsg/classMsg`
- 数据来源说明:
- 分配数据基于 `xg_dorm_bed_student` 关联 `xg_dorm_room`、`xg_student_msg` 实现:
- 通过 `building_id + class_id` 获取该班在楼栋下的房间与床位分配
- 通过 `student_id` 判定床位是否已入住,并展示学生信息
> 本次为前端界面与交互完善,无数据库表结构与后端接口变更。文档同步记录以便后续联调与测试追溯。