From ce747d6c08b0a3352def09aa79db18f102e49975 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 10 九月 2024 18:14:55 +0800
Subject: [PATCH] 拆机功能 step 1

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

diff --git a/src/views/ecg/doctor/components/DevInstallPanel.vue b/src/views/ecg/doctor/components/DevInstallPanel.vue
index 22b0a62..f454f33 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"
@@ -39,7 +39,7 @@
         <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" />
       </el-form-item>
     </el-form>
-    <el-button @click="submitForm" type="primary" :disabled="formLoading">瑁呮満</el-button>
+    <el-button @click="submitForm" type="primary" :disabled="formLoading">瑁呮満瀹屾垚</el-button>
     <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
 </template>
 
@@ -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