删除老版的学工
This commit is contained in:
1 parent
97575a8793
commit
ba52f7983f
123 files changed
+5
-38097
No files matched your search
@@ -1,316 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ClassInfoVO, ClassInfoQuery, ClassInfoForm, OptionData } from './classInfo/types';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { DeptTreeVO, DeptVO } from '@/api/system/dept/types';
|
||||
import { treeselect as deptTreeselect, listDeptExcludeChild } from '@/api/system/dept';
|
||||
|
||||
// 通用类型定义
|
||||
interface TableDataInfo<T> {
|
||||
code: number;
|
||||
msg: string;
|
||||
rows: T[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
interface R<T> {
|
||||
code: number;
|
||||
msg: string;
|
||||
data: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班级信息列表
|
||||
*/
|
||||
export const listClassInfo = (query: ClassInfoQuery): AxiosPromise<TableDataInfo<ClassInfoVO>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询班级信息详细
|
||||
*/
|
||||
export const getClassInfo = (id: string | number): AxiosPromise<R<ClassInfoVO>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增班级信息
|
||||
*/
|
||||
export const addClassInfo = (data: ClassInfoForm): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改班级信息
|
||||
*/
|
||||
export const updateClassInfo = (data: ClassInfoForm): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除班级信息
|
||||
*/
|
||||
export const delClassInfo = (id: string | number | Array<string | number>): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出班级信息
|
||||
*/
|
||||
export const exportClassInfo = (query: ClassInfoQuery): AxiosPromise<any> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据班级代码查询班级信息
|
||||
*/
|
||||
export const getClassInfoByCode = (classCode: string): AxiosPromise<R<ClassInfoVO>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByClassCode/' + classCode,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据年级查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByGrade = (grade: string): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByGrade/' + grade,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据学院代码查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByCollege = (collegeCode: string): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByCollegeCode/' + collegeCode,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据专业代码查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByMajor = (majorCode: string): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByMajorCode/' + majorCode,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据辅导员ID查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByCounselor = (counselorId: number): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByCounselorId/' + counselorId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据班主任ID查询班级信息列表
|
||||
*/
|
||||
export const getClassInfoByClassTeacher = (classTeacherId: number): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getByClassTeacherId/' + classTeacherId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取班级选项列表(用于下拉框)
|
||||
*/
|
||||
export const getClassOptions = (): AxiosPromise<R<ClassInfoVO[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/getClassOptions', // 修正路径:从 /options 改为 /getClassOptions
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 更新班级学生统计
|
||||
*/
|
||||
export const updateStudentCount = (classId: number): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/updateStudentCount/' + classId,
|
||||
method: 'post' // 修正HTTP方法:从 put 改为 post
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量更新班级学生统计
|
||||
*/
|
||||
export const batchUpdateStudentCount = (classIds: number[]): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/batchUpdateStudentCount',
|
||||
method: 'post', // 修正HTTP方法:从 put 改为 post
|
||||
data: classIds
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 启用班级
|
||||
*/
|
||||
export const enableClass = (id: number): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/enable/' + id,
|
||||
method: 'post' // 修正HTTP方法:从 put 改为 post
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 禁用班级
|
||||
*/
|
||||
export const disableClass = (id: number): AxiosPromise<R<void>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/disable/' + id,
|
||||
method: 'post' // 修正HTTP方法:从 put 改为 post
|
||||
});
|
||||
};
|
||||
|
||||
// ================================
|
||||
// 统计数据接口 - 新增
|
||||
// ================================
|
||||
|
||||
/**
|
||||
* 获取班级信息统计概览
|
||||
*/
|
||||
export const getClassStatistics = (): AxiosPromise<R<any>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计各学院班级数量
|
||||
*/
|
||||
export const countClassByCollege = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/college',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计各年级班级数量
|
||||
*/
|
||||
export const countClassByGrade = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/grade',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计各专业班级数量
|
||||
*/
|
||||
export const countClassByMajor = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/major',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 统计班级状态分布
|
||||
*/
|
||||
export const countClassByStatus = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/classInfo/statistics/status',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取学院选项
|
||||
*/
|
||||
export const getCollegeOptions = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/colleges',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 从系统部门获取学院选项(二级学院)
|
||||
*/
|
||||
export const getDeptCollegeOptions = (): AxiosPromise<DeptTreeVO[]> => {
|
||||
console.log('直接调用部门树API,避免treeselect参数问题');
|
||||
return request({
|
||||
url: '/system/dept/treeselect',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 从系统部门获取专业选项(学院的下级部门)
|
||||
*/
|
||||
export const getDeptMajorOptions = (deptId: string | number): AxiosPromise<DeptVO[]> => {
|
||||
// 确保deptId是有效的数字ID
|
||||
if (!deptId || isNaN(Number(deptId))) {
|
||||
console.error('Invalid deptId:', deptId);
|
||||
return Promise.reject(new Error('无效的部门ID'));
|
||||
}
|
||||
|
||||
// 直接调用接口,不使用封装的系统API
|
||||
const numericDeptId = Number(deptId);
|
||||
console.log('直接调用部门API,使用数字ID:', numericDeptId);
|
||||
|
||||
return request({
|
||||
url: '/system/dept/list/exclude/' + numericDeptId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取辅导员选项
|
||||
*/
|
||||
export const getCounselorOptions = (): AxiosPromise<R<any[]>> => {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/counselors',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取班主任选项列表
|
||||
*/
|
||||
export const getClassTeacherOptions = (): AxiosPromise<R<OptionData[]>> => {
|
||||
console.log('调用班主任API: /xg/classInfo/teacherOptions');
|
||||
return request({
|
||||
url: '/xg/classInfo/teacherOptions',
|
||||
method: 'get',
|
||||
headers: {
|
||||
// 确保请求带有认证信息
|
||||
'Authorization': 'Bearer ' + getToken(),
|
||||
'clientid': import.meta.env.VITE_APP_CLIENT_ID
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,786 +0,0 @@
|
||||
/**
|
||||
* 班级信息管理模块 - 类型定义
|
||||
*/
|
||||
|
||||
/**
|
||||
* 班级信息 VO
|
||||
*/
|
||||
export interface ClassInfoVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
tenantId?: string;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
classCode: string;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className: string;
|
||||
|
||||
/**
|
||||
* 班级类型:regular-普通班级,honor-荣誉班级,experimental-实验班级,special-特殊班级
|
||||
*/
|
||||
classType?: string;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
grade: string;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
enrollmentYear: number;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
graduationYear?: number;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
majorCode?: string;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 培养方式:全日制、在职、函授、夜大等
|
||||
*/
|
||||
trainingType?: string;
|
||||
|
||||
/**
|
||||
* 学位类型:本科、专科、研究生等
|
||||
*/
|
||||
degreeType?: string;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
collegeCode?: string;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
counselorId?: string | number;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
counselorName?: string;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
classTeacherId?: string | number;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
classTeacherName?: string;
|
||||
|
||||
/**
|
||||
* 班级导师ID
|
||||
*/
|
||||
classAdvisorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级导师姓名
|
||||
*/
|
||||
classAdvisorName?: string;
|
||||
|
||||
/**
|
||||
* 班长ID
|
||||
*/
|
||||
classMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班长姓名
|
||||
*/
|
||||
classMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 副班长ID
|
||||
*/
|
||||
deputyMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 副班长姓名
|
||||
*/
|
||||
deputyMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 班级状态:1-正常,2-暂停,3-毕业,4-解散
|
||||
*/
|
||||
classStatus?: string;
|
||||
|
||||
/**
|
||||
* 是否毕业:0-未毕业,1-已毕业
|
||||
*/
|
||||
isGraduation?: number;
|
||||
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
graduationDate?: string;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
plannedCapacity?: number;
|
||||
|
||||
/**
|
||||
* 当前学生数量
|
||||
*/
|
||||
currentStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 最大学生数量
|
||||
*/
|
||||
maxStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 男生数量
|
||||
*/
|
||||
maleCount?: number;
|
||||
|
||||
/**
|
||||
* 女生数量
|
||||
*/
|
||||
femaleCount?: number;
|
||||
|
||||
/**
|
||||
* 在籍学生数量
|
||||
*/
|
||||
activeCount?: number;
|
||||
|
||||
/**
|
||||
* 转入学生数量
|
||||
*/
|
||||
transferInCount?: number;
|
||||
|
||||
/**
|
||||
* 转出学生数量
|
||||
*/
|
||||
transferOutCount?: number;
|
||||
|
||||
/**
|
||||
* 退学学生数量
|
||||
*/
|
||||
dropoutCount?: number;
|
||||
|
||||
/**
|
||||
* 毕业学生数量
|
||||
*/
|
||||
graduateCount?: number;
|
||||
|
||||
/**
|
||||
* 办公室位置
|
||||
*/
|
||||
officeLocation?: string;
|
||||
|
||||
/**
|
||||
* 教室位置
|
||||
*/
|
||||
classLocation?: string;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
contactPhone?: string;
|
||||
|
||||
/**
|
||||
* QQ群号
|
||||
*/
|
||||
qqGroup?: string;
|
||||
|
||||
/**
|
||||
* 微信群
|
||||
*/
|
||||
wechatGroup?: string;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email?: string;
|
||||
|
||||
/**
|
||||
* 课程安排
|
||||
*/
|
||||
classSchedule?: string;
|
||||
|
||||
/**
|
||||
* 班级文化
|
||||
*/
|
||||
classCulture?: string;
|
||||
|
||||
/**
|
||||
* 班级规章制度
|
||||
*/
|
||||
classRules?: string;
|
||||
|
||||
/**
|
||||
* 班级描述
|
||||
*/
|
||||
classDescription?: string;
|
||||
|
||||
/**
|
||||
* 最后统计更新时间
|
||||
*/
|
||||
lastCountUpdate?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
extField1?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
extField2?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
extField3?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createBy?: string | number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
updateBy?: string | number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级信息查询对象
|
||||
*/
|
||||
export interface ClassInfoQuery {
|
||||
/**
|
||||
* 当前页数
|
||||
*/
|
||||
pageNum?: number;
|
||||
|
||||
/**
|
||||
* 每页显示记录数
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
classCode?: string;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 班级类型
|
||||
*/
|
||||
classType?: string;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
grade?: string;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
enrollmentYear?: number;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
graduationYear?: number;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
collegeCode?: string;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
majorCode?: string;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
classTeacherId?: string | number;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
classTeacherName?: string;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
counselorId?: string | number;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
counselorName?: string;
|
||||
|
||||
/**
|
||||
* 班级状态
|
||||
*/
|
||||
classStatus?: string;
|
||||
|
||||
/**
|
||||
* 班级代码列表(批量查询)
|
||||
*/
|
||||
classCodeList?: string[];
|
||||
|
||||
/**
|
||||
* 班级状态列表(批量查询)
|
||||
*/
|
||||
classStatusList?: string[];
|
||||
|
||||
/**
|
||||
* 入学年份开始
|
||||
*/
|
||||
enrollmentYearStart?: number;
|
||||
|
||||
/**
|
||||
* 入学年份结束
|
||||
*/
|
||||
enrollmentYearEnd?: number;
|
||||
|
||||
/**
|
||||
* 创建时间开始
|
||||
*/
|
||||
createTimeStart?: string;
|
||||
|
||||
/**
|
||||
* 创建时间结束
|
||||
*/
|
||||
createTimeEnd?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级信息表单对象
|
||||
*/
|
||||
export interface ClassInfoForm {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 班级代码
|
||||
*/
|
||||
classCode?: string;
|
||||
|
||||
/**
|
||||
* 班级名称
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* 班级类型
|
||||
*/
|
||||
classType?: string;
|
||||
|
||||
/**
|
||||
* 年级
|
||||
*/
|
||||
grade?: string;
|
||||
|
||||
/**
|
||||
* 入学年份
|
||||
*/
|
||||
enrollmentYear?: number;
|
||||
|
||||
/**
|
||||
* 毕业年份
|
||||
*/
|
||||
graduationYear?: number;
|
||||
|
||||
/**
|
||||
* 专业代码
|
||||
*/
|
||||
majorCode?: string;
|
||||
|
||||
/**
|
||||
* 专业名称
|
||||
*/
|
||||
majorName?: string;
|
||||
|
||||
/**
|
||||
* 培养方式
|
||||
*/
|
||||
trainingType?: string;
|
||||
|
||||
/**
|
||||
* 学位类型
|
||||
*/
|
||||
degreeType?: string;
|
||||
|
||||
/**
|
||||
* 学院代码
|
||||
*/
|
||||
collegeCode?: string;
|
||||
|
||||
/**
|
||||
* 学院名称
|
||||
*/
|
||||
collegeName?: string;
|
||||
|
||||
/**
|
||||
* 辅导员ID
|
||||
*/
|
||||
counselorId?: string | number;
|
||||
|
||||
/**
|
||||
* 辅导员姓名
|
||||
*/
|
||||
counselorName?: string;
|
||||
|
||||
/**
|
||||
* 班主任ID
|
||||
*/
|
||||
classTeacherId?: string | number;
|
||||
|
||||
/**
|
||||
* 班主任姓名
|
||||
*/
|
||||
classTeacherName?: string;
|
||||
|
||||
/**
|
||||
* 班级导师ID
|
||||
*/
|
||||
classAdvisorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班级导师姓名
|
||||
*/
|
||||
classAdvisorName?: string;
|
||||
|
||||
/**
|
||||
* 班长ID
|
||||
*/
|
||||
classMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 班长姓名
|
||||
*/
|
||||
classMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 副班长ID
|
||||
*/
|
||||
deputyMonitorId?: string | number;
|
||||
|
||||
/**
|
||||
* 副班长姓名
|
||||
*/
|
||||
deputyMonitorName?: string;
|
||||
|
||||
/**
|
||||
* 班级状态
|
||||
*/
|
||||
classStatus?: string;
|
||||
|
||||
/**
|
||||
* 是否毕业
|
||||
*/
|
||||
isGraduation?: number;
|
||||
|
||||
/**
|
||||
* 毕业日期
|
||||
*/
|
||||
graduationDate?: string;
|
||||
|
||||
/**
|
||||
* 计划容量
|
||||
*/
|
||||
plannedCapacity?: number;
|
||||
|
||||
/**
|
||||
* 当前学生数量
|
||||
*/
|
||||
currentStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 最大学生数量
|
||||
*/
|
||||
maxStudentCount?: number;
|
||||
|
||||
/**
|
||||
* 男生数量
|
||||
*/
|
||||
maleCount?: number;
|
||||
|
||||
/**
|
||||
* 女生数量
|
||||
*/
|
||||
femaleCount?: number;
|
||||
|
||||
/**
|
||||
* 在籍学生数量
|
||||
*/
|
||||
activeCount?: number;
|
||||
|
||||
/**
|
||||
* 转入学生数量
|
||||
*/
|
||||
transferInCount?: number;
|
||||
|
||||
/**
|
||||
* 转出学生数量
|
||||
*/
|
||||
transferOutCount?: number;
|
||||
|
||||
/**
|
||||
* 退学学生数量
|
||||
*/
|
||||
dropoutCount?: number;
|
||||
|
||||
/**
|
||||
* 毕业学生数量
|
||||
*/
|
||||
graduateCount?: number;
|
||||
|
||||
/**
|
||||
* 办公室位置
|
||||
*/
|
||||
officeLocation?: string;
|
||||
|
||||
/**
|
||||
* 教室位置
|
||||
*/
|
||||
classLocation?: string;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
contactPhone?: string;
|
||||
|
||||
/**
|
||||
* QQ群号
|
||||
*/
|
||||
qqGroup?: string;
|
||||
|
||||
/**
|
||||
* 微信群
|
||||
*/
|
||||
wechatGroup?: string;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email?: string;
|
||||
|
||||
/**
|
||||
* 课程安排
|
||||
*/
|
||||
classSchedule?: string;
|
||||
|
||||
/**
|
||||
* 班级文化
|
||||
*/
|
||||
classCulture?: string;
|
||||
|
||||
/**
|
||||
* 班级规章制度
|
||||
*/
|
||||
classRules?: string;
|
||||
|
||||
/**
|
||||
* 班级描述
|
||||
*/
|
||||
classDescription?: string;
|
||||
|
||||
/**
|
||||
* 最后统计更新时间
|
||||
*/
|
||||
lastCountUpdate?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段1
|
||||
*/
|
||||
extField1?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段2
|
||||
*/
|
||||
extField2?: string;
|
||||
|
||||
/**
|
||||
* 扩展字段3
|
||||
*/
|
||||
extField3?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级统计数据
|
||||
*/
|
||||
export interface ClassStatisticsData {
|
||||
/**
|
||||
* 总班级数
|
||||
*/
|
||||
totalCount: number;
|
||||
|
||||
/**
|
||||
* 正常班级数
|
||||
*/
|
||||
activeCount: number;
|
||||
|
||||
/**
|
||||
* 已毕业班级数
|
||||
*/
|
||||
graduatedCount: number;
|
||||
|
||||
/**
|
||||
* 暂停班级数
|
||||
*/
|
||||
suspendedCount: number;
|
||||
|
||||
/**
|
||||
* 解散班级数
|
||||
*/
|
||||
dissolvedCount: number;
|
||||
|
||||
/**
|
||||
* 总学生数
|
||||
*/
|
||||
totalStudentCount: number;
|
||||
|
||||
/**
|
||||
* 平均班级人数
|
||||
*/
|
||||
averageClassSize: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级选项数据
|
||||
*/
|
||||
export interface OptionData {
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
value: string | number;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* 扩展数据
|
||||
*/
|
||||
data?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班级图表数据
|
||||
*/
|
||||
export interface ClassChartData {
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
category: string;
|
||||
|
||||
/**
|
||||
* 数值
|
||||
*/
|
||||
value: number;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
color?: string;
|
||||
|
||||
/**
|
||||
* 百分比
|
||||
*/
|
||||
percentage?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量操作结果
|
||||
*/
|
||||
export interface BatchOperationResult {
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
total: number;
|
||||
|
||||
/**
|
||||
* 成功数
|
||||
*/
|
||||
success: number;
|
||||
|
||||
/**
|
||||
* 失败数
|
||||
*/
|
||||
failed: number;
|
||||
|
||||
/**
|
||||
* 失败的记录
|
||||
*/
|
||||
failedRecords?: Array<{
|
||||
id: string | number;
|
||||
reason: string;
|
||||
}>;
|
||||
}
|
||||
@@ -1,283 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CollectionBatchVO, CollectionBatchForm, CollectionBatchQuery } from './types';
|
||||
|
||||
/**
|
||||
* 查询信息采集批次列表
|
||||
*/
|
||||
export const listCollectionBatch = (query?: CollectionBatchQuery): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询信息采集批次详细
|
||||
*/
|
||||
export const getCollectionBatch = (id: string | number): AxiosPromise<CollectionBatchVO> => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据批次编码查询批次信息
|
||||
*/
|
||||
export const getCollectionBatchByCode = (batchCode: string): AxiosPromise<CollectionBatchVO> => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/code/${batchCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增信息采集批次
|
||||
*/
|
||||
export const addCollectionBatch = (data: CollectionBatchForm) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改信息采集批次
|
||||
*/
|
||||
export const updateCollectionBatch = (data: CollectionBatchForm) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除信息采集批次
|
||||
*/
|
||||
export const delCollectionBatch = (ids: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/${ids}`,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导出信息采集批次
|
||||
*/
|
||||
export const exportCollectionBatch = (query?: CollectionBatchQuery) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询用户权限内的批次列表
|
||||
*/
|
||||
export const getUserPermissionBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/userPermission',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询活跃的批次列表
|
||||
*/
|
||||
export const getActiveBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/active',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询即将开始的批次列表
|
||||
*/
|
||||
export const getUpcomingBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/upcoming',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询即将结束的批次列表
|
||||
*/
|
||||
export const getEndingSoonBatches = (): AxiosPromise<CollectionBatchVO[]> => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/endingSoon',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 开始批次
|
||||
*/
|
||||
export const startBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/start/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 暂停批次
|
||||
*/
|
||||
export const pauseBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/pause/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 恢复批次
|
||||
*/
|
||||
export const resumeBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/resume/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 结束批次
|
||||
*/
|
||||
export const endBatch = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/end/${batchId}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 复制批次
|
||||
*/
|
||||
export const copyBatch = (batchId: string | number, newBatchCode: string, newBatchName: string) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/copy/${batchId}`,
|
||||
method: 'post',
|
||||
data: {
|
||||
newBatchCode,
|
||||
newBatchName
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取批次统计信息
|
||||
*/
|
||||
export const getBatchStatistics = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/statistics/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取整体统计信息
|
||||
*/
|
||||
export const getOverallStatistics = () => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/statistics/overall',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取批次完成度统计
|
||||
*/
|
||||
export const getBatchCompletionStatistics = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/statistics/completion/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取批次多维度统计
|
||||
*/
|
||||
export const getBatchDimensionStatistics = (batchId: string | number, dimension: string) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/statistics/dimension/${batchId}`,
|
||||
method: 'get',
|
||||
params: { dimension }
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量更新批次状态
|
||||
*/
|
||||
export const batchUpdateStatus = (batchIds: Array<string | number>, status: string) => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/batchUpdateStatus',
|
||||
method: 'post',
|
||||
data: {
|
||||
batchIds,
|
||||
status
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 检查批次是否可编辑
|
||||
*/
|
||||
export const checkBatchEditable = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/checkEditable/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 检查批次是否可删除
|
||||
*/
|
||||
export const checkBatchDeletable = (batchId: string | number) => {
|
||||
return request({
|
||||
url: `/xg/collectionBatch/checkDeletable/${batchId}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取可用批次选项
|
||||
*/
|
||||
export const getAvailableBatches = () => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/available',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 导入批次数据
|
||||
*/
|
||||
export const importBatchData = (file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
return request({
|
||||
url: '/xg/collectionBatch/import',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 下载批次数据导入模板
|
||||
*/
|
||||
export const downloadBatchTemplate = () => {
|
||||
return request({
|
||||
url: '/xg/collectionBatch/importTemplate',
|
||||
method: 'post',
|
||||
responseType: 'blob'
|
||||
});
|
||||
};
|
||||
@@ -1,501 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
|
||||
// ========== 统计分析相关类型定义 ==========
|
||||
|
||||
// 统计查询参数
|
||||
export interface StatisticsQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
configName?: string;
|
||||
configType?: string;
|
||||
dimensionType?: string;
|
||||
isEnabled?: boolean;
|
||||
createTime?: string[];
|
||||
}
|
||||
|
||||
// 统计分析查询参数
|
||||
export interface StatisticsAnalysisQuery {
|
||||
statisticsType?: string;
|
||||
dimension?: string;
|
||||
field?: string;
|
||||
groupBy?: string;
|
||||
conditions?: Record<string, any>;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
collegeIds?: number[];
|
||||
majorIds?: number[];
|
||||
classIds?: number[];
|
||||
grades?: string[];
|
||||
genders?: string[];
|
||||
politicalStatuses?: string[];
|
||||
nationalities?: string[];
|
||||
studentStatuses?: string[];
|
||||
trainingTypes?: string[];
|
||||
useCache?: boolean;
|
||||
}
|
||||
|
||||
// 统计配置视图对象
|
||||
export interface StatisticsConfigVo {
|
||||
id?: number;
|
||||
configName?: string;
|
||||
configType?: string;
|
||||
dimensionType?: string;
|
||||
queryConditions?: string;
|
||||
displaySettings?: string;
|
||||
chartType?: string;
|
||||
isEnabled?: boolean;
|
||||
sortOrder?: number;
|
||||
remark?: string;
|
||||
createBy?: number;
|
||||
createTime?: string;
|
||||
updateBy?: number;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
// 统计配置业务对象
|
||||
export interface StatisticsConfigBo {
|
||||
id?: number;
|
||||
configName?: string;
|
||||
configType?: string;
|
||||
dimensionType?: string;
|
||||
queryConditions?: string;
|
||||
displaySettings?: string;
|
||||
chartType?: string;
|
||||
isEnabled?: boolean;
|
||||
sortOrder?: number;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
// 统计结果视图对象
|
||||
export interface StatisticsResultVo {
|
||||
title?: string;
|
||||
type?: string;
|
||||
dimension?: string;
|
||||
data?: Array<Record<string, any>>;
|
||||
total?: number;
|
||||
statisticsTime?: string;
|
||||
fromCache?: boolean;
|
||||
cacheKey?: string;
|
||||
extra?: Record<string, any>;
|
||||
chartConfig?: Record<string, any>;
|
||||
groupData?: Record<string, Array<Record<string, any>>>;
|
||||
summary?: Record<string, any>;
|
||||
}
|
||||
|
||||
// 统计报表视图对象
|
||||
export interface StatisticsReportVo {
|
||||
reportType?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
data?: Array<Record<string, any>>;
|
||||
summary?: Record<string, any>;
|
||||
generateTime?: string;
|
||||
metadata?: {
|
||||
total: number;
|
||||
conditions: Record<string, any>;
|
||||
};
|
||||
}
|
||||
|
||||
// 统计缓存信息
|
||||
export interface StatisticsCacheInfo {
|
||||
key?: string;
|
||||
hitCount?: number;
|
||||
missCount?: number;
|
||||
hitRate?: number;
|
||||
size?: number;
|
||||
lastAccessTime?: string;
|
||||
createTime?: string;
|
||||
expireTime?: string;
|
||||
}
|
||||
|
||||
// 导出参数
|
||||
export interface StatisticsExportQuery {
|
||||
dimension?: string;
|
||||
format?: 'excel' | 'csv';
|
||||
includeChart?: boolean;
|
||||
conditions?: Record<string, any>;
|
||||
reportType?: string;
|
||||
}
|
||||
|
||||
// ========== 统计配置管理API ==========
|
||||
|
||||
// 查询统计配置列表
|
||||
export function listStatisticsConfig(query: StatisticsQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 获取统计配置详情
|
||||
export function getStatisticsConfig(id: number): AxiosPromise<StatisticsConfigVo> {
|
||||
return request({
|
||||
url: `/xg/statisticsConfig/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增统计配置
|
||||
export function addStatisticsConfig(data: StatisticsConfigBo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改统计配置
|
||||
export function updateStatisticsConfig(data: StatisticsConfigBo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除统计配置
|
||||
export function delStatisticsConfig(ids: number[]): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/statisticsConfig/${ids}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出统计配置
|
||||
export function exportStatisticsConfig(query: StatisticsQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsConfig/export',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 启用/禁用统计配置
|
||||
export function changeStatisticsConfigStatus(id: number, status: boolean): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/statisticsConfig/changeStatus`,
|
||||
method: 'put',
|
||||
data: { id, isEnabled: status }
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计分析API ==========
|
||||
|
||||
// 获取统计概览
|
||||
export function getStatisticsOverview(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/overview',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 学院统计
|
||||
export function getCollegeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/college',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 专业统计
|
||||
export function getMajorStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/major',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 班级统计
|
||||
export function getClassStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/class',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 年级统计
|
||||
export function getGradeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/grade',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 性别统计
|
||||
export function getGenderStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/gender',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 年龄统计
|
||||
export function getAgeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/age',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 政治面貌统计
|
||||
export function getPoliticalStatusStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/political',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 民族统计
|
||||
export function getNationStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/nation',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 生源地统计
|
||||
export function getSourceRegionStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/sourceRegion',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 血型统计
|
||||
export function getBloodTypeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/bloodType',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 宗教信仰统计
|
||||
export function getReligionStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/religion',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 学籍状态统计
|
||||
export function getStudentStatusStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/studentStatus',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 按维度统计 - 培养方式统计
|
||||
export function getTrainingTypeStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/trainingType',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 高级统计 - 身高统计
|
||||
export function getHeightStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/height',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 高级统计 - 体重统计
|
||||
export function getWeightStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/weight',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 多维度组合统计
|
||||
export function getMultiDimensionStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/multiDimension',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 时间趋势统计
|
||||
export function getTimeTrendStatistics(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/timeTrend',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计报表API ==========
|
||||
|
||||
// 生成学生信息汇总报表
|
||||
export function generateStudentSummaryReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/studentSummary',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成班级统计报表
|
||||
export function generateClassStatisticsReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/classStatistics',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成学院统计报表
|
||||
export function generateCollegeStatisticsReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/collegeStatistics',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成困难学生统计报表
|
||||
export function generateDifficultStudentReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/difficultStudent',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// 生成特殊群体统计报表
|
||||
export function generateSpecialGroupReport(query: StatisticsAnalysisQuery): AxiosPromise<StatisticsReportVo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/report/specialGroup',
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计导出API ==========
|
||||
|
||||
// 导出统计结果
|
||||
export function exportStatisticsResult(query: StatisticsExportQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出统计报表
|
||||
export function exportStatisticsReport(query: StatisticsExportQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/exportReport',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 统计缓存API ==========
|
||||
|
||||
// 获取缓存统计信息
|
||||
export function getCacheStatistics(): AxiosPromise<StatisticsCacheInfo> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/cache/info',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 清空统计缓存
|
||||
export function clearStatisticsCache(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/cache/clear',
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 预热统计缓存
|
||||
export function warmupStatisticsCache(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/cache/warmup',
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
||||
// ========== 辅助API ==========
|
||||
|
||||
// 获取统计维度选项
|
||||
export function getStatisticsDimensionOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/dimensionOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取图表类型选项
|
||||
export function getChartTypeOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/chartTypeOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取学院选项
|
||||
export function getCollegeOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/collegeOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取专业选项
|
||||
export function getMajorOptions(collegeCode?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/majorOptions',
|
||||
method: 'get',
|
||||
params: { collegeCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取班级选项
|
||||
export function getClassOptions(majorCode?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/classOptions',
|
||||
method: 'get',
|
||||
params: { majorCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取年级选项
|
||||
export function getGradeOptions(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/statisticsAnalysis/gradeOptions',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 执行统计配置
|
||||
export function executeStatisticsConfig(configId: number, query: StatisticsAnalysisQuery): AxiosPromise<StatisticsResultVo> {
|
||||
return request({
|
||||
url: `/xg/statisticsAnalysis/executeConfig/${configId}`,
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
}
|
||||
@@ -1,454 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
// 学生信息数据类型
|
||||
export interface StudentInfo {
|
||||
id?: number;
|
||||
studentNo?: string;
|
||||
name?: string;
|
||||
nameEnglish?: string;
|
||||
formerName?: string;
|
||||
namePinyin?: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
idCard?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
maritalStatus?: string;
|
||||
religion?: string;
|
||||
photoUrl?: string;
|
||||
photoPath?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
enrollmentYear?: number;
|
||||
enrollmentDate?: string;
|
||||
schoolSystem?: number;
|
||||
educationLevel?: string;
|
||||
trainingType?: string;
|
||||
admissionCategory?: string;
|
||||
sourceRegion?: string;
|
||||
middleSchool?: string;
|
||||
studentStatus?: string;
|
||||
infoStatus?: string;
|
||||
counselorName?: string;
|
||||
classTeacherName?: string;
|
||||
qq?: string;
|
||||
wechat?: string;
|
||||
dormitoryBuilding?: string;
|
||||
dormitoryRoom?: string;
|
||||
homeAddress?: string;
|
||||
currentAddress?: string;
|
||||
postalCode?: string;
|
||||
householdRegisterType?: string;
|
||||
hukouLocation?: string;
|
||||
height?: number;
|
||||
weight?: number;
|
||||
bloodType?: string;
|
||||
healthStatus?: string;
|
||||
specialCondition?: string;
|
||||
medicalHistory?: string;
|
||||
allergies?: string;
|
||||
disabilityType?: string;
|
||||
disabilityLevel?: string;
|
||||
emergencyContactName?: string;
|
||||
emergencyContactPhone?: string;
|
||||
emergencyContactRelation?: string;
|
||||
fatherName?: string;
|
||||
fatherPhone?: string;
|
||||
fatherWorkUnit?: string;
|
||||
motherName?: string;
|
||||
motherPhone?: string;
|
||||
motherWorkUnit?: string;
|
||||
guardianName?: string;
|
||||
guardianPhone?: string;
|
||||
guardianRelation?: string;
|
||||
familyIncome?: string;
|
||||
familyEconomicStatus?: string;
|
||||
familyMembers?: number;
|
||||
bankCardNo?: string;
|
||||
bankName?: string;
|
||||
bankBranch?: string;
|
||||
cardHolderName?: string;
|
||||
isPoorStudent?: number;
|
||||
isMinority?: number;
|
||||
isDisabled?: number;
|
||||
isOrphan?: number;
|
||||
isLeftBehindChild?: number;
|
||||
isSingleChild?: number;
|
||||
hasLoan?: number;
|
||||
loanAmount?: number;
|
||||
specialties?: string;
|
||||
awards?: string;
|
||||
violations?: string;
|
||||
socialActivities?: string;
|
||||
dataSource?: string;
|
||||
lastAuditTime?: string;
|
||||
isComplete?: number;
|
||||
completionRate?: number;
|
||||
extField1?: string;
|
||||
extField2?: string;
|
||||
extField3?: string;
|
||||
extField4?: string;
|
||||
extField5?: string;
|
||||
remark?: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
// 查询参数类型
|
||||
export interface StudentQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
studentNo?: string;
|
||||
name?: string;
|
||||
gender?: string;
|
||||
idCard?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
enrollmentYear?: number;
|
||||
studentStatus?: string;
|
||||
infoStatus?: string;
|
||||
counselorId?: number;
|
||||
classTeacherId?: number;
|
||||
}
|
||||
|
||||
// 统计数据类型
|
||||
export interface StatisticsData {
|
||||
totalCount?: number;
|
||||
activeCount?: number;
|
||||
completeCount?: number;
|
||||
pendingCount?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
}
|
||||
|
||||
// 选项数据类型
|
||||
export interface OptionData {
|
||||
value: string | number;
|
||||
label: string;
|
||||
code?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// 查询学生信息列表
|
||||
export function listStudents(query: StudentQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 获取学生信息详情
|
||||
export function getStudent(id: number): AxiosPromise<StudentInfo> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据学号查询学生信息
|
||||
export function getStudentByNo(studentNo: string): AxiosPromise<StudentInfo> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/studentNo/${studentNo}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据身份证号查询学生信息
|
||||
export function getStudentByIdCard(idCard: string): AxiosPromise<StudentInfo> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/idCard/${idCard}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据班级代码查询学生列表
|
||||
export function getStudentsByClass(classCode: string): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/class/${classCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 根据学院代码查询学生列表
|
||||
export function getStudentsByCollege(collegeCode: string): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/college/${collegeCode}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增学生信息
|
||||
export function addStudent(data: StudentInfo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改学生信息
|
||||
export function updateStudent(data: StudentInfo): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除学生信息
|
||||
export function delStudent(ids: number[]): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${ids.join(',')}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出学生信息
|
||||
export function exportStudents(query: StudentQuery): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/export',
|
||||
method: 'post',
|
||||
data: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 批量导入学生信息
|
||||
export function importStudents(data: any): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/import',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取导入模板
|
||||
export function getImportTemplate(): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/importTemplate',
|
||||
method: 'post',
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
// 批量更新学生信息状态
|
||||
export function batchUpdateInfoStatus(studentIds: number[], infoStatus: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/batchUpdateInfoStatus',
|
||||
method: 'put',
|
||||
data: { studentIds, infoStatus }
|
||||
});
|
||||
}
|
||||
|
||||
// 批量更新学生学籍状态
|
||||
export function batchUpdateStudentStatus(studentIds: number[], studentStatus: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/batchUpdateStudentStatus',
|
||||
method: 'put',
|
||||
data: { studentIds, studentStatus }
|
||||
});
|
||||
}
|
||||
|
||||
// 审核学生信息
|
||||
export function auditStudent(studentId: number, auditStatus: string, auditRemark?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${studentId}/audit`,
|
||||
method: 'put',
|
||||
params: { auditStatus, auditRemark }
|
||||
});
|
||||
}
|
||||
|
||||
// 批量审核学生信息
|
||||
export function batchAuditStudents(studentIds: number[], auditStatus: string, auditRemark?: string): AxiosPromise<any> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/batchAudit',
|
||||
method: 'put',
|
||||
data: { studentIds, auditStatus, auditRemark }
|
||||
});
|
||||
}
|
||||
|
||||
// ================================
|
||||
// 统计相关接口
|
||||
// ================================
|
||||
|
||||
// 获取统计概览
|
||||
export function getStatisticsOverview(): AxiosPromise<StatisticsData> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/overview',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计各学院学生数量
|
||||
export function getCollegeStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/college',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计各年级学生数量
|
||||
export function getGradeStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/grade',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计各专业学生数量
|
||||
export function getMajorStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/major',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计学籍状态分布
|
||||
export function getStudentStatusStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/studentStatus',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 统计信息完整度分布
|
||||
export function getCompletionRateStatistics(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/statistics/completionRate',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询信息不完整的学生列表
|
||||
export function getIncompleteStudents(): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/incomplete',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询待审核的学生列表
|
||||
export function getPendingAuditStudents(): AxiosPromise<StudentInfo[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/pendingAudit',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 生成学生信息报表
|
||||
export function generateReport(reportType: string, params?: any): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/report/${reportType}`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// ================================
|
||||
// 选项数据接口
|
||||
// ================================
|
||||
|
||||
// 获取学院选项
|
||||
export function getCollegeOptions(): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/colleges',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取专业选项
|
||||
export function getMajorOptions(collegeCode?: string): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/majors',
|
||||
method: 'get',
|
||||
params: { collegeCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取班级选项
|
||||
export function getClassOptions(majorCode?: string): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/classes',
|
||||
method: 'get',
|
||||
params: { majorCode }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取辅导员选项
|
||||
export function getCounselorOptions(): AxiosPromise<OptionData[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/options/counselors',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取班主任选项
|
||||
export function getClassTeacherOptions(): AxiosPromise<OptionData[]> {
|
||||
console.log('调用班主任API: /xg/classInfo/teacherOptions');
|
||||
return request({
|
||||
url: '/xg/classInfo/teacherOptions',
|
||||
method: 'get',
|
||||
headers: {
|
||||
// 确保请求带有认证信息
|
||||
'Authorization': 'Bearer ' + getToken(),
|
||||
'clientid': import.meta.env.VITE_APP_CLIENT_ID
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 检查学号是否存在
|
||||
export function checkStudentNo(studentNo: string, studentId?: number): AxiosPromise<boolean> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/checkStudentNo',
|
||||
method: 'get',
|
||||
params: { studentNo, studentId }
|
||||
});
|
||||
}
|
||||
|
||||
// 检查身份证号是否存在
|
||||
export function checkIdCard(idCard: string, studentId?: number): AxiosPromise<boolean> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/checkIdCard',
|
||||
method: 'get',
|
||||
params: { idCard, studentId }
|
||||
});
|
||||
}
|
||||
|
||||
// 查询重复学号的学生列表
|
||||
export function getDuplicateStudentNo(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/duplicateStudentNo',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询重复身份证号的学生列表
|
||||
export function getDuplicateIdCard(): AxiosPromise<any[]> {
|
||||
return request({
|
||||
url: '/xg/studentInfo/duplicateIdCard',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 更新学生信息完整度
|
||||
export function updateCompletionRate(studentId: number): AxiosPromise<any> {
|
||||
return request({
|
||||
url: `/xg/studentInfo/${studentId}/updateCompletionRate`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
@@ -1,675 +0,0 @@
|
||||
// 学生信息管理模块类型定义
|
||||
|
||||
// ========== 信息采集批次管理相关类型 ==========
|
||||
|
||||
// 信息采集批次VO
|
||||
export interface CollectionBatchVO {
|
||||
id?: number;
|
||||
batchCode?: string;
|
||||
batchName?: string;
|
||||
batchType?: string;
|
||||
academicYear?: string;
|
||||
semester?: string;
|
||||
batchStatus?: string;
|
||||
publishTime?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
archiveTime?: string;
|
||||
targetColleges?: string;
|
||||
targetGrades?: string;
|
||||
targetMajors?: string;
|
||||
requiredFields?: string;
|
||||
optionalFields?: string;
|
||||
auditLevels?: string;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
completionRate?: number;
|
||||
// 新增统计字段
|
||||
studentCount?: number; // 兼容性字段,映射到 totalStudents
|
||||
pendingCount?: number; // 待提交数量
|
||||
description?: string;
|
||||
editPermissions?: string;
|
||||
auditPermissions?: string;
|
||||
viewPermissions?: string;
|
||||
autoReminder?: number;
|
||||
reminderFrequency?: number;
|
||||
allowModifyAfterSubmit?: number;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
createBy?: number;
|
||||
updateBy?: number;
|
||||
}
|
||||
|
||||
// 信息采集批次表单
|
||||
export interface CollectionBatchForm {
|
||||
id?: number;
|
||||
batchCode?: string;
|
||||
batchName?: string;
|
||||
batchType?: string;
|
||||
academicYear?: string;
|
||||
semester?: string;
|
||||
batchStatus?: string;
|
||||
publishTime?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
archiveTime?: string;
|
||||
targetColleges?: string;
|
||||
targetGrades?: string;
|
||||
targetMajors?: string;
|
||||
requiredFields?: string;
|
||||
optionalFields?: string;
|
||||
auditLevels?: string;
|
||||
description?: string;
|
||||
editPermissions?: string;
|
||||
auditPermissions?: string;
|
||||
viewPermissions?: string;
|
||||
autoReminder?: number;
|
||||
reminderFrequency?: number;
|
||||
allowModifyAfterSubmit?: number;
|
||||
}
|
||||
|
||||
// 信息采集批次查询参数
|
||||
export interface CollectionBatchQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
batchCode?: string;
|
||||
batchName?: string;
|
||||
batchType?: string;
|
||||
academicYear?: string;
|
||||
semester?: string;
|
||||
batchStatus?: string;
|
||||
targetColleges?: string;
|
||||
targetGrades?: string;
|
||||
targetMajors?: string;
|
||||
publishTimeStart?: string;
|
||||
publishTimeEnd?: string;
|
||||
startTimeStart?: string;
|
||||
startTimeEnd?: string;
|
||||
endTimeStart?: string;
|
||||
endTimeEnd?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
// 批次统计信息
|
||||
export interface BatchStatistics {
|
||||
totalBatches?: number;
|
||||
activeBatches?: number;
|
||||
completedBatches?: number;
|
||||
draftBatches?: number;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
completionRate?: number;
|
||||
averageCompletionTime?: number;
|
||||
}
|
||||
|
||||
// 批次完成度统计
|
||||
export interface BatchCompletionStatistics {
|
||||
batchId?: number;
|
||||
batchName?: string;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
pendingCount?: number;
|
||||
completionRate?: number;
|
||||
submitRate?: number;
|
||||
approvalRate?: number;
|
||||
collegeStatistics?: CollegeCompletionStatistics[];
|
||||
}
|
||||
|
||||
// 学院完成度统计
|
||||
export interface CollegeCompletionStatistics {
|
||||
collegeId?: number;
|
||||
collegeName?: string;
|
||||
totalStudents?: number;
|
||||
submittedCount?: number;
|
||||
approvedCount?: number;
|
||||
rejectedCount?: number;
|
||||
pendingCount?: number;
|
||||
completionRate?: number;
|
||||
submitRate?: number;
|
||||
approvalRate?: number;
|
||||
}
|
||||
|
||||
// 批次多维度统计
|
||||
export interface BatchDimensionStatistics {
|
||||
dimension?: string;
|
||||
dimensionName?: string;
|
||||
items?: DimensionStatisticsItem[];
|
||||
}
|
||||
|
||||
// 维度统计项
|
||||
export interface DimensionStatisticsItem {
|
||||
key?: string;
|
||||
label?: string;
|
||||
count?: number;
|
||||
percentage?: number;
|
||||
}
|
||||
|
||||
// ========== 学生信息相关类型 ==========
|
||||
|
||||
// 学生信息完整数据结构
|
||||
export interface StudentInfoVo {
|
||||
id?: number;
|
||||
studentNo?: string;
|
||||
idCard?: string;
|
||||
name?: string;
|
||||
nameEnglish?: string;
|
||||
formerName?: string;
|
||||
namePinyin?: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
maritalStatus?: string;
|
||||
religion?: string;
|
||||
photoUrl?: string;
|
||||
photoPath?: string;
|
||||
studentStatus?: string;
|
||||
enrollmentYear?: number;
|
||||
enrollmentDate?: string;
|
||||
schoolSystem?: number;
|
||||
educationLevel?: string;
|
||||
trainingType?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
counselorId?: number;
|
||||
counselorName?: string;
|
||||
classTeacherId?: number;
|
||||
classTeacherName?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
qq?: string;
|
||||
wechat?: string;
|
||||
dormBuilding?: string;
|
||||
dormRoom?: string;
|
||||
homeAddress?: string;
|
||||
emergencyContact?: string;
|
||||
emergencyPhone?: string;
|
||||
emergencyRelation?: string;
|
||||
fatherName?: string;
|
||||
fatherPhone?: string;
|
||||
fatherJob?: string;
|
||||
motherName?: string;
|
||||
motherPhone?: string;
|
||||
motherJob?: string;
|
||||
familyIncome?: string;
|
||||
familyMembers?: number;
|
||||
height?: number;
|
||||
weight?: number;
|
||||
bloodType?: string;
|
||||
healthStatus?: string;
|
||||
allergies?: string;
|
||||
medicalHistory?: string;
|
||||
bankCardNo?: string;
|
||||
bankName?: string;
|
||||
bankBranch?: string;
|
||||
cardholderName?: string;
|
||||
isFromPoorFamily?: boolean;
|
||||
isMinority?: boolean;
|
||||
isDisabled?: boolean;
|
||||
isOrphan?: boolean;
|
||||
isLeftBehind?: boolean;
|
||||
isOnlyChild?: boolean;
|
||||
specialTalents?: string;
|
||||
awards?: string;
|
||||
violations?: string;
|
||||
socialActivities?: string;
|
||||
infoStatus?: string;
|
||||
dataSource?: string;
|
||||
lastBatchId?: number;
|
||||
lastAuditTime?: string;
|
||||
isComplete?: boolean;
|
||||
completionRate?: number;
|
||||
remark?: string;
|
||||
createBy?: number;
|
||||
createTime?: string;
|
||||
updateBy?: number;
|
||||
updateTime?: string;
|
||||
createDept?: number;
|
||||
tenantId?: string;
|
||||
deleted?: boolean;
|
||||
}
|
||||
|
||||
// 学生信息查询参数
|
||||
export interface StudentQueryBo {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
studentNo?: string;
|
||||
name?: string;
|
||||
gender?: string;
|
||||
idCard?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
enrollmentYear?: number;
|
||||
studentStatus?: string;
|
||||
infoStatus?: string;
|
||||
counselorId?: number;
|
||||
classTeacherId?: number;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
dormBuilding?: string;
|
||||
dormRoom?: string;
|
||||
isFromPoorFamily?: boolean;
|
||||
isMinority?: boolean;
|
||||
isDisabled?: boolean;
|
||||
isOrphan?: boolean;
|
||||
isComplete?: boolean;
|
||||
completionRateMin?: number;
|
||||
completionRateMax?: number;
|
||||
createTimeBegin?: string;
|
||||
createTimeEnd?: string;
|
||||
updateTimeBegin?: string;
|
||||
updateTimeEnd?: string;
|
||||
}
|
||||
|
||||
// 学生信息新增/编辑参数
|
||||
export interface StudentInfoBo {
|
||||
id?: number;
|
||||
studentNo?: string;
|
||||
idCard?: string;
|
||||
name?: string;
|
||||
nameEnglish?: string;
|
||||
formerName?: string;
|
||||
namePinyin?: string;
|
||||
gender?: string;
|
||||
birthDate?: string;
|
||||
nation?: string;
|
||||
politicalStatus?: string;
|
||||
maritalStatus?: string;
|
||||
religion?: string;
|
||||
photoUrl?: string;
|
||||
photoPath?: string;
|
||||
studentStatus?: string;
|
||||
enrollmentYear?: number;
|
||||
enrollmentDate?: string;
|
||||
schoolSystem?: number;
|
||||
educationLevel?: string;
|
||||
trainingType?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
counselorId?: number;
|
||||
counselorName?: string;
|
||||
classTeacherId?: number;
|
||||
classTeacherName?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
qq?: string;
|
||||
wechat?: string;
|
||||
dormBuilding?: string;
|
||||
dormRoom?: string;
|
||||
homeAddress?: string;
|
||||
emergencyContact?: string;
|
||||
emergencyPhone?: string;
|
||||
emergencyRelation?: string;
|
||||
fatherName?: string;
|
||||
fatherPhone?: string;
|
||||
fatherJob?: string;
|
||||
motherName?: string;
|
||||
motherPhone?: string;
|
||||
motherJob?: string;
|
||||
familyIncome?: string;
|
||||
familyMembers?: number;
|
||||
height?: number;
|
||||
weight?: number;
|
||||
bloodType?: string;
|
||||
healthStatus?: string;
|
||||
allergies?: string;
|
||||
medicalHistory?: string;
|
||||
bankCardNo?: string;
|
||||
bankName?: string;
|
||||
bankBranch?: string;
|
||||
cardholderName?: string;
|
||||
isFromPoorFamily?: boolean;
|
||||
isMinority?: boolean;
|
||||
isDisabled?: boolean;
|
||||
isOrphan?: boolean;
|
||||
isLeftBehind?: boolean;
|
||||
isOnlyChild?: boolean;
|
||||
specialTalents?: string;
|
||||
awards?: string;
|
||||
violations?: string;
|
||||
socialActivities?: string;
|
||||
infoStatus?: string;
|
||||
dataSource?: string;
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
// 统计数据结构
|
||||
export interface StatisticsOverview {
|
||||
totalCount?: number;
|
||||
activeCount?: number;
|
||||
completeCount?: number;
|
||||
pendingCount?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
graduatedCount?: number;
|
||||
suspendedCount?: number;
|
||||
poorFamilyCount?: number;
|
||||
minorityCount?: number;
|
||||
disabledCount?: number;
|
||||
orphanCount?: number;
|
||||
}
|
||||
|
||||
// 学院统计数据
|
||||
export interface CollegeStatistics {
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
totalCount?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
activeCount?: number;
|
||||
suspendedCount?: number;
|
||||
graduatedCount?: number;
|
||||
poorFamilyCount?: number;
|
||||
minorityCount?: number;
|
||||
disabledCount?: number;
|
||||
orphanCount?: number;
|
||||
}
|
||||
|
||||
// 年级统计数据
|
||||
export interface GradeStatistics {
|
||||
grade?: string;
|
||||
count?: number;
|
||||
maleCount?: number;
|
||||
femaleCount?: number;
|
||||
activeCount?: number;
|
||||
}
|
||||
|
||||
// 专业统计数据
|
||||
export interface MajorStatistics {
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
count?: number;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
}
|
||||
|
||||
// 学籍状态统计数据
|
||||
export interface StudentStatusStatistics {
|
||||
studentStatus?: string;
|
||||
count?: number;
|
||||
statusName?: string;
|
||||
}
|
||||
|
||||
// 信息完整度统计数据
|
||||
export interface CompletionRateStatistics {
|
||||
rateRange?: string;
|
||||
count?: number;
|
||||
percentage?: number;
|
||||
}
|
||||
|
||||
// 选项数据结构
|
||||
export interface OptionItem {
|
||||
value: string | number;
|
||||
label: string;
|
||||
code?: string;
|
||||
disabled?: boolean;
|
||||
children?: OptionItem[];
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// 学院选项
|
||||
export interface CollegeOption extends OptionItem {
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
}
|
||||
|
||||
// 专业选项
|
||||
export interface MajorOption extends OptionItem {
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
}
|
||||
|
||||
// 班级选项
|
||||
export interface ClassOption extends OptionItem {
|
||||
classCode?: string;
|
||||
className?: string;
|
||||
majorCode?: string;
|
||||
majorName?: string;
|
||||
collegeCode?: string;
|
||||
collegeName?: string;
|
||||
grade?: string;
|
||||
}
|
||||
|
||||
// 教师选项
|
||||
export interface TeacherOption extends OptionItem {
|
||||
teacherId?: number;
|
||||
teacherName?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
department?: string;
|
||||
}
|
||||
|
||||
// 表格列配置
|
||||
export interface TableColumn {
|
||||
prop: string;
|
||||
label: string;
|
||||
width?: number | string;
|
||||
minWidth?: number | string;
|
||||
fixed?: boolean | string;
|
||||
align?: 'left' | 'center' | 'right';
|
||||
sortable?: boolean | string;
|
||||
showOverflowTooltip?: boolean;
|
||||
formatter?: (row: any, column: any, cellValue: any, index: number) => string;
|
||||
render?: (row: any, column: any, cellValue: any, index: number) => any;
|
||||
}
|
||||
|
||||
// 搜索表单配置
|
||||
export interface SearchFormItem {
|
||||
prop: string;
|
||||
label: string;
|
||||
type: 'input' | 'select' | 'date' | 'daterange' | 'number' | 'switch' | 'cascader';
|
||||
placeholder?: string;
|
||||
options?: OptionItem[];
|
||||
width?: number | string;
|
||||
span?: number;
|
||||
rules?: any[];
|
||||
clearable?: boolean;
|
||||
multiple?: boolean;
|
||||
filterable?: boolean;
|
||||
remote?: boolean;
|
||||
remoteMethod?: (query: string) => void;
|
||||
props?: any;
|
||||
format?: string;
|
||||
valueFormat?: string;
|
||||
rangeSeparator?: string;
|
||||
startPlaceholder?: string;
|
||||
endPlaceholder?: string;
|
||||
}
|
||||
|
||||
// 表单配置
|
||||
export interface FormItem {
|
||||
prop: string;
|
||||
label: string;
|
||||
type: 'input' | 'select' | 'date' | 'number' | 'switch' | 'textarea' | 'upload' | 'cascader' | 'radio' | 'checkbox';
|
||||
placeholder?: string;
|
||||
options?: OptionItem[];
|
||||
width?: number | string;
|
||||
span?: number;
|
||||
rules?: any[];
|
||||
required?: boolean;
|
||||
clearable?: boolean;
|
||||
multiple?: boolean;
|
||||
filterable?: boolean;
|
||||
remote?: boolean;
|
||||
remoteMethod?: (query: string) => void;
|
||||
props?: any;
|
||||
format?: string;
|
||||
valueFormat?: string;
|
||||
maxlength?: number;
|
||||
showWordLimit?: boolean;
|
||||
rows?: number;
|
||||
autosize?: boolean | { minRows: number; maxRows: number };
|
||||
accept?: string;
|
||||
listType?: 'text' | 'picture' | 'picture-card';
|
||||
limit?: number;
|
||||
action?: string;
|
||||
headers?: any;
|
||||
data?: any;
|
||||
beforeUpload?: (file: File) => boolean | Promise<boolean>;
|
||||
onSuccess?: (response: any, file: File, fileList: any[]) => void;
|
||||
onError?: (error: any, file: File, fileList: any[]) => void;
|
||||
onRemove?: (file: File, fileList: any[]) => void;
|
||||
disabled?: boolean;
|
||||
readonly?: boolean;
|
||||
size?: 'large' | 'default' | 'small';
|
||||
}
|
||||
|
||||
// 批量操作配置
|
||||
export interface BatchOperation {
|
||||
key: string;
|
||||
label: string;
|
||||
type: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
||||
icon?: string;
|
||||
permission?: string;
|
||||
confirm?: boolean;
|
||||
confirmMessage?: string;
|
||||
handler: (selectedRows: any[], selectedIds: any[]) => void;
|
||||
}
|
||||
|
||||
// 操作按钮配置
|
||||
export interface ActionButton {
|
||||
key: string;
|
||||
label: string;
|
||||
type: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
|
||||
icon?: string;
|
||||
permission?: string;
|
||||
show?: (row: any) => boolean;
|
||||
disabled?: (row: any) => boolean;
|
||||
confirm?: boolean;
|
||||
confirmMessage?: string | ((row: any) => string);
|
||||
handler: (row: any, index: number) => void;
|
||||
}
|
||||
|
||||
// 统计卡片配置
|
||||
export interface StatisticsCard {
|
||||
title: string;
|
||||
value: number | string;
|
||||
icon: string;
|
||||
color: string;
|
||||
trend?: {
|
||||
type: 'up' | 'down';
|
||||
value: number | string;
|
||||
label: string;
|
||||
};
|
||||
action?: {
|
||||
label: string;
|
||||
handler: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
// 图表配置
|
||||
export interface ChartConfig {
|
||||
type: 'bar' | 'line' | 'pie' | 'doughnut' | 'radar';
|
||||
title?: string;
|
||||
data: any[];
|
||||
xField?: string;
|
||||
yField?: string;
|
||||
seriesField?: string;
|
||||
colorField?: string;
|
||||
colors?: string[];
|
||||
legend?: boolean;
|
||||
tooltip?: boolean;
|
||||
label?: boolean;
|
||||
height?: number;
|
||||
width?: number;
|
||||
padding?: number | number[];
|
||||
meta?: any;
|
||||
interactions?: any[];
|
||||
annotations?: any[];
|
||||
}
|
||||
|
||||
// 导入配置
|
||||
export interface ImportConfig {
|
||||
templateUrl: string;
|
||||
uploadUrl: string;
|
||||
maxSize: number;
|
||||
allowedTypes: string[];
|
||||
requiredFields: string[];
|
||||
fieldMapping: { [key: string]: string };
|
||||
validateRules: { [key: string]: any[] };
|
||||
beforeUpload?: (file: File) => boolean | Promise<boolean>;
|
||||
onProgress?: (percent: number) => void;
|
||||
onSuccess?: (response: any) => void;
|
||||
onError?: (error: any) => void;
|
||||
}
|
||||
|
||||
// 导出配置
|
||||
export interface ExportConfig {
|
||||
filename: string;
|
||||
sheetName: string;
|
||||
columns: {
|
||||
prop: string;
|
||||
label: string;
|
||||
width?: number;
|
||||
formatter?: (value: any, row: any) => string;
|
||||
}[];
|
||||
beforeExport?: (data: any[]) => any[];
|
||||
onSuccess?: () => void;
|
||||
onError?: (error: any) => void;
|
||||
}
|
||||
|
||||
// 审核配置
|
||||
export interface AuditConfig {
|
||||
statusOptions: OptionItem[];
|
||||
remarkRequired: boolean;
|
||||
maxRemarkLength: number;
|
||||
batchAuditEnabled: boolean;
|
||||
autoNotify: boolean;
|
||||
notifyTemplate: string;
|
||||
}
|
||||
|
||||
// 权限配置
|
||||
export interface PermissionConfig {
|
||||
list: string;
|
||||
query: string;
|
||||
add: string;
|
||||
edit: string;
|
||||
remove: string;
|
||||
export: string;
|
||||
import: string;
|
||||
audit: string;
|
||||
statistics: string;
|
||||
batchUpdate: string;
|
||||
}
|
||||
|
||||
// 页面配置
|
||||
export interface PageConfig {
|
||||
title: string;
|
||||
breadcrumb: string[];
|
||||
permissions: PermissionConfig;
|
||||
searchForm: SearchFormItem[];
|
||||
tableColumns: TableColumn[];
|
||||
formItems: FormItem[];
|
||||
batchOperations: BatchOperation[];
|
||||
actionButtons: ActionButton[];
|
||||
statisticsCards: StatisticsCard[];
|
||||
chartConfigs: ChartConfig[];
|
||||
importConfig: ImportConfig;
|
||||
exportConfig: ExportConfig;
|
||||
auditConfig: AuditConfig;
|
||||
}
|
||||
Reference in new issue
Block a user