1
lkk
3 天以前 cc56726cba53d30f27bd286bdad8c74cabce983d
1
1个文件已修改
45 ■■■■ 已修改文件
src/views/doctor/checkAll/index.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/checkAll/index.vue
@@ -2581,14 +2581,25 @@
    yichangjieguo() {
      this.loading = true;
      this.isLoading = 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;
              this.isLoading = false; // 关闭整体加载框
              resolve(); // 返回 Promise,但不继续后续逻辑
              return;
            }
            this.yichangList = data;
          this.yichangList.forEach((item) => {
            item.sone.forEach((soneItem) => {
@@ -2603,15 +2614,24 @@
          if (!this.yichangList) {
            this.$message.warning("暂无异常报告");
          }
            resolve(); // 成功完成
        })
        .catch((error) => {
          this.isLoading = false;
            this.loading = false;
          console.error("获取异常结果失败:", error);
          this.$message.error("获取异常结果失败");
            reject(error); // 返回错误
        })
        .finally(() => {
            // 只在没有提前返回的情况下关闭加载框
            if (this.isLoading) {
          this.isLoading = false;
            }
            if (this.loading) {
          this.loading = false;
            }
          });
        });
    },
@@ -2939,6 +2959,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;
@@ -3183,7 +3204,9 @@
        this.status = res.data;
        if (this.status) {
          if (this.status.status === "1") {
            this.yichangjieguo();
            // 先调用异常结果,等待其完成后再继续后续逻辑
            this.yichangjieguo().then(() => {
              // 无论异常结果是否有数据,都继续后续逻辑
            getInfo().then((response) => {
              this.userId = response.user.userId;
              if (this.userId) {
@@ -3194,10 +3217,13 @@
                };
                getModifiedState(data).then((res) => {
                  this.MsgId = res.msg;
                    // 只有当异常结果有数据时才开启加载框
                    if (this.yichangList && this.yichangList.length > 0) {
                  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 +3253,7 @@
                });
              }
            });
            });
          } else {
            this.$confirm(
              "" + this.status.name + "正在修改该信息, 是否强制进去?",
@@ -3238,7 +3265,9 @@
              }
            )
              .then(() => {
                this.yichangjieguo();
                // 先调用异常结果,等待其完成后再继续后续逻辑
                this.yichangjieguo().then(() => {
                  // 无论异常结果是否有数据,都继续后续逻辑
                getInfo().then((response) => {
                  this.userId = response.user.userId;
                  if (this.userId) {
@@ -3249,10 +3278,13 @@
                    };
                    getforceIn(data).then((res) => {
                      this.MsgId = res.msg;
                        // 只有当异常结果有数据时才开启加载框
                        if (this.yichangList && this.yichangList.length > 0) {
                      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,6 +3313,7 @@
                    });
                  }
                });
                });
              })
              .catch(() => {
                this.$message({