tj
qx
1 天以前 d3ea99796e35f4be7d2a77957b0be57bee011663
src/views/doctor/checkAll/index.vue
@@ -2593,8 +2593,9 @@
    },
    yichangjieguo() {
      this.loading = true;
      this.isLoading = true;
      // 移除表格loading状态,避免在点击详情时显示表格loading框
      // this.loading = true;
      // 不要在这里设置 isLoading = true,因为它在 handleClick 中已经被设置了
      this.status1 = 0;
      getConfigKey("kzycxmsfzk").then((res) => {
        this.shouldExpand = res.msg;
@@ -2612,9 +2613,11 @@
          const data = res.data;
          if (!data || data.length === 0) {
            this.$message.warning("暂无异常报告");
            this.loading = false;
            this.isLoading = false; // 关闭整体加载框
            // 移除警告消息,用户不希望看到"暂无异常报告"的弹框
            // this.$message.warning("暂无异常报告");
            // 移除表格loading状态设置
            // this.loading = false;
            // 不在这里关闭 isLoading,因为它由 handleClick 管理
            resolve(); // 返回 Promise,但不继续后续逻辑
            return;
          }
@@ -2629,9 +2632,9 @@
              }
            });
          });
          if (!this.yichangList) {
          /* if (!this.yichangList) {
            this.$message.warning("暂无异常报告");
          }
          } */
          resolve(); // 成功完成
          // 这里也可以根据shouldExpand再调用一次getExpends,确保数据已加载
          if (this.shouldExpand === "Y" || this.shouldExpand === "y") {
@@ -2642,20 +2645,18 @@
        });
      })
        .catch((error) => {
          this.isLoading = false;
          this.loading = false;
          // 不在这里关闭 isLoading,因为它由 handleClick 管理
          // 移除表格loading状态设置
          // this.loading = false;
          console.error("获取异常结果失败:", error);
          this.$message.error("获取异常结果失败");
          reject(error); // 返回错误
        })
        .finally(() => {
          // 只在没有提前返回的情况下关闭加载框
          if (this.isLoading) {
            this.isLoading = false;
          }
          if (this.loading) {
            this.loading = false;
          }
          // 移除表格loading状态设置,因为 isLoading 由 handleClick 管理
          // if (this.loading) {
          //   this.loading = false;
          // }
        });
    },
@@ -3215,7 +3216,7 @@
                  this.isLoading = true;
                  this.drawer = true;
                  getupdateCheckType(this.tjNumber).then((response) => {
                    // this.isLoading = false;
                    this.isLoading = false;
                    this.changedate = response.data;
                    if (this.changedate) {
                      this.changedate.forEach((item) => {
@@ -3241,6 +3242,10 @@
                      this.zhiyeJl = "";
                      this.zhiyeJg = "未发现目标性疾病";
                    }
                  }).catch((error) => {
                    this.isLoading = false;
                    console.error("获取检查类型失败:", error);
                    this.$message.error("获取检查类型失败");
                  });
                });
              }
@@ -3270,7 +3275,7 @@
                      this.isLoading = true;
                      this.drawer = true;
                      getupdateCheckType(this.tjNumber).then((response) => {
                        // this.isLoading = false;
                        this.isLoading = false;
                        this.changedate = response.data;
                        if (this.changedate) {
                          for (let i = 0; i < this.changedate.length; i++) {
@@ -3295,6 +3300,10 @@
                          this.zhiyeJl = "";
                          this.zhiyeJg = "未发现目标性疾病";
                        }
                      }).catch((error) => {
                        this.isLoading = false;
                        console.error("获取检查类型失败:", error);
                        this.$message.error("获取检查类型失败");
                      });
                    });
                  }