From 97ddbdb0827051db8fb25e42b964185fa6a9a3b5 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期三, 30 七月 2025 18:03:46 +0800
Subject: [PATCH] 心电检查

---
 src/views/doctor/checkAll/index.vue |   35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 9474445..4af72f0 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -2581,7 +2581,6 @@
 
     yichangjieguo() {
       this.loading = true;
-      this.isLoading = true; // 纭繚鏁翠綋鍔犺浇妗嗗紑鍚�
       this.status1 = 0;
       this.yichangList = [];
       
@@ -2595,7 +2594,6 @@
             if (!data || data.length === 0) {
               this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
               this.loading = false;
-              this.isLoading = false; // 鍏抽棴鏁翠綋鍔犺浇妗�
               resolve(); // 杩斿洖 Promise锛屼絾涓嶇户缁悗缁�昏緫
               return;
             }
@@ -2617,17 +2615,12 @@
             resolve(); // 鎴愬姛瀹屾垚
           })
           .catch((error) => {
-            this.isLoading = false;
             this.loading = false;
             console.error("鑾峰彇寮傚父缁撴灉澶辫触:", error);
             this.$message.error("鑾峰彇寮傚父缁撴灉澶辫触");
             reject(error); // 杩斿洖閿欒
           })
           .finally(() => {
-            // 鍙湪娌℃湁鎻愬墠杩斿洖鐨勬儏鍐典笅鍏抽棴鍔犺浇妗�
-            if (this.isLoading) {
-              this.isLoading = false;
-            }
             if (this.loading) {
               this.loading = false;
             }
@@ -3183,6 +3176,7 @@
 
     handleClick(row) {
       this.qingkong();
+      this.isLoading = true; // 寮�濮嬫暣浣撳姞杞�
       this.$refs.Pre.open = false;
       this.tableAll = row;
       let dict = "dict_tjtype";
@@ -3206,7 +3200,14 @@
           if (this.status.status === "1") {
             // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫
             this.yichangjieguo().then(() => {
-              // 鏃犺寮傚父缁撴灉鏄惁鏈夋暟鎹紝閮界户缁悗缁�昏緫
+              // 濡傛灉寮傚父缁撴灉涓虹┖锛岀珛鍗冲叧闂姞杞芥骞舵墦寮�鎶藉眽
+              if (!this.yichangList || this.yichangList.length === 0) {
+                this.isLoading = false;
+                this.drawer = true;
+                return;
+              }
+              
+              // 寮傚父缁撴灉鏈夋暟鎹紝缁х画鍚庣画閫昏緫
               getInfo().then((response) => {
                 this.userId = response.user.userId;
                 if (this.userId) {
@@ -3217,10 +3218,6 @@
                   };
                   getModifiedState(data).then((res) => {
                     this.MsgId = res.msg;
-                    // 鍙湁褰撳紓甯哥粨鏋滄湁鏁版嵁鏃舵墠寮�鍚姞杞芥
-                    if (this.yichangList && this.yichangList.length > 0) {
-                      this.isLoading = true;
-                    }
                     this.drawer = true;
                     getupdateCheckType(this.tjNumber).then((response) => {
                       this.isLoading = false; // 鍏抽棴鍔犺浇妗�
@@ -3267,7 +3264,14 @@
               .then(() => {
                 // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫
                 this.yichangjieguo().then(() => {
-                  // 鏃犺寮傚父缁撴灉鏄惁鏈夋暟鎹紝閮界户缁悗缁�昏緫
+                  // 濡傛灉寮傚父缁撴灉涓虹┖锛岀珛鍗冲叧闂姞杞芥骞舵墦寮�鎶藉眽
+                  if (!this.yichangList || this.yichangList.length === 0) {
+                    this.isLoading = false;
+                    this.drawer = true;
+                    return;
+                  }
+                  
+                  // 寮傚父缁撴灉鏈夋暟鎹紝缁х画鍚庣画閫昏緫
                   getInfo().then((response) => {
                     this.userId = response.user.userId;
                     if (this.userId) {
@@ -3278,10 +3282,6 @@
                       };
                       getforceIn(data).then((res) => {
                         this.MsgId = res.msg;
-                        // 鍙湁褰撳紓甯哥粨鏋滄湁鏁版嵁鏃舵墠寮�鍚姞杞芥
-                        if (this.yichangList && this.yichangList.length > 0) {
-                          this.isLoading = true;
-                        }
                         this.drawer = true;
                         getupdateCheckType(this.tjNumber).then((response) => {
                           this.isLoading = false; // 鍏抽棴鍔犺浇妗�
@@ -3316,6 +3316,7 @@
                 });
               })
               .catch(() => {
+                this.isLoading = false; // 鍙栨秷鏃朵篃瑕佸叧闂姞杞芥
                 this.$message({
                   type: "info",
                   message: "宸插彇娑堣繘鍏�",

--
Gitblit v1.8.0