From 131726d427b95447df6c1ee14e1c36a0715b2033 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 15 四月 2025 12:56:20 +0800
Subject: [PATCH] update

---
 src/store/modules/checkType.ts                    |    6 +++---
 src/views/ecg/doctor/components/DevReadyPanel.vue |   13 +++++++++----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/store/modules/checkType.ts b/src/store/modules/checkType.ts
index 72d8b2c..069a36a 100644
--- a/src/store/modules/checkType.ts
+++ b/src/store/modules/checkType.ts
@@ -61,7 +61,7 @@
       if (!this.isSetCheckType) {
         this.setCheckTypeMap()
       }
-      return this.checkTypeMap[type].name
+      return this.checkTypeMap[type]?.name
     },
     getCheckTypeOptions() {
       if (!this.isSetCheckType) {
@@ -78,7 +78,7 @@
       if (!this.isSetCheckType) {
         this.setCheckTypeMap()
       }
-      return this.checkTypeMap[type].displayBarcode
+      return this.checkTypeMap[type]?.displayBarcode
     },
     getCheckTypeNotes(type: number) {
       if (!this.isSetCheckType) {
@@ -96,7 +96,7 @@
       if (!this.isSetCheckType) {
         this.setCheckTypeMap()
       }
-      return this.checkTypeMap[type].expenseRecognition
+      return this.checkTypeMap[type]?.expenseRecognition
     },
     async resetCheckTypeInfo() {
       wsCache.delete(CACHE_KEY.CHECKTYPE_CACHE)
diff --git a/src/views/ecg/doctor/components/DevReadyPanel.vue b/src/views/ecg/doctor/components/DevReadyPanel.vue
index 3d52e4c..de29af4 100644
--- a/src/views/ecg/doctor/components/DevReadyPanel.vue
+++ b/src/views/ecg/doctor/components/DevReadyPanel.vue
@@ -11,7 +11,7 @@
       v-loading="formLoading"
     >
       <el-form-item label="妫�鏌ラ」鐩�" prop="">
-        {{formData?.checkType && getCheckTypeName(formData?.checkType)}}
+        {{getCheckTypeName(formData.checkType)}}
       </el-form-item>
       <el-form-item label="鎮h�呯紪鍙�" prop="patId">
         <el-input v-model="formData.patId" placeholder="璇疯緭鍏ユ偅鑰呯紪鍙�" @input="getRentInfoByPatId" />
@@ -469,9 +469,14 @@
   if (formData.value.checkType == null)
     return ""
 
-  const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType!)
-  if (formData.value.patDetails == null || formData.value.patDetails.source == null ||
-      !displayBarcode.includes( formData.value.patDetails.source ))
+  if (formData.value.patDetails?.source == null)
+    return ""
+
+  const displayBarcode: number[] = checkTypeStore.getCheckTypeDispBarCode(formData.value.checkType)
+  if (displayBarcode == null || displayBarcode.length === 0)
+    return ""
+
+  if (!displayBarcode.includes( formData.value.patDetails.source ))
     return ""
 
   return getBarcode()

--
Gitblit v1.9.3