提交学生信息管理界面的代码

This commit is contained in:
zlwu committed 2025-07-25 22:13:38 +08:00
1 parent dcecdbd6aa
commit a1901ac611
11 files changed
+2159 -183

No files matched your search

+10 -5
View File
@@ -9,12 +9,17 @@ import { StudentQuery, StudentVO, StudentForm, XgDeptTreeVO, R, TableDataInfo }
*/
export const XgDeptTreeSelect = (belongDeptId?: number): AxiosPromise<XgDeptTreeVO[]> => {
// 实际项目中连接后端接口
// return request({
// url: '/system/user/deptTree',
// method: 'get',
// params: {
// belongDeptId
// }
// });
return request({
url: '/system/user/deptTree',
method: 'get',
params: {
belongDeptId
}
url: '/xgStudentManagerSource/studentManagerSource/currentUserAuthTree',
method: 'get'
});
// // 模拟数据,直接返回与页面组件期望格式一致的数据
+97
View File
@@ -49,6 +49,7 @@ export interface StudentVO {
// 学生表单对象
export interface StudentForm {
// 原有字段
studentId?: number | string;
deptId?: number;
studentNo: string;
@@ -64,6 +65,102 @@ export interface StudentForm {
classId?: number;
address?: string;
remark?: string;
// 基础信息字段
student_no?: string;
id_card?: string;
name?: string;
name_english?: string;
former_name?: string;
gender?: string;
birth_date?: string;
nationality?: string;
native_place?: string;
political_status?: string;
hukou_location?: string;
home_address?: string;
current_address?: string;
postal_code?: string;
photo_url?: string;
photo_path?: string;
phone?: string;
is_boarder?: number;
// 扩展信息字段
education_level?: string;
household_register_type?: string;
religion?: string;
source_region?: string;
graduate_school?: string;
qq?: string;
wechat?: string;
marital_status?: string;
emergency_contact_name?: string;
emergency_contact_phone?: string;
emergency_contact_relation?: string;
is_poor_student?: number;
is_minority?: number;
is_disabled?: number;
is_orphan?: number;
is_left_behind_child?: number;
is_single_child?: number;
is_low_income?: number;
has_loan?: number;
loan_amount?: string;
specialties?: string;
awards?: string;
violations?: string;
social_activities?: string;
// 家庭信息字段
father_name?: string;
father_phone?: string;
father_work_unit?: string;
mother_name?: string;
mother_phone?: string;
mother_work_unit?: string;
guardian_name?: string;
guardian_phone?: string;
guardian_relation?: string;
family_income?: string;
per_capita_income?: string;
income_source?: string;
family_economic_status?: string;
family_members?: string;
// 健康信息字段
height?: string;
weight?: string;
blood_type?: string;
health_status?: string;
special_condition?: string;
medical_history?: string;
allergies?: string;
disability_type?: string;
disability_level?: string;
// 学籍信息字段
admission_category?: string;
student_status?: string;
enrollment_year?: string;
enrollment_date?: string;
school_system?: string;
academic_level?: string;
training_type?: string;
major_name?: string;
class_name?: string;
grade?: string;
college_name?: string;
counselor_name?: string;
class_teacher_name?: string;
dormitory_building?: string;
dormitory_room?: string;
// 银行卡信息字段
bank_card_no?: string;
bank_name?: string;
bank_branch?: string;
card_holder_name?: string;
}
// 统一响应类型
File diff suppressed because it is too large. Load diff
+57 -7
View File
@@ -1,13 +1,13 @@
<template>
<div class="p-2">
<el-row :gutter="20">
<div style="display: flex; gap: 16px">
<!-- 部门树 -->
<el-col :lg="4" :xs="24" style="">
<div style="width: 300px">
<el-card shadow="hover">
<el-input v-model="deptName" placeholder="请输入部门名称" prefix-icon="Search" clearable />
<el-tree
ref="deptTreeRef"
class="mt-2"
class="mt-2 dept-tree"
node-key="id"
:data="deptOptions"
:props="{ label: 'label', children: 'children' } as any"
@@ -18,8 +18,8 @@
@node-click="handleNodeClick"
/>
</el-card>
</el-col>
<el-col :lg="20" :xs="24">
</div>
<div style="flex: 1; min-width: 0; /* 防止内容撑开容器 */">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
@@ -138,8 +138,8 @@
@pagination="getList"
/>
</el-card>
</el-col>
</el-row>
</div>
</div>
<!-- 添加或修改用户配置对话框 -->
<el-dialog ref="formDialogRef" v-model="dialog.visible" :title="dialog.title" width="600px" append-to-body @close="closeDialog">
@@ -664,3 +664,53 @@ async function handleDeptChange(value: number | string) {
form.value.postIds = [];
}
</script>
<style scoped>
/* 部门树组件样式 */
.dept-tree {
height: 600px;
overflow-y: auto;
overflow-x: auto;
width: 270px; /* 固定宽度,超出时显示滚动条 */
min-width: 270px;
}
/* 强制覆盖el-tree的默认样式 */
.dept-tree :deep(.el-tree-node) {
white-space: nowrap !important;
width: max-content !important;
min-width: max-content !important;
}
.dept-tree :deep(.el-tree-node__content) {
white-space: nowrap !important;
min-width: max-content !important;
width: max-content !important;
overflow: visible !important;
text-overflow: unset !important; /* 移除省略号 */
max-width: none !important;
}
.dept-tree :deep(.el-tree-node__label) {
white-space: nowrap !important;
display: inline-block !important;
flex-shrink: 0 !important;
max-width: none !important;
overflow: visible !important;
text-overflow: unset !important; /* 移除省略号效果 */
width: max-content !important;
}
.dept-tree :deep(.el-tree-node__expand-icon) {
flex-shrink: 0 !important;
}
/* 确保树容器内部元素都不被截断 */
.dept-tree :deep(.el-tree-node__children) {
width: max-content !important;
}
.dept-tree :deep(.el-tree-node > .el-tree-node__children) {
width: max-content !important;
}
</style>