This commit is contained in:
Euni4U 2025-04-15 17:32:15 +08:00
parent 2d036816bc
commit cc8d5f74e3

View File

@ -90,18 +90,20 @@
<span class="medical-sn">{{ truncateMedicalSn(patient.medicalSn) }}</span>
<el-tag
size="small"
:type="getStatusTagType(patient)"
:type="getStatusInfo(patient).color"
class="status-tag"
>
{{ getStatusText(patient) }}
{{ getStatusInfo(patient).text }}
</el-tag>
<el-button
v-if="patient.status === '1' || patient.status === 1"
v-if="getStatusInfo(patient).showButton"
type="primary"
size="small"
@click.stop="resetPatientStatus(patient)"
class="reset-status-btn"
>打回</el-button>
>
打回
</el-button>
</div>
</div>
</div>
@ -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 }
}
</script>
<style scoped>