From 01dfa9f386f59fa058ad8349378f795a67f27832 Mon Sep 17 00:00:00 2001 From: wangzhibiao Date: Sun, 20 Sep 2026 11:34:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B1=95=E7=A4=BA=EF=BC=9A?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=AD=A6=E5=91=98=E4=B8=8E=E6=95=99=E5=B8=88?= =?UTF-8?q?=E6=80=A7=E5=88=AB=E8=BD=AC=E4=B9=89=E5=8F=8A=E6=95=99=E5=B8=88?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=9F=B9=E8=AE=AD=E7=8F=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=91=88=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_ui/src/views/train/me/student/index.vue | 7 ++- build_ui/src/views/train/me/teacher/index.vue | 53 +++++++++++++++---- build_ui/src/views/train/student/index.vue | 11 +++- build_ui/src/views/train/teacher/index.vue | 11 +++- 4 files changed, 70 insertions(+), 12 deletions(-) diff --git a/build_ui/src/views/train/me/student/index.vue b/build_ui/src/views/train/me/student/index.vue index 14d79ce4b..05e4344d7 100644 --- a/build_ui/src/views/train/me/student/index.vue +++ b/build_ui/src/views/train/me/student/index.vue @@ -43,7 +43,7 @@
性别: - {{ studentProfile.sGender || '未知' }} + {{ formatGender(studentProfile.sGender) }}
出生日期: @@ -473,6 +473,11 @@ export default { formatAttendanceStatusType(status) { const map = { 0: 'danger', 1: 'success', 2: 'warning', 3: 'warning', 4: 'info' } return map[status] || '' + }, + formatGender(gender) { + if (gender === '0' || gender === 0 || gender === '男') return '男' + if (gender === '1' || gender === 1 || gender === '女') return '女' + return gender || '未知' } } } diff --git a/build_ui/src/views/train/me/teacher/index.vue b/build_ui/src/views/train/me/teacher/index.vue index b10c064cc..e05c52c60 100644 --- a/build_ui/src/views/train/me/teacher/index.vue +++ b/build_ui/src/views/train/me/teacher/index.vue @@ -43,7 +43,7 @@
性别: - {{ teacherProfile.tGender || '未知' }} + {{ formatGender(teacherProfile.tGender) }}
所属单位: @@ -89,13 +89,25 @@ - - - - + + + + + + + + + + @@ -379,13 +391,36 @@ export default { }) }, formatPlanStatusText(status) { - const map = { 0: '未开班', 1: '培训中', 2: '已结训' } + const map = { + 0: '未开班', + '0': '未开班', + 1: '培训中', + '1': '培训中', + 2: '已结训', + '2': '已结训', + 3: '已取消', + '3': '已取消' + } return map[status] || '未知' }, formatPlanStatusType(status) { - const map = { 0: 'info', 1: 'primary', 2: 'success' } + const map = { + 0: 'info', + '0': 'info', + 1: 'primary', + '1': 'primary', + 2: 'success', + '2': 'success', + 3: 'danger', + '3': 'danger' + } return map[status] || '' }, + formatGender(gender) { + if (gender === '0' || gender === 0 || gender === '男') return '男' + if (gender === '1' || gender === 1 || gender === '女') return '女' + return gender || '未知' + }, formatEnrollmentStatusText(status) { const map = { 0: '待报到', 1: '已报到', 2: '请假', 3: '退训', 4: '已完成' } return map[status] || '未知' diff --git a/build_ui/src/views/train/student/index.vue b/build_ui/src/views/train/student/index.vue index 49c76d591..85afa9099 100644 --- a/build_ui/src/views/train/student/index.vue +++ b/build_ui/src/views/train/student/index.vue @@ -60,7 +60,11 @@ - + + +