wuzhen 提交代码

This commit is contained in:
wuzhen committed 2025-07-16 18:11:31 +08:00
1 parent 913e542e7c
commit 6820ebc45f
97 files changed
+27269 -1

No files matched your search

+447
View File
@@ -0,0 +1,447 @@
import request from '@/utils/request'
import { AxiosPromise } from 'axios'
// 学生信息数据类型
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[]> {
return request({
url: '/xg/studentInfo/options/classTeachers',
method: 'get'
})
}
// 检查学号是否存在
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'
})
}
+523
View File
@@ -0,0 +1,523 @@
// 学生信息管理模块类型定义
// 学生信息完整数据结构
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
}