From 06a17c236d4cb9b8da75fce43af938cb7ea510bf Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期一, 15 十二月 2025 09:50:12 +0800
Subject: [PATCH] feat: 优化企业微信判断,优化gps分断处理

---
 app/pagesTask/components/HospitalSelector.vue |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/app/pagesTask/components/HospitalSelector.vue b/app/pagesTask/components/HospitalSelector.vue
index b82dc5b..cd4fd01 100644
--- a/app/pagesTask/components/HospitalSelector.vue
+++ b/app/pagesTask/components/HospitalSelector.vue
@@ -224,21 +224,27 @@
     
     // 閫夋嫨鍖婚櫌
     selectHospital(hospital) {
-      this.selectedHospitalName = hospital.hospName
-      this.searchKeyword = hospital.hospName
+      // 娣诲姞null妫�鏌�
+      if (!hospital) {
+        console.warn('閫夋嫨鐨勫尰闄㈠璞′负绌�');
+        return;
+      }
+      
+      this.selectedHospitalName = hospital.hospName || '';
+      this.searchKeyword = hospital.hospName || '';
       
       const hospitalData = {
-        id: hospital.hospId,
-        name: hospital.hospName,
+        id: hospital.hospId || null,
+        name: hospital.hospName || '',
         address: hospital.hospName === '瀹朵腑' ? '' : this.buildFullAddress(hospital)
       }
       
-      this.showResults = false
-      this.searchResults = []
+      this.showResults = false;
+      this.searchResults = [];
       
       // 瑙﹀彂鏇存柊浜嬩欢
-      this.$emit('input', hospitalData)
-      this.$emit('change', hospitalData)
+      this.$emit('input', hospitalData);
+      this.$emit('change', hospitalData);
     },
     
 

--
Gitblit v1.9.1