From e482980c7d9788cc755334dc412d2fa0fd9e4f94 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Wed, 11 Nov 2026 15:48:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(web-admin):=20=E5=AE=A2=E6=88=B7=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86=E5=88=97=E8=A1=A8=E6=80=A7=E5=88=AB?= =?UTF-8?q?=E6=8C=89=E6=96=B0=E7=94=9F=E5=84=BF=E7=BA=A6=E5=AE=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 本地 sexLabel 误将女映射为 2,导致 0 原样展示;改为复用 newbornSexLabel(1男/0女)。 Co-authored-by: Cursor --- .../sample-info/UnifiedSampleInfoPage.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/web-admin/src/views/cell-storage/sample-info/UnifiedSampleInfoPage.vue b/web-admin/src/views/cell-storage/sample-info/UnifiedSampleInfoPage.vue index 8ea14bda..3adbef69 100644 --- a/web-admin/src/views/cell-storage/sample-info/UnifiedSampleInfoPage.vue +++ b/web-admin/src/views/cell-storage/sample-info/UnifiedSampleInfoPage.vue @@ -243,7 +243,7 @@ - + @@ -510,6 +510,7 @@ donationStatusTagType, handleDoneFlagLabel, handleDoneFlagTagType, + newbornSexLabel, protocolStatusDisplayLabel, protocolStatusTagType, sampleCollectionFlagLabel, @@ -571,11 +572,11 @@ const codeCorrectionVisible = ref(false) const codeCorrectionOldCode = ref('') - function sexLabel(sex: unknown) { - const s = String(sex || '').trim() - if (s === '1' || s === '男') return '男' - if (s === '2' || s === '女') return '女' - return s || '—' + /** 与协议表单一致:'1'=男,'0'=女;空值显示 —(勿与客户 sexLabel 0男1女混淆) */ + function formatNewbornSex(sex: unknown) { + const s = sex == null || sex === '' ? '' : String(sex).trim() + if (!s) return '—' + return newbornSexLabel(s) || '—' } function openStorageCertQcEdit(row: Record) {