fix(web-admin): 客户服务管理列表性别按新生儿约定显示
本地 sexLabel 误将女映射为 2,导致 0 原样展示;改为复用 newbornSexLabel(1男/0女)。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
900e957f25
commit
e482980c7d
1 file changed
+7
-6
@@ -243,7 +243,7 @@
|
||||
<template #default="{ row }">{{ row.newbornIdCard || '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="newbornSex" label="性别" min-width="70" align="center">
|
||||
<template #default="{ row }">{{ sexLabel(row.newbornSex) }}</template>
|
||||
<template #default="{ row }">{{ formatNewbornSex(row.newbornSex) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="newbornDeliveryTime" label="分娩时间" min-width="160" align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.newbornDeliveryTime || '—' }}</template>
|
||||
@@ -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<string, unknown>) {
|
||||
|
||||
Reference in new issue
Block a user