1
lkk
1 天以前 6a341a52246c20a662808f055ea446aa06b92a0d
src/views/doctor/checkAll/index.vue
@@ -2542,14 +2542,26 @@
    },
    getConfigKey() {
      getconfigKey("sfkqtwbg").then((res) => {
      // 使用正确的 getConfigKey 函数(需要参数)
      getConfigKey("sfkqtwbg").then((res) => {
        this.msgtuwen = res.msg;
      }).catch((error) => {
        console.warn("获取配置项 sfkqtwbg 失败:", error);
        this.msgtuwen = ""; // 设置默认值
      });
      getconfigKey("sfkqjqwz").then((res) => {
      getConfigKey("sfkqjqwz").then((res) => {
        this.msgjianqian = res.msg;
      }).catch((error) => {
        console.warn("获取配置项 sfkqjqwz 失败:", error);
        this.msgjianqian = ""; // 设置默认值
      });
      getconfigKey("kcf").then((res) => {
      getConfigKey("kcf").then((res) => {
        this.msgkcf = res.msg;
      }).catch((error) => {
        console.warn("获取配置项 kcf 失败:", error);
        this.msgkcf = ""; // 设置默认值
      });
    },
@@ -2581,7 +2593,9 @@
    },
    yichangjieguo() {
      this.loading = true;
      // 移除表格loading状态,避免在点击详情时显示表格loading框
      // this.loading = true;
      // 不要在这里设置 isLoading = true,因为它在 handleClick 中已经被设置了
      this.status1 = 0;
      getConfigKey("kzycxmsfzk").then((res) => {
        this.shouldExpand = res.msg;
@@ -2592,11 +2606,22 @@
          this.expends = [];
        }
      });
      yichang({
        tjNum: this.tjNumber,
      })
        .then((res) => {
          this.yichangList = res.data;
      return new Promise((resolve, reject) => {
        yichang({
          tjNum: this.tjNumber,
        }).then((res) => {
          const data = res.data;
          if (!data || data.length === 0) {
            // 移除警告消息,用户不希望看到"暂无异常报告"的弹框
            // this.$message.warning("暂无异常报告");
            // 移除表格loading状态设置
            // this.loading = false;
            // 不在这里关闭 isLoading,因为它由 handleClick 管理
            resolve(); // 返回 Promise,但不继续后续逻辑
            return;
          }
          this.yichangList = data;
          this.yichangList.forEach((item) => {
            item.sone.forEach((soneItem) => {
              if (
@@ -2607,27 +2632,33 @@
              }
            });
          });
          if (!this.yichangList) {
          /* if (!this.yichangList) {
            this.$message.warning("暂无异常报告");
          }
          } */
          resolve(); // 成功完成
          // 这里也可以根据shouldExpand再调用一次getExpends,确保数据已加载
          if (this.shouldExpand === "Y" || this.shouldExpand === "y") {
            this.getExpends();
          } else {
            this.expends = [];
          }
        })
        });
      })
        .catch((error) => {
          this.isLoading = false;
          // 不在这里关闭 isLoading,因为它由 handleClick 管理
          // 移除表格loading状态设置
          // this.loading = false;
          console.error("获取异常结果失败:", error);
          this.$message.error("获取异常结果失败");
          reject(error); // 返回错误
        })
        .finally(() => {
          this.isLoading = false;
          this.loading = false;
          // 移除表格loading状态设置,因为 isLoading 由 handleClick 管理
          // if (this.loading) {
          //   this.loading = false;
          // }
        });
    },
    fuchaxiangmu() {
      this.loading = true;
@@ -3185,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) => {
@@ -3211,6 +3242,10 @@
                      this.zhiyeJl = "";
                      this.zhiyeJg = "未发现目标性疾病";
                    }
                  }).catch((error) => {
                    this.isLoading = false;
                    console.error("获取检查类型失败:", error);
                    this.$message.error("获取检查类型失败");
                  });
                });
              }
@@ -3240,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++) {
@@ -3265,6 +3300,10 @@
                          this.zhiyeJl = "";
                          this.zhiyeJg = "未发现目标性疾病";
                        }
                      }).catch((error) => {
                        this.isLoading = false;
                        console.error("获取检查类型失败:", error);
                        this.$message.error("获取检查类型失败");
                      });
                    });
                  }