This commit is contained in:
zlwu committed 2025-08-13 17:21:05 +08:00
commit df38590dbf
7 files changed
+267 -46

No files matched your search

+40 -4
View File
@@ -1,12 +1,13 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { InternshipInfoVO, InternshipInfoQuery, ClassInfoVO, InternshipStatisticsVO } from '@/api/zsjy/types';
import { TableDataInfo, R } from '@/api/types';
/**
* 查询实习信息列表
* @param query 查询参数
*/
export const listInternshipInfo = (query?: InternshipInfoQuery): AxiosPromise<InternshipInfoVO[]> => {
export const listInternshipInfo = (query?: InternshipInfoQuery): AxiosPromise<TableDataInfo<InternshipInfoVO>> => {
return request({
url: '/zsjy/internship/list',
method: 'get',
@@ -18,7 +19,7 @@ export const listInternshipInfo = (query?: InternshipInfoQuery): AxiosPromise<In
* 查询学生实习详细信息
* @param studentId 学生ID
*/
export const getInternshipInfo = (studentId: string | number): AxiosPromise<InternshipInfoVO> => {
export const getInternshipInfo = (studentId: string | number): AxiosPromise<R<InternshipInfoVO>> => {
return request({
url: `/zsjy/internship/${studentId}`,
method: 'get'
@@ -41,7 +42,7 @@ export const exportInternshipInfo = (query: InternshipInfoQuery) => {
/**
* 获取班级信息列表(用于下拉选择)
*/
export const getClassOptions = (): AxiosPromise<ClassInfoVO[]> => {
export const getClassOptions = (): AxiosPromise<R<ClassInfoVO[]>> => {
return request({
url: '/zsjy/internship/classes',
method: 'get'
@@ -52,10 +53,45 @@ export const getClassOptions = (): AxiosPromise<ClassInfoVO[]> => {
* 获取实习统计数据
* @param query 查询参数
*/
export const getInternshipStatistics = (query?: InternshipInfoQuery): AxiosPromise<InternshipStatisticsVO> => {
export const getInternshipStatistics = (query?: InternshipInfoQuery): AxiosPromise<R<InternshipStatisticsVO>> => {
return request({
url: '/zsjy/internship/statistics',
method: 'get',
params: query
});
};
/**
* 新增实习信息
* @param data 实习信息数据
*/
export const addInternshipInfo = (data: any): AxiosPromise<R<void>> => {
return request({
url: '/zsjy/internship',
method: 'post',
data: data
});
};
/**
* 修改实习信息
* @param data 实习信息数据
*/
export const updateInternshipInfo = (data: any): AxiosPromise<R<void>> => {
return request({
url: '/zsjy/internship',
method: 'put',
data: data
});
};
/**
* 删除实习信息
* @param internshipId 实习信息ID
*/
export const delInternshipInfo = (internshipId: string | number): AxiosPromise<R<void>> => {
return request({
url: `/zsjy/internship/${internshipId}`,
method: 'delete'
});
};
+11 -11
View File
@@ -769,7 +769,7 @@ export interface InternshipInfoVO {
/**
* 手机号
*/
mobile?: string;
phone?: string;
/**
* 学院ID
@@ -804,7 +804,7 @@ export interface InternshipInfoVO {
/**
* 班主任姓名
*/
classMasterName?: string;
classTeacherName?: string;
/**
* 实习状态 (0=未实习, 1=实习中, 2=实习完成)
@@ -819,7 +819,7 @@ export interface InternshipInfoVO {
/**
* 实习公司
*/
internshipCompany?: string;
companyName?: string;
/**
* 实习岗位
@@ -829,17 +829,17 @@ export interface InternshipInfoVO {
/**
* 实习开始时间
*/
internshipStartTime?: string;
internshipStartDate?: string;
/**
* 实习结束时间
*/
internshipEndTime?: string;
internshipEndDate?: string;
/**
* 实习地点
*/
internshipLocation?: string;
companyAddress?: string;
/**
* 创建时间
@@ -909,17 +909,17 @@ export interface InternshipInfoQuery {
/**
* 实习公司
*/
internshipCompany?: string;
companyName?: string;
/**
* 开始时间范围
* 实习开始日期-开始
*/
startTimeBegin?: string;
internshipStartDateBegin?: string;
/**
* 开始时间范围
* 实习开始日期-结束
*/
startTimeEnd?: string;
internshipStartDateEnd?: string;
}
/**