Merge branch 'master' of http://47.99.164.66:3000/hzdyjs-xg/all-project
This commit is contained in:
commit
b0eba0a07b
8 files changed
+152
-64
No files matched your search
@@ -178,7 +178,7 @@
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination-container">
|
||||
<pagination v-show="total > 0" :page="queryParams.pageNum" :limit="queryParams.pageSize" :total="total" @pagination="getList" />
|
||||
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改招生报名信息对话框 -->
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="姓名">{{ studentData.studentName || studentData.name || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{ formatIdCard(studentData.idCard) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ studentData.gender === 'M' ? '男' : '女' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{ formatGender(studentData.gender, studentData.idCard) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">{{ formatDate(studentData.birthDate) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ studentData.phone1 || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备用电话">{{ studentData.phone2 || '-' }}</el-descriptions-item>
|
||||
@@ -54,6 +54,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="所属学院">{{
|
||||
studentData.collegeName || studentData.college_name || studentData.collage_name || '-'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="报考专业">{{ studentData.majorName || studentData.appliedMajor || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="专业代码">{{ studentData.majorCode || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="校服尺码">{{ studentData.uniformSize || '-' }}</el-descriptions-item>
|
||||
@@ -166,13 +169,6 @@ const dialogVisible = computed({
|
||||
}
|
||||
});
|
||||
|
||||
// 判断学生是否已完成
|
||||
const isStudentCompleted = computed(() => {
|
||||
const isCompleted = props.studentData.isCompleted;
|
||||
// 显式检查字符串和数字类型的值
|
||||
return String(isCompleted) === '1';
|
||||
});
|
||||
|
||||
// 格式化身份证号(隐藏中间部分)
|
||||
const formatIdCard = (idCard: string | undefined) => {
|
||||
if (!idCard) return '-';
|
||||
@@ -182,6 +178,24 @@ const formatIdCard = (idCard: string | undefined) => {
|
||||
return idCard;
|
||||
};
|
||||
|
||||
// 判断学生是否已完成
|
||||
const isStudentCompleted = computed(() => {
|
||||
const isCompleted = props.studentData.isCompleted;
|
||||
return String(isCompleted) === '1';
|
||||
});
|
||||
|
||||
const formatGender = (gender?: string, idCard?: string) => {
|
||||
if (gender === 'M' || gender === '0') return '男';
|
||||
if (gender === 'F' || gender === '1') return '女';
|
||||
if (idCard && idCard.length >= 17) {
|
||||
const code = parseInt(idCard.charAt(16), 10);
|
||||
if (!Number.isNaN(code)) {
|
||||
return code % 2 === 0 ? '女' : '男';
|
||||
}
|
||||
}
|
||||
return gender || '-';
|
||||
};
|
||||
|
||||
// 格式化日期
|
||||
const formatDate = (date: string | Date | undefined) => {
|
||||
if (!date) return '-';
|
||||
|
||||
@@ -116,17 +116,17 @@
|
||||
<el-table-column prop="idCard" label="身份证号" min-width="180" align="center" :formatter="formatIdCard" show-overflow-tooltip />
|
||||
<el-table-column prop="gender" label="性别" width="80" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.gender === 'M' ? '男' : '女' }}
|
||||
{{ formatGender(scope.row.gender, scope.row.idCard) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属学院" min-width="150" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ scope.row.applied_major }}
|
||||
{{ scope.row.collegeName || scope.row.college_name || scope.row.collage_name || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="专业" min-width="150" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ scope.row.majorName || scope.row.applied_major || '-' }}
|
||||
{{ scope.row.majorName || scope.row.appliedMajor || scope.row.applied_major || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="province" label="地区" min-width="100" align="center" />
|
||||
@@ -174,6 +174,7 @@ import {
|
||||
EnrollmentProcessVO,
|
||||
getEnrollmentProcess
|
||||
} from '@/api/zsjy/enrollmentProcess';
|
||||
import { getEnrollmentInfo } from '@/api/zsjy/enrollment';
|
||||
import { listDept } from '@/api/system/dept';
|
||||
import type { DeptVO } from '@/api/system/dept/types';
|
||||
import StudentDetailDialog from './components/StudentDetailDialog.vue';
|
||||
@@ -511,59 +512,67 @@ const handleExport = () => {
|
||||
const handleView = async (row: EnrollmentProcessVO) => {
|
||||
detailLoading.value = true;
|
||||
try {
|
||||
let processData: any = {};
|
||||
let processData: any = { ...row };
|
||||
|
||||
// 如果是从报名信息表里直接获取的数据(可能没有流程ID)
|
||||
if (row.id) {
|
||||
const res = await getEnrollmentProcess(row.id);
|
||||
if (res && res.code === 200) {
|
||||
processData = res.data;
|
||||
} else {
|
||||
// 回退到使用行数据
|
||||
processData = { ...row };
|
||||
if (res && res.code === 200 && res.data) {
|
||||
processData = { ...processData, ...res.data };
|
||||
}
|
||||
}
|
||||
|
||||
const enrollmentId = processData.enrollmentId || row.enrollmentId;
|
||||
if (enrollmentId) {
|
||||
const infoRes = await getEnrollmentInfo(enrollmentId);
|
||||
if (infoRes?.code === 200 && infoRes.data) {
|
||||
const info = infoRes.data;
|
||||
processData = {
|
||||
...processData,
|
||||
...info,
|
||||
studentName: processData.studentName || info.name,
|
||||
collegeName: info.collegeName || processData.collegeName,
|
||||
majorName: info.appliedMajor || processData.majorName,
|
||||
appliedMajor: info.appliedMajor || processData.appliedMajor,
|
||||
applicationTime: info.applicationTime || processData.applicationTime
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// 使用行数据(可能是从enrollment_info表里直接获取的)
|
||||
processData = { ...row };
|
||||
}
|
||||
|
||||
// 处理完成状态,确保它是字符串类型
|
||||
if (processData.isCompleted !== undefined) {
|
||||
processData.isCompleted = String(processData.isCompleted);
|
||||
}
|
||||
|
||||
// 处理缴费状态,确保它不为空
|
||||
if (processData.paymentStatus === undefined || processData.paymentStatus === null) {
|
||||
processData.paymentStatus = '0'; // 默认为未缴费
|
||||
processData.paymentStatus = '0';
|
||||
}
|
||||
|
||||
// 设置当前流程数据
|
||||
currentStudent.value = processData;
|
||||
|
||||
// 打开详情对话框
|
||||
detailDialogVisible.value = true;
|
||||
} catch (error) {
|
||||
console.error('获取流程详情失败:', error);
|
||||
// 即使获取详情失败,也尝试使用行数据显示
|
||||
const processData = { ...row };
|
||||
|
||||
// 处理完成状态,确保它是字符串类型
|
||||
if (processData.isCompleted !== undefined) {
|
||||
processData.isCompleted = String(processData.isCompleted);
|
||||
}
|
||||
|
||||
// 处理缴费状态,确保它不为空
|
||||
if (processData.paymentStatus === undefined || processData.paymentStatus === null) {
|
||||
processData.paymentStatus = '0'; // 默认为未缴费
|
||||
}
|
||||
|
||||
currentStudent.value = processData;
|
||||
currentStudent.value = {
|
||||
...row,
|
||||
isCompleted: row.isCompleted !== undefined ? String(row.isCompleted) : undefined,
|
||||
paymentStatus: row.paymentStatus ?? '0'
|
||||
};
|
||||
detailDialogVisible.value = true;
|
||||
} finally {
|
||||
detailLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const formatGender = (gender?: string, idCard?: string) => {
|
||||
if (gender === 'M' || gender === '0') return '男';
|
||||
if (gender === 'F' || gender === '1') return '女';
|
||||
if (idCard && idCard.length >= 17) {
|
||||
const code = parseInt(idCard.charAt(16), 10);
|
||||
if (!Number.isNaN(code)) {
|
||||
return code % 2 === 0 ? '女' : '男';
|
||||
}
|
||||
}
|
||||
return gender || '-';
|
||||
};
|
||||
|
||||
// 格式化身份证号(隐藏中间部分)
|
||||
const formatIdCard = (row: any) => {
|
||||
if (!row.idCard) return '';
|
||||
|
||||
Reference in new issue
Block a user