From cc8d5f74e398e86358a40abacde219d1bf2c6339 Mon Sep 17 00:00:00 2001 From: Euni4U <958079825@qq.com> Date: Tue, 15 Apr 2025 17:32:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Medical-examination-vehicle.vue | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/views/Department-entry/Medical-examination-vehicle.vue b/src/views/Department-entry/Medical-examination-vehicle.vue index 13ad9f9..8da12b2 100644 --- a/src/views/Department-entry/Medical-examination-vehicle.vue +++ b/src/views/Department-entry/Medical-examination-vehicle.vue @@ -90,18 +90,20 @@ {{ truncateMedicalSn(patient.medicalSn) }} - {{ getStatusText(patient) }} + {{ getStatusInfo(patient).text }} 打回 + > + 打回 + @@ -2845,6 +2847,17 @@ const truncateMedicalSn = (sn) => { onBeforeUnmount(() => { clearPatientCache() }) + +// 状态映射配置 +const STATUS_MAP = { + 0: { text: '待检查', color: 'info', showButton: false }, + 1: { text: '已检查', color: 'success', showButton: true }, +} + +// 统一获取状态信息的方法 +const getStatusInfo = (patient) => { + return STATUS_MAP[patient.status] || { text: '未知状态', color: 'info', showButton: false } +}