qx
qx
3 天以前 44e7c74462e3dd3bf4bf24ab34b126d6e59c41f9
src/views/doctor/checkAll/index.vue
@@ -2583,12 +2583,21 @@
      this.loading = true;
      this.status1 = 0;
      this.yichangList = [];
      return new Promise((resolve, reject) => {
      yichang({
        tjNum: this.tjNumber,
      })
        .then((res) => {
          // this.isLoading = false
          this.yichangList = res.data;
            const data = res.data;
            if (!data || data.length === 0) {
              this.$message.warning("暂无异常报告");
              this.loading = false;
              resolve(); // 返回 Promise,但不继续后续逻辑
              return;
            }
            this.yichangList = data;
          this.yichangList.forEach((item) => {
            item.sone.forEach((soneItem) => {
@@ -2603,15 +2612,19 @@
          if (!this.yichangList) {
            this.$message.warning("暂无异常报告");
          }
            resolve(); // 成功完成
        })
        .catch((error) => {
          this.isLoading = false;
            this.loading = false;
          console.error("获取异常结果失败:", error);
          this.$message.error("获取异常结果失败");
            reject(error); // 返回错误
        })
        .finally(() => {
          this.isLoading = false;
            if (this.loading) {
          this.loading = false;
            }
          });
        });
    },
@@ -2939,6 +2952,7 @@
    radiotjprojectChange() {
      if (this.tjproject == "0") {
        getupdateCheckType(this.tjNumber).then((response) => {
          this.isLoading = false;
          this.changedate = response.data;
          this.changedate.forEach((item) => {
            this.textarea1 = item.checkAdvice;
@@ -3162,6 +3176,7 @@
    handleClick(row) {
      this.qingkong();
      this.isLoading = true; // 开始整体加载
      this.$refs.Pre.open = false;
      this.tableAll = row;
      let dict = "dict_tjtype";
@@ -3183,7 +3198,16 @@
        this.status = res.data;
        if (this.status) {
          if (this.status.status === "1") {
            this.yichangjieguo();
            // 先调用异常结果,等待其完成后再继续后续逻辑
            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) {
@@ -3194,10 +3218,9 @@
                };
                getModifiedState(data).then((res) => {
                  this.MsgId = res.msg;
                  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) => {
@@ -3227,6 +3250,7 @@
                });
              }
            });
            });
          } else {
            this.$confirm(
              "" + this.status.name + "正在修改该信息, 是否强制进去?",
@@ -3238,7 +3262,16 @@
              }
            )
              .then(() => {
                this.yichangjieguo();
                // 先调用异常结果,等待其完成后再继续后续逻辑
                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) {
@@ -3249,10 +3282,9 @@
                    };
                    getforceIn(data).then((res) => {
                      this.MsgId = res.msg;
                      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++) {
@@ -3281,8 +3313,10 @@
                    });
                  }
                });
                });
              })
              .catch(() => {
                this.isLoading = false; // 取消时也要关闭加载框
                this.$message({
                  type: "info",
                  message: "已取消进入",