From 558b016aefab336ee753a743aa57970c47e5a5ca Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期五, 01 八月 2025 11:38:04 +0800
Subject: [PATCH] 1

---
 src/views/doctor/checkAll/index.vue |  271 +++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 176 insertions(+), 95 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 4af72f0..e4fb8fd 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -2592,7 +2592,6 @@
             const data = res.data;
 
             if (!data || data.length === 0) {
-              this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
               this.loading = false;
               resolve(); // 杩斿洖 Promise锛屼絾涓嶇户缁悗缁�昏緫
               return;
@@ -3176,7 +3175,6 @@
 
     handleClick(row) {
       this.qingkong();
-      this.isLoading = true; // 寮�濮嬫暣浣撳姞杞�
       this.$refs.Pre.open = false;
       this.tableAll = row;
       let dict = "dict_tjtype";
@@ -3198,58 +3196,99 @@
         this.status = res.data;
         if (this.status) {
           if (this.status.status === "1") {
+            // 娌℃湁寮哄埗杩涘叆寮规锛岀洿鎺ュ紑鍚姞杞藉拰寮规
+            this.isLoading = true;
+            this.drawer = true;
             // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫
             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) {
-                  let data = {
-                    userId: this.userId,
-                    tjNumber: this.tjNumber,
-                    state: 0,
-                  };
-                  getModifiedState(data).then((res) => {
-                    this.MsgId = res.msg;
-                    this.drawer = true;
-                    getupdateCheckType(this.tjNumber).then((response) => {
-                      this.isLoading = false; // 鍏抽棴鍔犺浇妗�
-                      this.changedate = response.data;
-                      if (this.changedate) {
-                        this.changedate.forEach((item) => {
-                          this.textarea1 = item.checkAdvice || "";
-                        });
-                        this.initialTotalCheckAdvice = this.textarea1;
-                        this.initialState = JSON.parse(
-                          JSON.stringify(this.changedate)
-                        );
-                        for (let i = 0; i < this.changedate.length; i++) {
-                          this.remark = this.changedate[i].remark;
+                getInfo().then((response) => {
+                  this.userId = response.user.userId;
+                  if (this.userId) {
+                    let data = {
+                      userId: this.userId,
+                      tjNumber: this.tjNumber,
+                      state: 0,
+                    };
+                    getModifiedState(data).then((res) => {
+                      this.MsgId = res.msg;
+                      getupdateCheckType(this.tjNumber).then((response) => {
+                        this.isLoading = false; // 鍏抽棴鍔犺浇妗�
+                        this.changedate = response.data;
+                        if (this.changedate) {
+                          this.changedate.forEach((item) => {
+                            this.textarea1 = item.checkAdvice || "";
+                          });
+                          this.initialTotalCheckAdvice = this.textarea1;
+                          this.initialState = JSON.parse(
+                            JSON.stringify(this.changedate)
+                          );
+                          for (let i = 0; i < this.changedate.length; i++) {
+                            this.remark = this.changedate[i].remark;
+                          }
+                          // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                          this.zhiyeJl = this.changedate[0].zhiyejl || "";
+                          this.zhiyeJg =
+                            this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                        } else {
+                          this.$message({
+                            type: "warning",
+                            message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                          });
+                          // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                          this.zhiyeJl = "";
+                          this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
                         }
-                        // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                        this.zhiyeJl = this.changedate[0].zhiyejl || "";
-                        this.zhiyeJg =
-                          this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                      } else {
-                        this.$message({
-                          type: "warning",
-                          message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
-                        });
-                        // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
-                        this.zhiyeJl = "";
-                        this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                      }
+
+                      });
                     });
-                  });
-                }
-              });
+                  }
+                });
+              } else {
+                // 寮傚父缁撴灉鏈夋暟鎹紝绛夊緟宸﹀彸涓よ竟閮藉姞杞藉畬鎴�
+                getInfo().then((response) => {
+                  this.userId = response.user.userId;
+                  if (this.userId) {
+                    let data = {
+                      userId: this.userId,
+                      tjNumber: this.tjNumber,
+                      state: 0,
+                    };
+                    getModifiedState(data).then((res) => {
+                      this.MsgId = res.msg;
+                      getupdateCheckType(this.tjNumber).then((response) => {
+                        this.isLoading = false; // 鍏抽棴鍔犺浇妗�
+                        this.changedate = response.data;
+                        if (this.changedate) {
+                          this.changedate.forEach((item) => {
+                            this.textarea1 = item.checkAdvice || "";
+                          });
+                          this.initialTotalCheckAdvice = this.textarea1;
+                          this.initialState = JSON.parse(
+                            JSON.stringify(this.changedate)
+                          );
+                          for (let i = 0; i < this.changedate.length; i++) {
+                            this.remark = this.changedate[i].remark;
+                          }
+                          // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                          this.zhiyeJl = this.changedate[0].zhiyejl || "";
+                          this.zhiyeJg =
+                            this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                        } else {
+                          this.$message({
+                            type: "warning",
+                            message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                          });
+                          // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                          this.zhiyeJl = "";
+                          this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                        }
+                      });
+                    });
+                  }
+                });
+              }
             });
           } else {
             this.$confirm(
@@ -3262,57 +3301,99 @@
               }
             )
               .then(() => {
+                // 鍏抽棴琛ㄦ牸鐨刲oading鐘舵��
+                this.loading = false;
+                // 鐢ㄦ埛纭寮哄埗杩涘叆锛屽紑鍚姞杞藉拰寮规
+                this.isLoading = true;
+                this.drawer = true;
                 // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫
                 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) {
-                      let data = {
-                        userId: this.userId,
-                        tjNumber: this.tjNumber,
-                        state: 0,
-                      };
-                      getforceIn(data).then((res) => {
-                        this.MsgId = res.msg;
-                        this.drawer = true;
-                        getupdateCheckType(this.tjNumber).then((response) => {
-                          this.isLoading = false; // 鍏抽棴鍔犺浇妗�
-                          this.changedate = response.data;
-                          if (this.changedate) {
-                            for (let i = 0; i < this.changedate.length; i++) {
-                              this.remark = this.changedate[i].remark;
+                    getInfo().then((response) => {
+                      this.userId = response.user.userId;
+                      if (this.userId) {
+                        let data = {
+                          userId: this.userId,
+                          tjNumber: this.tjNumber,
+                          state: 0,
+                        };
+                        getforceIn(data).then((res) => {
+                          this.MsgId = res.msg;
+                          getupdateCheckType(this.tjNumber).then((response) => {
+                            this.isLoading = false; // 鍏抽棴鍔犺浇妗�
+                            this.changedate = response.data;
+                            if (this.changedate) {
+                              for (let i = 0; i < this.changedate.length; i++) {
+                                this.remark = this.changedate[i].remark;
+                              }
+                              this.initialState = JSON.parse(
+                                JSON.stringify(this.changedate)
+                              );
+                              this.changedate.forEach((item) => {
+                                this.textarea1 = item.checkAdvice || "";
+                              });
+                              // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                              this.zhiyeJl = this.changedate[0].zhiyejl || "";
+                              this.zhiyeJg =
+                                this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                            } else {
+                              this.$message({
+                                type: "warning",
+                                message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                              });
+                              // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                              this.zhiyeJl = "";
+                              this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
                             }
-                            this.initialState = JSON.parse(
-                              JSON.stringify(this.changedate)
-                            );
-                            this.changedate.forEach((item) => {
-                              this.textarea1 = item.checkAdvice || "";
-                            });
-                            // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                            this.zhiyeJl = this.changedate[0].zhiyejl || "";
-                            this.zhiyeJg =
-                              this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                          } else {
-                            this.$message({
-                              type: "warning",
-                              message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
-                            });
-                            // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
-                            this.zhiyeJl = "";
-                            this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
-                          }
+
+                          });
                         });
-                      });
-                    }
-                  });
+                      }
+                    });
+                  } else {
+                    // 寮傚父缁撴灉鏈夋暟鎹紝绛夊緟宸﹀彸涓よ竟閮藉姞杞藉畬鎴�
+                    getInfo().then((response) => {
+                      this.userId = response.user.userId;
+                      if (this.userId) {
+                        let data = {
+                          userId: this.userId,
+                          tjNumber: this.tjNumber,
+                          state: 0,
+                        };
+                        getforceIn(data).then((res) => {
+                          this.MsgId = res.msg;
+                          getupdateCheckType(this.tjNumber).then((response) => {
+                            this.isLoading = false; // 鍏抽棴鍔犺浇妗�
+                            this.changedate = response.data;
+                            if (this.changedate) {
+                              for (let i = 0; i < this.changedate.length; i++) {
+                                this.remark = this.changedate[i].remark;
+                              }
+                              this.initialState = JSON.parse(
+                                JSON.stringify(this.changedate)
+                              );
+                              this.changedate.forEach((item) => {
+                                this.textarea1 = item.checkAdvice || "";
+                              });
+                              // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                              this.zhiyeJl = this.changedate[0].zhiyejl || "";
+                              this.zhiyeJg =
+                                this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                            } else {
+                              this.$message({
+                                type: "warning",
+                                message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                              });
+                              // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                              this.zhiyeJl = "";
+                              this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�";
+                            }
+                          });
+                        });
+                      }
+                    });
+                  }
                 });
               })
               .catch(() => {

--
Gitblit v1.8.0