Browse Source

修复问题

lighter 2 years ago
parent
commit
ca719109ad
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/medical-insurance/inpatient/AdmRegistration.vue

+ 6 - 2
src/views/medical-insurance/inpatient/AdmRegistration.vue

@@ -368,7 +368,9 @@ const patient = computed(() => {
   return patientInfo
 })
 const fetchZyYbDiags = () => {
-  if (nullPatient()) return
+  if (nullPatient()) {
+    return
+  }
   getZyInYbDiags(patient.value.inpatientNo, patient.value.admissTimes).then((res) => {
     zyInYbDiags.value = res
   })
@@ -384,9 +386,11 @@ onDeactivated(() => {
   actived.value = false
 })
 
+const currentPatNo = ref(null)
 watchEffect(() => {
   if (actived.value) {
-    if (patient.value.inpatientNo) {
+    if (patient.value.inpatientNo && patient.value.inpatientNo !== currentPatNo.value) {
+      currentPatNo.value = patient.value.inpatientNo
       fetchZyYbDiags()
     }
   }