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 } +}