| | |
| | | const data = res.data; |
| | | |
| | | if (!data || data.length === 0) { |
| | | this.$message.warning("暂无异常报告"); |
| | | this.loading = false; |
| | | resolve(); // 返回 Promise,但不继续后续逻辑 |
| | | return; |
| | |
| | | |
| | | handleClick(row) { |
| | | this.qingkong(); |
| | | this.isLoading = true; // 开始整体加载 |
| | | this.$refs.Pre.open = false; |
| | | this.tableAll = row; |
| | | let dict = "dict_tjtype"; |
| | |
| | | this.status = res.data; |
| | | if (this.status) { |
| | | if (this.status.status === "1") { |
| | | // 没有强制进入弹框,直接开启加载和弹框 |
| | | this.isLoading = true; |
| | | this.drawer = true; |
| | | // 先调用异常结果,等待其完成后再继续后续逻辑 |
| | | 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) { |
| | | let data = { |
| | | userId: this.userId, |
| | | tjNumber: this.tjNumber, |
| | | state: 0, |
| | | }; |
| | | getModifiedState(data).then((res) => { |
| | | this.MsgId = res.msg; |
| | | this.drawer = true; |
| | | getupdateCheckType(this.tjNumber).then((response) => { |
| | | this.isLoading = false; // 关闭加载框 |
| | | this.changedate = response.data; |
| | | if (this.changedate) { |
| | | this.changedate.forEach((item) => { |
| | | this.textarea1 = item.checkAdvice || ""; |
| | | }); |
| | | this.initialTotalCheckAdvice = this.textarea1; |
| | | this.initialState = JSON.parse( |
| | | JSON.stringify(this.changedate) |
| | | ); |
| | | for (let i = 0; i < this.changedate.length; i++) { |
| | | this.remark = this.changedate[i].remark; |
| | | getInfo().then((response) => { |
| | | this.userId = response.user.userId; |
| | | if (this.userId) { |
| | | let data = { |
| | | userId: this.userId, |
| | | tjNumber: this.tjNumber, |
| | | state: 0, |
| | | }; |
| | | getModifiedState(data).then((res) => { |
| | | this.MsgId = res.msg; |
| | | getupdateCheckType(this.tjNumber).then((response) => { |
| | | this.isLoading = false; // 关闭加载框 |
| | | this.changedate = response.data; |
| | | if (this.changedate) { |
| | | this.changedate.forEach((item) => { |
| | | this.textarea1 = item.checkAdvice || ""; |
| | | }); |
| | | this.initialTotalCheckAdvice = this.textarea1; |
| | | this.initialState = JSON.parse( |
| | | JSON.stringify(this.changedate) |
| | | ); |
| | | for (let i = 0; i < this.changedate.length; i++) { |
| | | this.remark = this.changedate[i].remark; |
| | | } |
| | | // 回显 zhiyeJl 和 zhiyeJg |
| | | this.zhiyeJl = this.changedate[0].zhiyejl || ""; |
| | | this.zhiyeJg = |
| | | this.changedate[0].zhiyejg || "未发现目标性疾病"; |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "该客户没有体检项目数据", |
| | | }); |
| | | // 如果没有数据,清空字段 |
| | | this.zhiyeJl = ""; |
| | | this.zhiyeJg = "未发现目标性疾病"; |
| | | } |
| | | // 回显 zhiyeJl 和 zhiyeJg |
| | | this.zhiyeJl = this.changedate[0].zhiyejl || ""; |
| | | this.zhiyeJg = |
| | | this.changedate[0].zhiyejg || "未发现目标性疾病"; |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "该客户没有体检项目数据", |
| | | }); |
| | | // 如果没有数据,清空字段 |
| | | this.zhiyeJl = ""; |
| | | this.zhiyeJg = "未发现目标性疾病"; |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | // 异常结果有数据,等待左右两边都加载完成 |
| | | getInfo().then((response) => { |
| | | this.userId = response.user.userId; |
| | | if (this.userId) { |
| | | let data = { |
| | | userId: this.userId, |
| | | tjNumber: this.tjNumber, |
| | | state: 0, |
| | | }; |
| | | getModifiedState(data).then((res) => { |
| | | this.MsgId = res.msg; |
| | | getupdateCheckType(this.tjNumber).then((response) => { |
| | | this.isLoading = false; // 关闭加载框 |
| | | this.changedate = response.data; |
| | | if (this.changedate) { |
| | | this.changedate.forEach((item) => { |
| | | this.textarea1 = item.checkAdvice || ""; |
| | | }); |
| | | this.initialTotalCheckAdvice = this.textarea1; |
| | | this.initialState = JSON.parse( |
| | | JSON.stringify(this.changedate) |
| | | ); |
| | | for (let i = 0; i < this.changedate.length; i++) { |
| | | this.remark = this.changedate[i].remark; |
| | | } |
| | | // 回显 zhiyeJl 和 zhiyeJg |
| | | this.zhiyeJl = this.changedate[0].zhiyejl || ""; |
| | | this.zhiyeJg = |
| | | this.changedate[0].zhiyejg || "未发现目标性疾病"; |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "该客户没有体检项目数据", |
| | | }); |
| | | // 如果没有数据,清空字段 |
| | | this.zhiyeJl = ""; |
| | | this.zhiyeJg = "未发现目标性疾病"; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$confirm( |
| | |
| | | } |
| | | ) |
| | | .then(() => { |
| | | // 关闭表格的loading状态 |
| | | this.loading = false; |
| | | // 用户确认强制进入,开启加载和弹框 |
| | | this.isLoading = true; |
| | | this.drawer = true; |
| | | // 先调用异常结果,等待其完成后再继续后续逻辑 |
| | | 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) { |
| | | let data = { |
| | | userId: this.userId, |
| | | tjNumber: this.tjNumber, |
| | | state: 0, |
| | | }; |
| | | getforceIn(data).then((res) => { |
| | | this.MsgId = res.msg; |
| | | this.drawer = true; |
| | | getupdateCheckType(this.tjNumber).then((response) => { |
| | | this.isLoading = false; // 关闭加载框 |
| | | this.changedate = response.data; |
| | | if (this.changedate) { |
| | | for (let i = 0; i < this.changedate.length; i++) { |
| | | this.remark = this.changedate[i].remark; |
| | | getInfo().then((response) => { |
| | | this.userId = response.user.userId; |
| | | if (this.userId) { |
| | | let data = { |
| | | userId: this.userId, |
| | | tjNumber: this.tjNumber, |
| | | state: 0, |
| | | }; |
| | | getforceIn(data).then((res) => { |
| | | this.MsgId = res.msg; |
| | | getupdateCheckType(this.tjNumber).then((response) => { |
| | | this.isLoading = false; // 关闭加载框 |
| | | this.changedate = response.data; |
| | | if (this.changedate) { |
| | | for (let i = 0; i < this.changedate.length; i++) { |
| | | this.remark = this.changedate[i].remark; |
| | | } |
| | | this.initialState = JSON.parse( |
| | | JSON.stringify(this.changedate) |
| | | ); |
| | | this.changedate.forEach((item) => { |
| | | this.textarea1 = item.checkAdvice || ""; |
| | | }); |
| | | // 回显 zhiyeJl 和 zhiyeJg |
| | | this.zhiyeJl = this.changedate[0].zhiyejl || ""; |
| | | this.zhiyeJg = |
| | | this.changedate[0].zhiyejg || "未发现目标性疾病"; |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "该客户没有体检项目数据", |
| | | }); |
| | | // 如果没有数据,清空字段 |
| | | this.zhiyeJl = ""; |
| | | this.zhiyeJg = "未发现目标性疾病"; |
| | | } |
| | | this.initialState = JSON.parse( |
| | | JSON.stringify(this.changedate) |
| | | ); |
| | | this.changedate.forEach((item) => { |
| | | this.textarea1 = item.checkAdvice || ""; |
| | | }); |
| | | // 回显 zhiyeJl 和 zhiyeJg |
| | | this.zhiyeJl = this.changedate[0].zhiyejl || ""; |
| | | this.zhiyeJg = |
| | | this.changedate[0].zhiyejg || "未发现目标性疾病"; |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "该客户没有体检项目数据", |
| | | }); |
| | | // 如果没有数据,清空字段 |
| | | this.zhiyeJl = ""; |
| | | this.zhiyeJg = "未发现目标性疾病"; |
| | | } |
| | | |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | // 异常结果有数据,等待左右两边都加载完成 |
| | | getInfo().then((response) => { |
| | | this.userId = response.user.userId; |
| | | if (this.userId) { |
| | | let data = { |
| | | userId: this.userId, |
| | | tjNumber: this.tjNumber, |
| | | state: 0, |
| | | }; |
| | | getforceIn(data).then((res) => { |
| | | this.MsgId = res.msg; |
| | | getupdateCheckType(this.tjNumber).then((response) => { |
| | | this.isLoading = false; // 关闭加载框 |
| | | this.changedate = response.data; |
| | | if (this.changedate) { |
| | | for (let i = 0; i < this.changedate.length; i++) { |
| | | this.remark = this.changedate[i].remark; |
| | | } |
| | | this.initialState = JSON.parse( |
| | | JSON.stringify(this.changedate) |
| | | ); |
| | | this.changedate.forEach((item) => { |
| | | this.textarea1 = item.checkAdvice || ""; |
| | | }); |
| | | // 回显 zhiyeJl 和 zhiyeJg |
| | | this.zhiyeJl = this.changedate[0].zhiyejl || ""; |
| | | this.zhiyeJg = |
| | | this.changedate[0].zhiyejg || "未发现目标性疾病"; |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "该客户没有体检项目数据", |
| | | }); |
| | | // 如果没有数据,清空字段 |
| | | this.zhiyeJl = ""; |
| | | this.zhiyeJg = "未发现目标性疾病"; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | .catch(() => { |