From 3df5c697dd54c55fe5a7859b28383375852c9886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Sat, 16 May 2026 20:25:17 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#518:=20[=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99-=E8=AF=8A?= =?UTF-8?q?=E6=96=AD-=E4=BC=A0=E6=9F=93=E7=97=85=E6=8A=A5=E5=8D=A1]=20?= =?UTF-8?q?=E6=8A=A5=E5=8D=A1=E9=A1=B5=E9=9D=A2=E7=BC=BA=E5=A4=B1"?= =?UTF-8?q?=E6=80=A7=E5=88=AB=E3=80=81=E5=87=BA=E7=94=9F=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E3=80=81=E5=AE=9E=E8=B6=B3=E5=B9=B4=E9=BE=84"=E6=A0=B8?= =?UTF-8?q?=E5=BF=83=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因1: 性别单选按钮使用 value 属性而非 label 属性,导致 Element Plus el-radio 无法绑定 v-model 值,UI 不显示选中状态 根因2: normalizeSexFromPatientInfo 函数 genderEnum 兜底逻辑未处理字符串类型 和 0 值情况,导致性别解析在部分场景下返回"未知" Co-Authored-By: Claude Opus 4.7 --- .../diagnosis/infectiousDiseaseReportDialog.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue b/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue index 95f681b30..54db77903 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/diagnosis/infectiousDiseaseReportDialog.vue @@ -54,9 +54,9 @@ 性别 - - - 未知 + + + 未知 @@ -1044,8 +1044,9 @@ function normalizeSexFromPatientInfo(patientInfo) { if (patientInfo.genderName) return patientInfo.genderName; if (patientInfo.sex) return normalizeSex(patientInfo.sex); // 使用数字枚举字段 - if (patientInfo.genderEnum === 1) return '男'; - if (patientInfo.genderEnum === 2) return '女'; + if (patientInfo.genderEnum === 1 || patientInfo.genderEnum === '1') return '男'; + if (patientInfo.genderEnum === 2 || patientInfo.genderEnum === '2') return '女'; + if (patientInfo.genderEnum === 0 || patientInfo.genderEnum === '0') return '未知'; return '未知'; }