From 4ca01635eeaeb016e1489cfac1088f396d93e519 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 10 九月 2024 16:57:17 +0800
Subject: [PATCH] 装机 用户通过 上级设置 不通过 property

---
 src/views/ecg/doctor/components/DevInstallPanel.vue |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/views/ecg/doctor/components/DevInstallPanel.vue b/src/views/ecg/doctor/components/DevInstallPanel.vue
index 22b0a62..48b0bcd 100644
--- a/src/views/ecg/doctor/components/DevInstallPanel.vue
+++ b/src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -1,5 +1,5 @@
 <template>
-  褰撳墠鎮h��: {{patient.patId}} {{isStringEmpty(patient.patName)?'鏃�':patient.patName}}
+  褰撳墠鎮h��: {{patient?.patId}} {{isStringEmpty(patient?.patName)?'鏃�':patient.patName}}
     <el-form
       ref="formRef"
       :model="formData"
@@ -117,8 +117,8 @@
   formData.value = {
     id: undefined,
     devId: undefined,
-    patId: patient.value.patId,
-    patName: patient.value.patName,
+    patId: patient.value?.patId,
+    patName: patient.value?.patName,
     rentTime: new Date().getTime(),
     returnTime: undefined,
     interference: undefined,
@@ -129,9 +129,9 @@
   formRef.value?.resetFields()
 }
 
-const setPatient = (queueVO: QueueVO) => {
+const setPatient = (queueVO: QueueVO | undefined) => {
   patient.value = queueVO
-  formData.value.id = undefined
+  resetForm()
 }
 defineExpose({ setPatient }) // 鎻愪緵 setPatient 鏂规硶锛岀敤浜庤缃偅鑰�
 

--
Gitblit v1.9.3