qx
qx
2 天以前 26a983e0c22f1fe54c91c66c2b52888858e52cd1
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 = ""; // 设置默认值
      });
    },
@@ -2582,6 +2594,7 @@
    yichangjieguo() {
      this.loading = true;
      this.isLoading = true;
      this.status1 = 0;
      getConfigKey("kzycxmsfzk").then((res) => {
        this.shouldExpand = res.msg;
@@ -2592,11 +2605,20 @@
          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("暂无异常报告");
            this.loading = false;
            this.isLoading = false; // 关闭整体加载框
            resolve(); // 返回 Promise,但不继续后续逻辑
            return;
          }
          this.yichangList = data;
          this.yichangList.forEach((item) => {
            item.sone.forEach((soneItem) => {
              if (
@@ -2610,24 +2632,32 @@
          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;
          this.loading = false;
          console.error("获取异常结果失败:", error);
          this.$message.error("获取异常结果失败");
          reject(error); // 返回错误
        })
        .finally(() => {
          this.isLoading = false;
          this.loading = false;
          // 只在没有提前返回的情况下关闭加载框
          if (this.isLoading) {
            this.isLoading = false;
          }
          if (this.loading) {
            this.loading = false;
          }
        });
    },
    fuchaxiangmu() {
      this.loading = true;