心理健康2.0

This commit is contained in:
李旭明 committed 2025-09-16 10:34:38 +08:00
1 parent 067957256d
commit 3b492479b5
63 files changed
+10278 -642

No files matched your search

+153 -2
View File
@@ -4,18 +4,23 @@ import {
XljkConsultationScheduleVO,
XljkConsultationScheduleForm,
XljkConsultationScheduleQuery,
XljkConsultationScheduleSummaryVO,
XljkConsultationAppointmentVO,
XljkConsultationAppointmentForm,
XljkConsultationAppointmentQuery,
AvailableTimeSlot,
TimeSlotDetail,
CounselorOption
CounselorOption,
ScheduleWithStatus,
XljkConsulterVO,
XljkConsulterForm,
XljkConsulterQuery
} from './types';
// ===== 预约时段管理 API =====
// 查询预约时段列表
export const listXljkSchedule = (query: XljkConsultationScheduleQuery): AxiosPromise<XljkConsultationScheduleVO[]> => {
export const listXljkSchedule = (query: XljkConsultationScheduleQuery): AxiosPromise<XljkConsultationScheduleSummaryVO[]> => {
return request({
url: '/xljk/consultation/schedule/list',
method: 'get',
@@ -102,6 +107,15 @@ export const getXljkAvailableTimeSlots = (startDate: string, endDate: string): A
});
};
// 获取日历视图的排班数据(带预约状态)
export const getXljkCalendarSchedules = (startDate: string, endDate: string): AxiosPromise<ScheduleWithStatus[]> => {
return request({
url: '/xljk/consultation/appointment/calendar-schedules',
method: 'get',
params: { startDate, endDate }
});
};
// 获取可用的详细时段列表(30分钟一个时段)
export const getXljkAvailableDetailSlots = (date: string, timeSlot: string): AxiosPromise<TimeSlotDetail[]> => {
return request({
@@ -213,3 +227,140 @@ export const getXljkConsultationClassOptions = (collegeName?: string, majorName?
params: { collegeName, majorName }
});
};
/**
* 查询心理咨询师配置列表
* @param query
* @returns {*}
*/
export const listXljkConsulter = (query?: XljkConsulterQuery): AxiosPromise<XljkConsulterVO[]> => {
return request({
url: '/xljk/consulter/list',
method: 'get',
params: query
})
}
/**
* 查询心理咨询师配置详细
* @param id
*/
export const getXljkConsulter = (id: string | number): AxiosPromise<XljkConsulterVO> => {
return request({
url: '/xljk/consulter/' + id,
method: 'get'
})
}
/**
* 新增心理咨询师配置
* @param data
*/
export const addXljkConsulter = (data: XljkConsulterForm) => {
return request({
url: '/xljk/consulter',
method: 'post',
data: data
})
}
/**
* 修改心理咨询师配置
* @param data
*/
export const updateXljkConsulter = (data: XljkConsulterForm) => {
return request({
url: '/xljk/consulter',
method: 'put',
data: data
})
}
/**
* 删除心理咨询师配置
* @param id
*/
export const delXljkConsulter = (id: string | number | Array<string | number>) => {
return request({
url: '/xljk/consulter/' + id,
method: 'delete'
})
}
/**
* 导出心理咨询师配置
* @param query
* @returns {*}
*/
export const exportXljkConsulter = (query?: XljkConsulterQuery) => {
return request({
url: '/xljk/consulter/export',
method: 'post',
data: query,
responseType: 'blob'
})
}
/**
* 批量添加咨询师
* @param userIds 用户ID列表
* @param remark 备注
*/
export const batchAddConsulters = (userIds: number[], remark?: string) => {
return request({
url: '/xljk/consulter/batchAdd',
method: 'post',
data: {
userIds,
remark
}
})
}
/**
* 查询我配置的咨询师列表
* @param query
*/
export const listMyConfigConsulters = (query?: XljkConsulterQuery): AxiosPromise<XljkConsulterVO[]> => {
return request({
url: '/xljk/consulter/myConfig',
method: 'get',
params: query
})
}
/**
* 批量启用咨询师
* @param ids
*/
export const enableConsulters = (ids: number[]) => {
return request({
url: '/xljk/consulter/enable',
method: 'post',
data: ids
})
}
/**
* 批量停用咨询师
* @param ids
*/
export const disableConsulters = (ids: number[]) => {
return request({
url: '/xljk/consulter/disable',
method: 'post',
data: ids
})
}
/**
* 根据部门ID获取用户列表
* @param deptId
*/
export const listUserByDeptId = (deptId: string | number) => {
return request({
url: '/xljk/consulter/users/' + deptId,
method: 'get'
})
}
+390 -9
View File
@@ -1,3 +1,5 @@
import { PageQuery } from '@/api/types'
export interface XljkConsultationScheduleVO {
/**
* 主键ID
@@ -14,6 +16,11 @@ export interface XljkConsultationScheduleVO {
*/
counselorName?: string;
/**
* 办公室
*/
office?: string;
/**
* 排班日期
*/
@@ -71,6 +78,11 @@ export interface XljkConsultationScheduleForm extends BaseEntity {
*/
counselorId?: number;
/**
* 办公室
*/
office?: string;
/**
* 排班日期
*/
@@ -103,6 +115,11 @@ export interface XljkConsultationScheduleQuery extends PageQuery {
*/
counselorId?: number;
/**
* 办公室
*/
office?: string;
/**
* 排班日期开始
*/
@@ -130,6 +147,10 @@ export interface XljkConsultationScheduleQuery extends PageQuery {
}
export interface XljkConsultationAppointmentVO extends BaseEntity {
/**
* 主键ID
*/
id?: string | number;
/**
* 学生ID
*/
@@ -163,13 +184,13 @@ export interface XljkConsultationAppointmentVO extends BaseEntity {
*/
reason?: string;
/**
* 状态(0待咨询 1已完成 2已取消 3未到访)
* 咨询主题
*/
status?: number;
consultTheme?: string;
/**
* 实际到访时间
* 状态(0待咨询 1已完成 2已取消 3未到访 4待审核 5已驳回)
*/
actualVisitTime?: any;
status?: number | string;
/**
* 沟通时长(分钟)
*/
@@ -186,6 +207,26 @@ export interface XljkConsultationAppointmentVO extends BaseEntity {
* 学生姓名
*/
studentName?: string;
/**
* 心理病史(0-是,1-否)
*/
psychologicalHistory?: number;
/**
* 心理病史详情
*/
psychologicalHistoryDetail?: string;
/**
* 基本情况
*/
basicSituation?: string;
/**
* 重大生活事件
*/
majorLifeEvents?: string;
/**
* 是否需要转介(0-是,1-否)
*/
needReferral?: number;
/**
* 班级
*/
@@ -194,6 +235,10 @@ export interface XljkConsultationAppointmentVO extends BaseEntity {
* 咨询师姓名
*/
counselorName?: string;
/**
* 办公室
*/
office?: string;
/**
* 院系
*/
@@ -202,6 +247,10 @@ export interface XljkConsultationAppointmentVO extends BaseEntity {
* 专业
*/
majorName?: string;
/**
* 本学期到访次数
*/
semesterVisitCount?: number;
}
export interface XljkConsultationAppointmentForm {
@@ -242,13 +291,13 @@ export interface XljkConsultationAppointmentForm {
*/
reason?: string;
/**
* 状态(0待咨询 1已完成 2已取消 3未到访)
* 咨询主题
*/
status?: number;
consultTheme?: string;
/**
* 实际到访时间
* 状态(0待咨询 1已完成 2已取消 3未到访 4待审核 5已驳回)
*/
actualVisitTime?: any;
status?: number | string;
/**
* 沟通时长(分钟)
*/
@@ -261,6 +310,30 @@ export interface XljkConsultationAppointmentForm {
* 咨询师建议
*/
counselorSuggestion?: string;
/**
* 学生姓名
*/
studentName?: string;
/**
* 心理病史(0-是,1-否)
*/
psychologicalHistory?: number;
/**
* 心理病史详情
*/
psychologicalHistoryDetail?: string;
/**
* 基本情况
*/
basicSituation?: string;
/**
* 重大生活事件
*/
majorLifeEvents?: string;
/**
* 是否需要转介(0-是,1-否)
*/
needReferral?: number;
}
export interface XljkConsultationAppointmentQuery extends PageQuery {
@@ -289,6 +362,11 @@ export interface XljkConsultationAppointmentQuery extends PageQuery {
*/
majorName?: string;
/**
* 班级
*/
className?: string;
/**
* 咨询师ID
*/
@@ -312,7 +390,11 @@ export interface XljkConsultationAppointmentQuery extends PageQuery {
/**
* 日期范围参数
*/
params?: any;
params?: {
beginAppointmentDate?: string;
endAppointmentDate?: string;
[key: string]: any;
};
}
export interface AvailableTimeSlot {
@@ -331,6 +413,11 @@ export interface AvailableTimeSlot {
*/
counselorName?: string;
/**
* 办公室
*/
office?: string;
/**
* 日期
*/
@@ -419,6 +506,11 @@ export interface CounselorOption {
* 咨询师姓名
*/
name: string;
/**
* 办公室
*/
office: string;
}
// 预约时段汇总视图对象
@@ -433,6 +525,7 @@ export interface XljkConsultationScheduleSummaryVO {
deleted: number;
counselorId: number;
counselorName: string;
office: string;
dateRange: string;
morningEnabled: boolean;
morningTime: string;
@@ -602,3 +695,291 @@ export interface NoShowVO {
*/
updateTime?: string;
}
/**
* 带预约状态的排班数据
*/
export interface ScheduleWithStatus {
/**
* 排班ID
*/
scheduleId: number;
/**
* 咨询师ID
*/
counselorId: number;
/**
* 咨询师姓名
*/
counselorName?: string;
/**
* 办公室
*/
office?: string;
/**
* 排班日期
*/
date: string;
/**
* 时段类型(0上午 1中午 2下午)
*/
timeSlot: string;
/**
* 开始时间(HH:mm)
*/
startTime: string;
/**
* 结束时间(HH:mm)
*/
endTime: string;
/**
* 时段显示文本(如:上午 08:30-12:00)
*/
timeDisplay: string;
/**
* 是否已预约满
*/
isFullyBooked: boolean;
/**
* 是否已过期
*/
isExpired: boolean;
/**
* 可预约数量
*/
availableSlots: number;
/**
* 总预约数量
*/
totalSlots: number;
/**
* 创建者
*/
createBy?: number;
/**
* 创建时间
*/
createTime?: string;
/**
* 更新者
*/
updateBy?: number;
/**
* 更新时间
*/
updateTime?: string;
}
export interface XljkConsulterVO {
/**
* 主键ID
*/
id: string | number;
/**
* 用户ID
*/
userId: number;
/**
* 用户账号
*/
userName: string;
/**
* 用户昵称
*/
nickName: string;
/**
* 部门ID
*/
deptId: number;
/**
* 部门名称
*/
deptName: string;
/**
* 办公室
*/
office?: string;
/**
* 联系电话
*/
phoneNumber: string;
/**
* 邮箱地址
*/
email: string;
/**
* 状态(1正常 0停用)
*/
status: string;
/**
* 备注说明
*/
remark: string;
/**
* 配置人ID
*/
configBy: number;
/**
* 配置人姓名
*/
configByName: string;
/**
* 创建者
*/
createBy: number;
/**
* 创建时间
*/
createTime: string;
/**
* 更新者
*/
updateBy: number;
/**
* 更新时间
*/
updateTime: string;
}
export interface XljkConsulterForm {
/**
* 主键ID
*/
id?: string | number;
/**
* 用户ID
*/
userId?: number;
/**
* 用户账号
*/
userName?: string;
/**
* 用户昵称
*/
nickName?: string;
/**
* 部门ID
*/
deptId?: number;
/**
* 部门名称
*/
deptName?: string;
/**
* 办公室
*/
office?: string;
/**
* 联系电话
*/
phoneNumber?: string;
/**
* 邮箱地址
*/
email?: string;
/**
* 状态(1正常 0停用)
*/
status?: string;
/**
* 备注说明
*/
remark?: string;
/**
* 配置人ID
*/
configBy?: number;
/**
* 配置人姓名
*/
configByName?: string;
}
export interface XljkConsulterQuery extends PageQuery {
/**
* 用户ID
*/
userId?: number;
/**
* 用户账号
*/
userName?: string;
/**
* 用户昵称
*/
nickName?: string;
/**
* 部门ID
*/
deptId?: number;
/**
* 状态(1正常 0停用)
*/
status?: string;
/**
* 配置人ID
*/
configBy?: number;
/**
* 办公室
*/
office?: string;
/**
* 日期范围参数
*/
'params[beginCreateTime]'?: string;
'params[endCreateTime]'?: string;
}