提交代码

This commit is contained in:
zlwu committed 2025-08-13 05:03:06 +08:00
1 parent c3735b0ac1
commit 8374ab31b1
20 files changed
+1452 -303

No files matched your search

+23 -1
View File
@@ -1,6 +1,6 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DormBedVO, DormBedForm, DormBedQuery } from '@/api/xg/xgss/dormBed/types';
import { DormBedVO, DormBedDetailVO, DormBedForm, DormBedQuery } from '@/api/xg/xgss/dormBed/types';
/**
* 查询宿舍床位信息列表
@@ -61,3 +61,25 @@ export const delDormBed = (id: string | number | Array<string | number>) => {
method: 'delete'
});
};
/**
* 查询指定房间的床位详细信息列表(包含学生信息)
* @param roomId 房间ID
*/
export const getBedDetailsByRoomId = (roomId: string | number): AxiosPromise<DormBedDetailVO[]> => {
return request({
url: '/dormbed/dormBed/details/room/' + roomId,
method: 'get'
});
};
/**
* 查询指定宿舍楼的床位详细信息列表(包含学生信息)
* @param buildingId 宿舍楼ID
*/
export const getBedDetailsByBuildingId = (buildingId: string | number): AxiosPromise<DormBedDetailVO[]> => {
return request({
url: '/dormbed/dormBed/details/building/' + buildingId,
method: 'get'
});
};
+77
View File
@@ -42,6 +42,83 @@ export interface DormBedVO {
updateTime: Date;
}
/**
* 宿舍床位详细信息对象(包含学生信息)
*/
export interface DormBedDetailVO {
// =============== 床位基本信息 ===============
/** 床位ID */
id: string | number;
/** 床位编号 */
bedCode: string;
/** 床位名称 */
bedName: string;
/** 所属房间ID */
roomId: string | number;
/** 房间名称 */
roomName?: string;
/** 床位类型(1=下铺,2=上铺,3=中铺,4=独立床) */
bedType: string;
/** 床位状态(0=空闲,1=已分配,2=维修中) */
bedStatus: string;
/** 床位备注 */
bedRemark?: string;
// =============== 分配信息 ===============
/** 分配关系ID */
assignmentId?: string | number;
/** 分配时间 */
assignTime?: string;
/** 分配状态(0=正常,1=已退宿) */
assignmentStatus?: string;
// =============== 学院信息 ===============
/** 学院ID */
collegeId?: string | number;
/** 学院名称 */
collegeName?: string;
// =============== 专业信息 ===============
/** 专业ID */
majorId?: string | number;
/** 专业名称 */
majorName?: string;
// =============== 班级信息 ===============
/** 班级ID */
classId?: string | number;
/** 班级名称 */
className?: string;
/** 班级代码 */
classCode?: string;
/** 年级 */
grade?: string;
// =============== 学生信息 ===============
/** 学生ID */
studentId?: string | number;
/** 学号 */
studentNo?: string;
/** 学生姓名 */
studentName?: string;
/** 学生性别(0=男,1=女) */
studentGender?: string;
/** 学生手机号 */
studentPhone?: string;
/** 身份证号 */
studentIdCard?: string;
// =============== 基础字段 ===============
/** 创建者 */
createBy?: number;
/** 创建时间 */
createTime?: string;
/** 更新者 */
updateBy?: number;
/** 更新时间 */
updateTime?: string;
}
/**
* 宿舍床位信息表单对象
*/
+14 -2
View File
@@ -1,6 +1,6 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { StudentQuery, StudentVO, StudentForm, XgDeptTreeVO, R, TableDataInfo } from './types';
import { StudentQuery, StudentVO, StudentForm, XgDeptTreeVO, XgStudentTreeVO, R, TableDataInfo } from './types';
/**
* 查询部门下拉树结构
@@ -196,6 +196,17 @@ export function downloadImportTemplate(): AxiosPromise<any> {
});
}
// 获取学生信息树
export function getStudentTree(secondaryCollegeId: number = 101): AxiosPromise<R<XgStudentTreeVO[]>> {
return request({
url: '/studentMsg/studentMsg/getStudentTree',
method: 'get',
params: {
secondaryCollegeId
}
});
}
// 学生状态修改
export function changeStudentStatus(studentId: string | number, status: string): AxiosPromise<R<any>> {
// 实际使用时连接后端接口
@@ -444,5 +455,6 @@ export default {
deptTreeSelect,
exportStudent,
changeStudentStatus,
XgDeptTreeSelect
XgDeptTreeSelect,
getStudentTree
};
+20
View File
@@ -176,3 +176,23 @@ export interface TableDataInfo<T> {
total: number;
rows: T;
}
// 学生信息树节点类型
export interface XgStudentTreeVO {
id: string;
label: string;
type: 'grade' | 'college' | 'major' | 'class';
maleAssigned?: number;
maleTotal?: number;
femaleAssigned?: number;
femaleTotal?: number;
grade?: string;
collegeId?: number;
collegeName?: string;
majorId?: number;
majorName?: string;
classId?: number;
className?: string;
sortOrder?: number;
children?: XgStudentTreeVO[];
}