提交代码
This commit is contained in:
1 parent
82b770ef24
commit
652285005a
5 files changed
+2777
-1
No files matched your search
+4
-1
@@ -114,6 +114,9 @@ public class XgHolidayStayServiceImpl implements IXgHolidayStayService {
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getExtField2()), XgHolidayStay::getExtField2, bo.getExtField2());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getExtField3()), XgHolidayStay::getExtField3, bo.getExtField3());
|
||||
|
||||
// 添加创建人过滤条件 - 实现班主任权限控制,只能查看自己创建的数据
|
||||
lqw.eq(bo.getCreateBy() != null, XgHolidayStay::getCreateBy, bo.getCreateBy());
|
||||
|
||||
// 添加状态过滤逻辑
|
||||
addStatusFilter(lqw, bo);
|
||||
|
||||
@@ -122,7 +125,7 @@ public class XgHolidayStayServiceImpl implements IXgHolidayStayService {
|
||||
|
||||
/**
|
||||
* 添加状态过滤条件
|
||||
*
|
||||
*
|
||||
* @param lqw 查询条件构造器
|
||||
* @param bo 查询参数对象
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { HolidayStayVO, HolidayStayForm, HolidayStayQuery, StudentOptionVO, StudentOptionQuery } from '@/api/xg/xgss/holidayStay/holidayStay/types';
|
||||
|
||||
/**
|
||||
* 查询假期留宿管理列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listHolidayStay = (query?: HolidayStayQuery): AxiosPromise<HolidayStayVO[]> => {
|
||||
return request({
|
||||
url: '/holidayStay/holidayStay/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询假期留宿管理详细
|
||||
* @param id
|
||||
*/
|
||||
export const getHolidayStay = (id: string | number): AxiosPromise<HolidayStayVO> => {
|
||||
return request({
|
||||
url: '/holidayStay/holidayStay/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增假期留宿管理
|
||||
* @param data
|
||||
*/
|
||||
export const addHolidayStay = (data: HolidayStayForm) => {
|
||||
return request({
|
||||
url: '/holidayStay/holidayStay',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改假期留宿管理
|
||||
* @param data
|
||||
*/
|
||||
export const updateHolidayStay = (data: HolidayStayForm) => {
|
||||
return request({
|
||||
url: '/holidayStay/holidayStay',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除假期留宿管理
|
||||
* @param id
|
||||
*/
|
||||
export const delHolidayStay = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/holidayStay/holidayStay/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取学生选择器选项列表(支持按学号、姓名检索)
|
||||
* @param query 查询参数
|
||||
* @returns 学生选项列表
|
||||
*/
|
||||
export const getStudentOptions = (
|
||||
query?: StudentOptionQuery
|
||||
): AxiosPromise<{
|
||||
total: number;
|
||||
rows: StudentOptionVO[];
|
||||
}> => {
|
||||
return request({
|
||||
url: '/holidayStay/holidayStay/studentOptions',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取校区选项列表
|
||||
* @returns 校区选项列表
|
||||
*/
|
||||
export const getCampusOptions = (): AxiosPromise<any[]> => {
|
||||
return request({
|
||||
url: '/xqxx/dormCampus/list',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取指定校区的宿舍区选项列表
|
||||
* @param campusId 校区ID
|
||||
* @returns 宿舍区选项列表
|
||||
*/
|
||||
export const getAreaOptions = (campusId?: string | number): AxiosPromise<any[]> => {
|
||||
return request({
|
||||
url: '/ssqxx/dormArea/list',
|
||||
method: 'get',
|
||||
params: campusId ? { campusId } : undefined
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取指定宿舍区的宿舍楼选项列表
|
||||
* @param areaId 宿舍区ID
|
||||
* @returns 宿舍楼选项列表
|
||||
*/
|
||||
export const getBuildingOptions = (areaId?: string | number): AxiosPromise<any[]> => {
|
||||
return request({
|
||||
url: '/sslxx/dormBuilding/list',
|
||||
method: 'get',
|
||||
params: areaId ? { areaId } : undefined
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取指定宿舍楼的房间选项列表
|
||||
* @param buildingId 宿舍楼ID
|
||||
* @returns 房间选项列表
|
||||
*/
|
||||
export const getRoomOptions = (buildingId?: string | number): AxiosPromise<any[]> => {
|
||||
return request({
|
||||
url: '/xgss/dormRoom/list',
|
||||
method: 'get',
|
||||
params: buildingId ? { buildingId } : undefined
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取指定房间的床位选项列表
|
||||
* @param roomId 房间ID
|
||||
* @returns 床位选项列表
|
||||
*/
|
||||
export const getBedOptions = (roomId?: string | number): AxiosPromise<any[]> => {
|
||||
return request({
|
||||
url: '/dormbed/dormBed/list',
|
||||
method: 'get',
|
||||
params: roomId ? { roomId } : undefined
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,751 @@
|
||||
export interface HolidayStayVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
deleted: number;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_msg.id
|
||||
*/
|
||||
studentId: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName: string;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName: string;
|
||||
|
||||
/**
|
||||
* 校区ID,关联xg_dorm_campus.id
|
||||
*/
|
||||
campusId: string | number;
|
||||
|
||||
/**
|
||||
* 校区名称
|
||||
*/
|
||||
campusName: string;
|
||||
|
||||
/**
|
||||
* 宿舍区ID,关联xg_dorm_area.id
|
||||
*/
|
||||
areaId: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍区名称
|
||||
*/
|
||||
areaName: string;
|
||||
|
||||
/**
|
||||
* 宿舍楼ID,关联xg_dorm_building.id
|
||||
*/
|
||||
buildingId: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍楼名称
|
||||
*/
|
||||
buildingName: string;
|
||||
|
||||
/**
|
||||
* 房间ID,关联xg_dorm_room.id
|
||||
*/
|
||||
roomId: string | number;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
roomName: string;
|
||||
|
||||
/**
|
||||
* 床位ID,关联xg_dorm_bed.id
|
||||
*/
|
||||
bedId: string | number;
|
||||
|
||||
/**
|
||||
* 床位名称
|
||||
*/
|
||||
bedName: string;
|
||||
|
||||
/**
|
||||
* 假期类型(寒假、暑假、春节假期、国庆假期等)
|
||||
*/
|
||||
holidayType: string | number;
|
||||
|
||||
/**
|
||||
* 申请留宿开始日期
|
||||
*/
|
||||
applyStartDate: string;
|
||||
|
||||
/**
|
||||
* 申请留宿结束日期
|
||||
*/
|
||||
applyEndDate: string;
|
||||
|
||||
/**
|
||||
* 留宿原因(必填)
|
||||
*/
|
||||
stayReason: string;
|
||||
|
||||
/**
|
||||
* 留宿原因类型(学习、实习、家庭困难、其他)
|
||||
*/
|
||||
stayReasonType: string;
|
||||
|
||||
/**
|
||||
* 学生联系电话
|
||||
*/
|
||||
studentPhone: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人姓名
|
||||
*/
|
||||
emergencyContact: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
emergencyPhone: string;
|
||||
|
||||
/**
|
||||
* 家长同意(0否 1是)
|
||||
*/
|
||||
parentConsent: string;
|
||||
|
||||
/**
|
||||
* 附件OSS文件ID,多个用逗号分隔(申请材料、证明文件等)
|
||||
*/
|
||||
attachmentOssIds: string | number;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
extField1: string;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
extField2: string;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
extField3: string;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface HolidayStayForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_msg.id
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 校区ID,关联xg_dorm_campus.id
|
||||
*/
|
||||
campusId?: string | number;
|
||||
|
||||
/**
|
||||
* 校区名称
|
||||
*/
|
||||
campusName?: string;
|
||||
|
||||
/**
|
||||
* 宿舍区ID,关联xg_dorm_area.id
|
||||
*/
|
||||
areaId?: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍区名称
|
||||
*/
|
||||
areaName?: string;
|
||||
|
||||
/**
|
||||
* 宿舍楼ID,关联xg_dorm_building.id
|
||||
*/
|
||||
buildingId?: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍楼名称
|
||||
*/
|
||||
buildingName?: string;
|
||||
|
||||
/**
|
||||
* 房间ID,关联xg_dorm_room.id
|
||||
*/
|
||||
roomId?: string | number;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
roomName?: string;
|
||||
|
||||
/**
|
||||
* 床位ID,关联xg_dorm_bed.id
|
||||
*/
|
||||
bedId?: string | number;
|
||||
|
||||
/**
|
||||
* 床位名称
|
||||
*/
|
||||
bedName?: string;
|
||||
|
||||
/**
|
||||
* 假期类型(寒假、暑假、春节假期、国庆假期等)
|
||||
*/
|
||||
holidayType?: string | number;
|
||||
|
||||
/**
|
||||
* 申请留宿开始日期
|
||||
*/
|
||||
applyStartDate?: string;
|
||||
|
||||
/**
|
||||
* 申请留宿结束日期
|
||||
*/
|
||||
applyEndDate?: string;
|
||||
|
||||
/**
|
||||
* 留宿原因(必填)
|
||||
*/
|
||||
stayReason?: string;
|
||||
|
||||
/**
|
||||
* 留宿原因类型(学习、实习、家庭困难、其他)
|
||||
*/
|
||||
stayReasonType?: string;
|
||||
|
||||
/**
|
||||
* 学生联系电话
|
||||
*/
|
||||
studentPhone?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人姓名
|
||||
*/
|
||||
emergencyContact?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
emergencyPhone?: string;
|
||||
|
||||
/**
|
||||
* 家长同意(0否 1是)
|
||||
*/
|
||||
parentConsent?: string;
|
||||
|
||||
/**
|
||||
* 附件OSS文件ID,多个用逗号分隔(申请材料、证明文件等)
|
||||
*/
|
||||
attachmentOssIds?: string | number;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
extField1?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
extField2?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
extField3?: string;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface HolidayStayQuery extends PageQuery {
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
deleted?: number;
|
||||
|
||||
/**
|
||||
* 学生ID,关联xg_student_msg.id
|
||||
*/
|
||||
studentId?: string | number;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
studentName?: string;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 校区ID,关联xg_dorm_campus.id
|
||||
*/
|
||||
campusId?: string | number;
|
||||
|
||||
/**
|
||||
* 校区名称
|
||||
*/
|
||||
campusName?: string;
|
||||
|
||||
/**
|
||||
* 宿舍区ID,关联xg_dorm_area.id
|
||||
*/
|
||||
areaId?: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍区名称
|
||||
*/
|
||||
areaName?: string;
|
||||
|
||||
/**
|
||||
* 宿舍楼ID,关联xg_dorm_building.id
|
||||
*/
|
||||
buildingId?: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍楼名称
|
||||
*/
|
||||
buildingName?: string;
|
||||
|
||||
/**
|
||||
* 房间ID,关联xg_dorm_room.id
|
||||
*/
|
||||
roomId?: string | number;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
roomName?: string;
|
||||
|
||||
/**
|
||||
* 床位ID,关联xg_dorm_bed.id
|
||||
*/
|
||||
bedId?: string | number;
|
||||
|
||||
/**
|
||||
* 床位名称
|
||||
*/
|
||||
bedName?: string;
|
||||
|
||||
/**
|
||||
* 假期类型(寒假、暑假、春节假期、国庆假期等)
|
||||
*/
|
||||
holidayType?: string | number;
|
||||
|
||||
/**
|
||||
* 申请留宿开始日期
|
||||
*/
|
||||
applyStartDate?: string;
|
||||
|
||||
/**
|
||||
* 申请留宿结束日期
|
||||
*/
|
||||
applyEndDate?: string;
|
||||
|
||||
/**
|
||||
* 留宿原因(必填)
|
||||
*/
|
||||
stayReason?: string;
|
||||
|
||||
/**
|
||||
* 留宿原因类型(学习、实习、家庭困难、其他)
|
||||
*/
|
||||
stayReasonType?: string;
|
||||
|
||||
/**
|
||||
* 学生联系电话
|
||||
*/
|
||||
studentPhone?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人姓名
|
||||
*/
|
||||
emergencyContact?: string;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
emergencyPhone?: string;
|
||||
|
||||
/**
|
||||
* 家长同意(0否 1是)
|
||||
*/
|
||||
parentConsent?: string;
|
||||
|
||||
/**
|
||||
* 附件OSS文件ID,多个用逗号分隔(申请材料、证明文件等)
|
||||
*/
|
||||
attachmentOssIds?: string | number;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
extField1?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
extField2?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
extField3?: string;
|
||||
|
||||
/**
|
||||
* 状态过滤(valid-有效,invalid-失效)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生选择器选项
|
||||
*/
|
||||
export interface StudentOptionVO {
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 学号
|
||||
*/
|
||||
studentNo: string;
|
||||
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 性别:0-男,1-女
|
||||
*/
|
||||
gender: string;
|
||||
|
||||
/**
|
||||
* 学院ID
|
||||
*/
|
||||
collegeId?: string | number;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业ID
|
||||
*/
|
||||
majorId?: string | number;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
classId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 学生联系电话
|
||||
*/
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
* 宿舍信息
|
||||
*/
|
||||
dormInfo?: {
|
||||
campusId?: string | number;
|
||||
campusName?: string;
|
||||
areaId?: string | number;
|
||||
areaName?: string;
|
||||
buildingId?: string | number;
|
||||
buildingName?: string;
|
||||
roomId?: string | number;
|
||||
roomName?: string;
|
||||
bedId?: string | number;
|
||||
bedName?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生选择器查询参数
|
||||
*/
|
||||
export interface StudentOptionQuery {
|
||||
/**
|
||||
* 搜索关键字(学号或姓名)
|
||||
*/
|
||||
keyword?: string;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
pageNum?: number;
|
||||
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校区选项
|
||||
*/
|
||||
export interface CampusOptionVO {
|
||||
/**
|
||||
* 校区ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 校区名称
|
||||
*/
|
||||
campusName: string;
|
||||
|
||||
/**
|
||||
* 校区编码
|
||||
*/
|
||||
campusCode?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 宿舍区选项
|
||||
*/
|
||||
export interface AreaOptionVO {
|
||||
/**
|
||||
* 宿舍区ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍区名称
|
||||
*/
|
||||
areaName: string;
|
||||
|
||||
/**
|
||||
* 校区ID
|
||||
*/
|
||||
campusId: string | number;
|
||||
|
||||
/**
|
||||
* 校区名称
|
||||
*/
|
||||
campusName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 宿舍楼选项
|
||||
*/
|
||||
export interface BuildingOptionVO {
|
||||
/**
|
||||
* 宿舍楼ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍楼名称
|
||||
*/
|
||||
buildingName: string;
|
||||
|
||||
/**
|
||||
* 宿舍区ID
|
||||
*/
|
||||
areaId: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍区名称
|
||||
*/
|
||||
areaName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 房间选项
|
||||
*/
|
||||
export interface RoomOptionVO {
|
||||
/**
|
||||
* 房间ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
roomName: string;
|
||||
|
||||
/**
|
||||
* 宿舍楼ID
|
||||
*/
|
||||
buildingId: string | number;
|
||||
|
||||
/**
|
||||
* 宿舍楼名称
|
||||
*/
|
||||
buildingName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 床位选项
|
||||
*/
|
||||
export interface BedOptionVO {
|
||||
/**
|
||||
* 床位ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 床位名称
|
||||
*/
|
||||
bedName: string;
|
||||
|
||||
/**
|
||||
* 房间ID
|
||||
*/
|
||||
roomId: string | number;
|
||||
|
||||
/**
|
||||
* 房间名称
|
||||
*/
|
||||
roomName?: string;
|
||||
|
||||
/**
|
||||
* 床位状态(0-空闲,1-已分配,2-已入住)
|
||||
*/
|
||||
bedStatus?: string;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -582,6 +582,7 @@ import { UploadFilled, Document, Loading, Download, Delete } from '@element-plus
|
||||
import { getToken } from '@/utils/auth';
|
||||
import ImagePreview from '@/components/ImagePreview/index.vue';
|
||||
import request from '@/utils/request';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import {
|
||||
listHolidayStay,
|
||||
getHolidayStay,
|
||||
@@ -611,6 +612,9 @@ import {
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { xg_holiday_type, xg_stay_reason_type, sys_yesno } = toRefs<any>(proxy?.useDict('xg_holiday_type', 'xg_stay_reason_type', 'sys_yesno'));
|
||||
|
||||
// 用户store - 用于获取当前登录用户信息,实现权限控制
|
||||
const userStore = useUserStore();
|
||||
|
||||
const holidayStayList = ref<HolidayStayVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
@@ -756,9 +760,17 @@ const uploadData = computed(() => {
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
|
||||
// 确保用户信息已加载
|
||||
if (!userStore.userId) {
|
||||
await userStore.getInfo();
|
||||
}
|
||||
|
||||
// 处理状态过滤逻辑
|
||||
const requestParams = { ...queryParams.value };
|
||||
|
||||
// 添加创建人过滤条件 - 班主任只能看到自己创建的数据
|
||||
requestParams.createBy = userStore.userId;
|
||||
|
||||
// 根据状态设置时间过滤条件
|
||||
if (requestParams.status) {
|
||||
const currentTime = new Date().toISOString().slice(0, 19).replace('T', ' ');
|
||||
|
||||
Reference in new issue
Block a user