| | |
| | | style="width: 100%" |
| | | :header-cell-style="{ background: '#67C23A' }" |
| | | :row-key="getRowKeys" |
| | | v-loading="loading" |
| | | > |
| | | <!-- :expand-row-keys="expends" --> |
| | | <el-table-column type="expand"> |
| | |
| | | }, |
| | | |
| | | yichangjieguo() { |
| | | this.isLoading = true; |
| | | this.loading = true; |
| | | this.status1 = 0; |
| | | this.yichangList = []; |
| | | yichang({ |
| | | tjNum: this.tjNumber, |
| | | }) |
| | | .then((res) => { |
| | | // this.isLoading = false |
| | | this.yichangList = res.data; |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | yichang({ |
| | | tjNum: this.tjNumber, |
| | | }) |
| | | .then((res) => { |
| | | const data = res.data; |
| | | |
| | | this.yichangList.forEach((item) => { |
| | | item.sone.forEach((soneItem) => { |
| | | if ( |
| | | !Array.isArray(soneItem.advices) || |
| | | soneItem.advices.length === 0 |
| | | ) { |
| | | soneItem.advices = [{ bt: "", nr: "" }]; |
| | | } |
| | | 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) => { |
| | | if ( |
| | | !Array.isArray(soneItem.advices) || |
| | | soneItem.advices.length === 0 |
| | | ) { |
| | | soneItem.advices = [{ bt: "", nr: "" }]; |
| | | } |
| | | }); |
| | | }); |
| | | if (!this.yichangList) { |
| | | this.$message.warning("暂无异常报告"); |
| | | } |
| | | resolve(); // 成功完成 |
| | | }) |
| | | .catch((error) => { |
| | | this.loading = false; |
| | | console.error("获取异常结果失败:", error); |
| | | this.$message.error("获取异常结果失败"); |
| | | reject(error); // 返回错误 |
| | | }) |
| | | .finally(() => { |
| | | if (this.loading) { |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | if (!this.yichangList) { |
| | | this.$message.warning("暂无异常报告"); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | this.isLoading = false; |
| | | console.error("获取异常结果失败:", error); |
| | | this.$message.error("获取异常结果失败"); |
| | | }) |
| | | .finally(() => { |
| | | this.isLoading = false; |
| | | this.loading = false; |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | fuchaxiangmu() { |
| | |
| | | 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; |
| | |
| | | |
| | | 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.yichangjieguo(); |
| | | 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.isLoading = true; |
| | | 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; |
| | | } |
| | | // 回显 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.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; |
| | | } |
| | | // 回显 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(() => { |
| | | this.yichangjieguo(); |
| | | 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.isLoading = true; |
| | | 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; |
| | | } |
| | | 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.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; |
| | | } |
| | | 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(() => { |
| | | this.isLoading = false; // 取消时也要关闭加载框 |
| | | this.$message({ |
| | | type: "info", |
| | | message: "已取消进入", |
| | |
| | | let tjNumber = this.tableAll.tjNumber; |
| | | let tjh = this.tableAll.tjNumber; |
| | | let advice = this.textarea1; |
| | | this.isLoading = true; |
| | | let data = { |
| | | tjNumber, |
| | | advice, |
| | |
| | | getTjdetailList(data) |
| | | .then((response) => { |
| | | if (response.code === 200) { |
| | | this.$modal.msgSuccess("提交成功"); |
| | | this.isLoading = false; |
| | | this.$modal.msgSuccess(response.msg); |
| | | // 清空字段 |
| | | this.zhiyeJl = ""; |
| | | this.zhiyeJg = ""; |
| | |
| | | state: 1, |
| | | id: this.MsgId, |
| | | }; |
| | | gettoPdf(tjNumber) |
| | | /* gettoPdf(tjNumber) |
| | | .then((res) => { |
| | | this.$modal.msgSuccess("已生成报告!请前往报告核收页面确认!"); |
| | | }) |
| | |
| | | this.$modal.msgError( |
| | | "打印报告失败,请前往报告打印页面补打报告!" |
| | | ); |
| | | }); |
| | | }); */ |
| | | const statePromise = getfiedState(reportData).then(() => { |
| | | this.drawer = false; |
| | | }); |