From d5c8ae8d451f66cba8550a1c1c28b232e091e90e Mon Sep 17 00:00:00 2001 From: suizihe <2958847195@qq.com> Date: Thu, 30 Oct 2025 15:28:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E8=AF=8A=E5=92=8C?= =?UTF-8?q?=E5=B0=B1=E8=AF=8A=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/doctorstation/index.vue | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/index.vue b/openhis-ui-vue3/src/views/doctorstation/index.vue index 9322cfe9..0bc76c13 100644 --- a/openhis-ui-vue3/src/views/doctorstation/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/index.vue @@ -100,8 +100,8 @@ }} -初诊 -复诊 +初诊 + 复诊 @@ -253,6 +253,8 @@ const emits = defineEmits(['click']); const activeTab = ref('emr'); const patientList = ref([]); const patientInfo = ref({}); +const visitTypeDisabled = ref(false); + const prescriptionInfo = ref([]); const registerTime = ref([formatDate(new Date()), formatDate(new Date())]); const patientDrawerRef = ref(); @@ -290,6 +292,9 @@ function setVisitType(type) { visitType.value = type; } function checkPatientHistory(patient) { +// 重置状态 + visitTypeDisabled.value = false; + // 如果患者没有身份证号,无法判断是否为初诊 if (!patient.idCard) { // 默认设置为初诊 @@ -297,6 +302,16 @@ function checkPatientHistory(patient) { return; } + // 如果当前就诊已经有明确的初复诊标识,则使用该标识 + if (patient.visitType) { + visitType.value = patient.visitType; + // 如果是已完诊的记录,禁用修改 + if (patient.statusEnum && patient.statusEnum !== 2) { // 假设2是就诊中状态 + visitTypeDisabled.value = true; + } + return; + } + // 查询患者历史就诊记录 const params = { patientId: patient.patientId, @@ -380,10 +395,6 @@ function handleOpen() { function handleCardClick(item, index) { currentEncounterId.value = ''; - // if (item.active) { - // patientList.value[index].active = false; - // return; - // } loading.value = true; patientList.value.forEach((patient) => { patient.active = patient.encounterId === item.encounterId; @@ -421,6 +432,8 @@ function handleFinish(encounterId) { if (res.code == 200) { proxy.$modal.msgSuccess('操作成功'); patientInfo.value = {}; + visitType.value = ''; // 重置初复诊标识 + visitTypeDisabled.value = false; // 重置禁用状态 getPatientList(); } }); @@ -434,7 +447,6 @@ function handleTimeChange(value) { // 接诊回调 function handleReceive(row) { - // patientInfo.value = row; handleCardClick(row); currentEncounterId.value = row.encounterId; drawer.value = false;