兵马未动 粮草先行
This commit is contained in:
@@ -76,13 +76,13 @@ export const delObj = (id: string | number) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param obj
|
||||
* 更新(编辑)
|
||||
* @param obj 含 id 及需修改字段,走接口文档 /edit 接口
|
||||
*/
|
||||
export const putObj = (obj: any) => {
|
||||
return request({
|
||||
url: '/basic/basicclass',
|
||||
method: 'put',
|
||||
url: '/basic/basicclass/edit',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -22,6 +22,19 @@ export const getActivityInfoList = () => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查看详情 - 根据活动ID获取活动子项目列表
|
||||
* 接口文档:GET /api/stuwork/activityinfosub/getActivityInfoSubList
|
||||
* @param activityInfoId 活动信息ID
|
||||
*/
|
||||
export const getActivityInfoSubList = (activityInfoId: string) => {
|
||||
return request({
|
||||
url: '/stuwork/activityinfosub/getActivityInfoSubList',
|
||||
method: 'get',
|
||||
params: { activityInfoId }
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除活动子项目
|
||||
* @param ids
|
||||
|
||||
@@ -103,3 +103,37 @@ export const fearchRoomStuNum = (roomNo: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 互换宿舍(文档:sourceSutNo / targetStuNO)
|
||||
*/
|
||||
export const exchangeRoom = (data: { sourceSutNo: string; targetStuNO: string }) => {
|
||||
return request({
|
||||
url: '/stuwork/dormroomstudent/exchangeRoom',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 打印宿舍卡(按房间号获取打印数据)
|
||||
*/
|
||||
export const printDormRoomData = (roomNo: string) => {
|
||||
return request({
|
||||
url: '/stuwork/dormroomstudent/printDormRoomData',
|
||||
method: 'get',
|
||||
params: { roomNo }
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 空 n 人宿舍导出
|
||||
*/
|
||||
export const exportEmptyPeopleRoomExcel = (data?: any) => {
|
||||
return request({
|
||||
url: '/stuwork/dormroomstudent/exportEmptyPeopleRoomExcel',
|
||||
method: 'post',
|
||||
data: data || {},
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
61
src/api/stuwork/gradustu.ts
Normal file
61
src/api/stuwork/gradustu.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import request from '/@/utils/request'
|
||||
|
||||
/**
|
||||
* 分页查询毕业学生(毕业审核列表)
|
||||
* 后端返回 data.dataList.records / data.dataList.total,此处归一为 data.records / data.total 供 useTable 使用
|
||||
* @param query current, size, graduYear, status, type, stuNo, realName, classCode, deptCode, ...
|
||||
*/
|
||||
export const fetchList = (query?: any) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
}).then((res: any) => {
|
||||
const raw = res.data || {}
|
||||
const dataList = raw.dataList || {}
|
||||
return {
|
||||
...res,
|
||||
data: {
|
||||
records: dataList.records || [],
|
||||
total: dataList.total ?? 0,
|
||||
canExamConduct: raw.canExamConduct,
|
||||
canExamScore: raw.canExamScore,
|
||||
canExamSkill: raw.canExamSkill,
|
||||
canExamStuPunish: raw.canExamStuPunish,
|
||||
canExamBaseInfo: raw.canExamBaseInfo
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成毕业生信息
|
||||
* @param data 如 { type: '0' }
|
||||
*/
|
||||
export const makeGraduStu = (data?: { type?: string }) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/makeGraduStu',
|
||||
method: 'post',
|
||||
data: data || { type: '0' }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取某年毕业生列表(用于统计页前端汇总,大 size 拉取)
|
||||
* @param graduYear 毕业年份
|
||||
*/
|
||||
export const fetchListForAnalyse = (graduYear: string | number) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/page',
|
||||
method: 'get',
|
||||
params: {
|
||||
graduYear,
|
||||
current: 1,
|
||||
size: 9999
|
||||
}
|
||||
}).then((res: any) => {
|
||||
const raw = res.data || {}
|
||||
const dataList = raw.dataList || {}
|
||||
return (dataList.records || []) as any[]
|
||||
})
|
||||
}
|
||||
73
src/api/stuwork/psychologicalcounselingduty.ts
Normal file
73
src/api/stuwork/psychologicalcounselingduty.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
import request from '/@/utils/request'
|
||||
|
||||
/**
|
||||
* 按月份返回值班表(列表)
|
||||
* @param params year, month
|
||||
*/
|
||||
export const listByMonth = (params: { year: string | number; month: string | number }) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingduty/listByMonth',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台获取某年某月值班表,回显到日历/列表
|
||||
* @param params year, month
|
||||
*/
|
||||
export const getDutyByMonth = (params: { year: string | number; month: string | number }) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingduty/getDutyByMonth',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 id 查询值班详情
|
||||
* @param id
|
||||
*/
|
||||
export const getDetail = (id: string) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingduty/detail',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/批量新增值班
|
||||
* @param list 每项 { date: 'YYYY-MM-DD', teacherUserName: '工号', weekType?: 'single'|'double' }
|
||||
*/
|
||||
export const saveDuty = (list: Array<{ date: string; teacherUserName: string; weekType?: string }>) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingduty/saveDuty',
|
||||
method: 'post',
|
||||
data: list
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 一键清空某月值班
|
||||
* @param data { year, month }
|
||||
*/
|
||||
export const clearDuty = (data: { year: number; month: number }) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingduty/clearDuty',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除单个值班(按日期)
|
||||
* @param data { days: 'YYYY-MM-DD' }
|
||||
*/
|
||||
export const clearOneDuty = (data: { days: string }) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingduty/clearOneDuty',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
61
src/api/stuwork/psychologicalcounselingreservation.ts
Normal file
61
src/api/stuwork/psychologicalcounselingreservation.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import request from '/@/utils/request'
|
||||
|
||||
/**
|
||||
* 分页查询预约记录
|
||||
* @param query current, size, stuNo, classNo, reservationTime, isHandle
|
||||
*/
|
||||
export const fetchList = (query?: any) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingreservation/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 id 查询预约记录详情
|
||||
* @param id
|
||||
*/
|
||||
export const getDetail = (id: string) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingreservation/detail',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预约记录
|
||||
* @param data teacherNo, reservationTime, classNo, stuNo, stuName, phone, remarks, realName?, isHandle?
|
||||
*/
|
||||
export const addObj = (data: any) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingreservation',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改预约记录
|
||||
* @param data 含 id 及需修改字段
|
||||
*/
|
||||
export const editObj = (data: any) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingreservation/edit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 id 删除预约记录
|
||||
* @param ids id 数组
|
||||
*/
|
||||
export const delObj = (ids: string[]) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingreservation/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
71
src/api/stuwork/psychologicalcounselingteacher.ts
Normal file
71
src/api/stuwork/psychologicalcounselingteacher.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import request from '/@/utils/request'
|
||||
|
||||
/**
|
||||
* 分页查询心理咨询预约师
|
||||
* @param query current, size, realName
|
||||
*/
|
||||
export const fetchList = (query?: any) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingteacher/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取预约师列表(不分页)
|
||||
*/
|
||||
export const getList = () => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingteacher/list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 id 查询详情
|
||||
* @param id
|
||||
*/
|
||||
export const getDetail = (id: string) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingteacher/detail',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增心理咨询预约师
|
||||
* @param data userName, realName, phone, remarks
|
||||
*/
|
||||
export const addObj = (data: any) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingteacher',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改心理咨询预约师
|
||||
* @param data id, userName, realName, phone, remarks
|
||||
*/
|
||||
export const editObj = (data: any) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingteacher/edit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 id 删除心理咨询预约师
|
||||
* @param ids id 数组
|
||||
*/
|
||||
export const delObj = (ids: string[]) => {
|
||||
return request({
|
||||
url: '/stuwork/psychologicalcounselingteacher/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
@@ -36,6 +36,18 @@ export const getDetail = (id: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过学年学号查看详情(接口文档:GET /stuwork/stuconduct/queryDataByStuNo)
|
||||
* @param params stuNo 学号, schoolYear 学年
|
||||
*/
|
||||
export const queryDataByStuNo = (params: { stuNo: string; schoolYear: string }) => {
|
||||
return request({
|
||||
url: '/stuwork/stuconduct/queryDataByStuNo',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 编辑操行考核
|
||||
* @param data
|
||||
|
||||
25
src/api/stuwork/stugraducheck.ts
Normal file
25
src/api/stuwork/stugraducheck.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import request from '/@/utils/request'
|
||||
|
||||
/**
|
||||
* 毕业学生名单 - 分页查询
|
||||
* 接口文档:GET /api/stuwork/stugraducheck/page
|
||||
* 参数:current, size, graduYear, status, type, stuNo, realName, classCode, deptCode 等
|
||||
* 返回归一为 data.records / data.total 供 useTable 使用
|
||||
*/
|
||||
export const fetchList = (query?: any) => {
|
||||
return request({
|
||||
url: '/stuwork/stugraducheck/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
}).then((res: any) => {
|
||||
const raw = res.data || {}
|
||||
const dataList = raw.dataList || {}
|
||||
return {
|
||||
...res,
|
||||
data: {
|
||||
records: dataList.records || [],
|
||||
total: dataList.total ?? 0
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -60,6 +60,18 @@ export const delObj = (ids: string[]) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 撤销学籍异动
|
||||
* @param ids 异动记录ID列表
|
||||
*/
|
||||
export const cancelObj = (ids: string[]) => {
|
||||
return request({
|
||||
url: '/stuwork/stuturnover/cancel',
|
||||
method: 'post',
|
||||
data: ids
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出学籍异动
|
||||
* @param query
|
||||
|
||||
@@ -12,3 +12,16 @@ export const getClassRoomByClassCode = (classCode: string | number) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 教室安排
|
||||
* 接口文档:POST /api/stuwork/teachclassroomassign/addClassRoomAssign
|
||||
* @param data buildingNo 楼号, position 位置, classCode 班级代码
|
||||
*/
|
||||
export const addClassRoomAssign = (data: { buildingNo?: string | number; position?: string; classCode?: string }) => {
|
||||
return request({
|
||||
url: '/stuwork/teachclassroomassign/addClassRoomAssign',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user