From bd3f4b0a9b9207b647de0f0d8c52600a2742fd56 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 26 十一月 2026 09:34:58 +0800
Subject: [PATCH] 修改了框架,适用chrome85

---
 src/views/ecg/doctor/DevInstall.vue |   37 ++++++++++++++++++++++++++++---------
 1 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/src/views/ecg/doctor/DevInstall.vue b/src/views/ecg/doctor/DevInstall.vue
index 49e03f2..54bd627 100644
--- a/src/views/ecg/doctor/DevInstall.vue
+++ b/src/views/ecg/doctor/DevInstall.vue
@@ -52,12 +52,26 @@
 const finishNextPatient = async () => {
   finishFlag.value = true
   try {
+    // 銆愭湰闇�姹傘�戝彨鍙峰墠鑻ヤ粛鏈夈�屽畨瑁呬腑(36)銆嶆偅鑰呬笖鏈偣銆岃鏈哄畬鎴愩�嶏紝鍏堣嚜鍔ㄥ畬鎴愪粬锛屽啀鍙笅涓�浣�
+    const installing = patientList.value.find(item => item.status === 36)
+    if (installing) {
+      const ok = (await devInstallPanelRef.value?.completeCurrent?.()) !== false
+      if (!ok) {
+        ElMessage.warning('鑷姩銆岃鏈哄畬鎴愩�嶆湭鎴愬姛锛岃鍏堟墜鍔ㄥ畬鎴愬綋鍓嶆偅鑰�')
+        return
+      }
+    }
     patientList.value = await DoctorApi.finishInstallNextPatient(roomBedVO.value)
     patientStat.value = await DoctorApi.getDevInstallStatistic(roomBedVO.value)
     getInstallingPatient()
 
-    // 鐢ㄤ簬瑙e喅 宸︿晶閲嶇疆鍚� 鑾峰彇褰撳墠 銆愬畨瑁呬腑銆戞偅鑰�
-    setInstallingPatient(installingPatient)
+    // 鐢ㄤ簬瑙e喅 宸︿晶閲嶇疆鍚� 鑾峰彇褰撳墠銆愬畨瑁呬腑銆戞偅鑰咃紱
+    // 鑻ュ凡鏃犲畨瑁呬腑鎮h�咃紙鍒氬畬鎴愪笖娌℃湁涓嬩竴浣嶏級锛屾竻绌哄乏涓婅锛岄伩鍏嶆妸鍒氬畬鎴愮殑浜哄張鏄剧ず鍥炴潵
+    if (patientList.value.some(item => item.status === 36)) {
+      setInstallingPatient(installingPatient)
+    } else {
+      devInstallPanelRef.value?.setPatient?.(undefined)
+    }
   } finally {
     finishFlag.value = false
   }
@@ -181,15 +195,20 @@
   }
 }
 
-const undoFinish = async () => {
-  const last = await DoctorApi.lastFinishedPatient(roomBedVO.value)
-  if (!last || !last.patId) {
-    ElMessage.warning('鏈伐浣嶄粖鏃ユ殏鏃犲凡瀹屾垚鐨勬鏌ヨ褰�')
+/**
+ * 鎾ら攢銆岃鏈哄畬鎴愩�嶏細鎾ら攢**閫変腑鐨勯偅鏉�**瀹屾垚璁板綍锛�2026-11-25 闇�姹傦級銆�
+ * 鍘熷疄鐜扮敱鍚庣 lastFinishedPatient 鍙栨渶杩戜竴鏉★紝鍖荤敓鏃犳硶閫夋嫨锛涚幇鎸夈�屾偅鑰� + 妫�鏌ラ」鐩�嶇簿纭挙閿�銆�
+ */
+const undoFinish = async (record?: any) => {
+  if (!record || !record.patId) {
+    ElMessage.warning('璇峰厛鍦ㄣ�屽凡瀹屾垚鍒楄〃銆嶄腑鐐归�変竴鏉¤褰曪紝鍐嶇偣銆屾挙閿�銆�')
     return
   }
+  const who = record.patName || record.patId
+  const ctName = record.checkTypeName || record.checkType || ''
   try {
     await ElMessageBox.confirm(
-      `纭畾鎾ら攢銆�${last.patName || last.patId}銆嶇殑瀹屾垚鎿嶄綔鍚楋紵璇ユ偅鑰呭皢鍥炲埌鍊欒瘖鍖恒�俙,
+      `纭畾鎾ら攢銆�${who}銆嶇殑銆�${ctName || '瑁呮満'}銆嶅畬鎴愯褰曞悧锛熻鎮h�呭皢鍥炲埌鍊欒瘖鍖恒�俙,
       '鎾ら攢',
       { type: 'warning', confirmButtonText: '纭畾鎾ら攢', cancelButtonText: '鍙栨秷' }
     )
@@ -200,8 +219,8 @@
   try {
     const msg = await DoctorApi.undoFinishPatient({
       ...roomBedVO.value,
-      patId: last.patId,
-      checkType: last.bookCheckType
+      patId: record.patId,
+      checkType: record.checkType
     } as any)
     ElMessage.success(msg || '宸叉挙閿�')
     // 銆愭挙閿�鏍囪瘑銆戞挙閿�鍚庣珛鍒诲埛鏂般�屽凡瀹屾垚璁板綍銆嶅垪琛紝璁╄繖鏉¤褰曟樉绀烘垚銆屽凡鎾ら攢銆�

--
Gitblit v1.9.3