提交代码

This commit is contained in:
zlwu committed 2025-08-17 21:43:45 +08:00
1 parent 2e09f12ad8
commit 5f7c6f16c7
6 files changed
+53 -15

No files matched your search

@@ -744,18 +744,19 @@ const submitForm = () => {
// 处理学生信息数据,转换为符合API接口的格式
const studentScores = roomStudents.value.map((student: any) => {
const studentScore: any = {
studentId: Number(student.studentId), // 确保是数字类型
studentId: student.studentId, // 保持原始类型,避免精度丢失
studentName: student.studentName,
studentNo: student.studentNo,
className: student.className,
majorName: student.majorName,
collegeName: student.collegeName,
bedId: student.bedId ? Number(student.bedId) : undefined,
bedCode: student.bedName, // 使用bedName作为bedCode
studentScore: student.student_score ? Number(student.student_score) : undefined, // 确保是数字类型
bedId: student.bedId, // 保持原始类型,避免精度丢失
bedCode: student.bedCode,
bedName: student.bedName,
studentScore: student.student_score ? Number(student.student_score) : undefined, // 分数可以安全转换为数字
attendanceStatus: student.attendance_status,
studentGrade: student.student_grade,
isResponsiblePerson: student.isResponsiblePerson ? Number(student.isResponsiblePerson) : 0, // 确保是数字类型
isResponsiblePerson: student.isResponsiblePerson ? Number(student.isResponsiblePerson) : 0, // 布尔值转换安全
scoreRemarks: student.scoreRemarks || '',
improvementNotes: student.improvementNotes || ''
};
@@ -1132,6 +1133,7 @@ const loadRoomStudents = async () => {
collegeName: studentScore.collegeName,
bedId: studentScore.bedId,
bedName: studentScore.bedCode, // 使用bedCode作为bedName显示
bedCode: studentScore.bedCode,
gender: studentScore.gender || '1', // 默认女性,如果没有性别字段
// 使用历史评分数据
student_score: studentScore.studentScore || null,