This commit is contained in:
zlwu committed 2025-08-14 13:18:47 +08:00
1 parent 84016d2f1a
commit 8623173994
15 files changed
+2101 -137

No files matched your search

@@ -94,3 +94,96 @@ export const getCurrentUserCollegeDormTree = (): AxiosPromise<DormBuildingTreeVO
method: 'get'
});
};
// ============== 班主任分配相关API ==============
/**
* 获取班主任管理的班级宿舍楼树形结构
* 只显示班主任管理班级分配到的宿舍楼
*/
export const getClassTeacherDormTree = (classId?: string | number): AxiosPromise<DormBuildingTreeVO[]> => {
return request({
url: '/dormBedStudent/dormBedStudent/getClassTeacherDormTree',
method: 'get',
params: { classId }
});
};
/**
* 获取班主任管理班级的房间床位详情(带学生信息)
* @param buildingId 宿舍楼ID,为空则查询所有楼栋
*/
export const getClassTeacherBedDetails = (
buildingId?: string | number,
classId?: string | number
): AxiosPromise<any[]> => {
return request({
url: '/dormBedStudent/dormBedStudent/getClassTeacherBedDetails',
method: 'get',
params: { buildingId, classId }
});
};
/**
* 获取班主任管理的未分配床位学生列表
*/
export const getClassTeacherUnallocatedStudents = (classId?: string | number): AxiosPromise<any[]> => {
return request({
url: '/dormBedStudent/dormBedStudent/getClassTeacherUnallocatedStudents',
method: 'get',
params: { classId }
});
};
/**
* 班主任一键随机分配床位
* @param buildingId 宿舍楼ID,为空则全部分配
*/
export const classTeacherRandomAllocation = (buildingId?: string | number, classId?: string | number) => {
return request({
url: '/dormBedStudent/dormBedStudent/classTeacherRandomAllocation',
method: 'post',
params: { buildingId, classId }
});
};
/**
* 班主任一键按学号分配床位
* @param buildingId 宿舍楼ID,为空则全部分配
*/
export const classTeacherStudentNoAllocation = (buildingId?: string | number, classId?: string | number) => {
return request({
url: '/dormBedStudent/dormBedStudent/classTeacherStudentNoAllocation',
method: 'post',
params: { buildingId, classId }
});
};
/**
* 班主任选择性分配床位(弹窗模式)
* @param allocationParams 分配参数 {bedIds: number[], studentIds: number[], allocationType: 'random' | 'studentNo'}
*/
export const classTeacherSelectiveAllocation = (allocationParams: {
bedIds: Array<string | number>;
studentIds: Array<string | number>;
allocationType: 'random' | 'studentNo';
}, classId?: string | number) => {
return request({
url: '/dormBedStudent/dormBedStudent/classTeacherSelectiveAllocation',
method: 'post',
data: allocationParams,
params: { classId }
});
};
/**
* 班主任一键收回床位
* @param buildingId 宿舍楼ID,为空则全部收回
*/
export const classTeacherRecallBeds = (buildingId?: string | number, classId?: string | number) => {
return request({
url: '/dormBedStudent/dormBedStudent/classTeacherRecallBeds',
method: 'post',
params: { buildingId, classId }
});
};
@@ -44,3 +44,11 @@ export function delClassMsg(id: string | number) {
method: 'delete'
});
}
// 获取当前登录人作为班主任的班级列表
export function getMyClassListAsTeacher(): AxiosPromise<ClassMsgVO[]> {
return request({
url: '/classMsg/classMsg/myClassListAsTeacher',
method: 'get'
});
}