|
|
@ -316,7 +316,8 @@ export default { |
|
|
|
open: false, |
|
|
|
loading: false, |
|
|
|
disabled: true, |
|
|
|
detailList: {}, |
|
|
|
detailList: {}, // 筛查患者详情 |
|
|
|
detailId: null, // 筛查患者id |
|
|
|
tenantId: "", |
|
|
|
tenantName: "", |
|
|
|
stepNum: 1, // 步骤数 |
|
|
@ -649,7 +650,9 @@ export default { |
|
|
|
// 编辑信息 |
|
|
|
handleContinue() { |
|
|
|
this.form = { ...this.form, ...this.detailList }; |
|
|
|
setTimeout(() => { |
|
|
|
this.open = false; |
|
|
|
}, 200); |
|
|
|
}, |
|
|
|
// 查看结果 |
|
|
|
handleResult() { |
|
|
@ -673,6 +676,7 @@ export default { |
|
|
|
this.detailList = {}; |
|
|
|
if (res.data.list.length) { |
|
|
|
let data = res.data.list[0]; |
|
|
|
this.detailId = data.id; |
|
|
|
data.detailList.forEach((item) => { |
|
|
|
this.detailList[item.questionCode] = item.answer; |
|
|
|
}); |
|
|
@ -901,10 +905,28 @@ export default { |
|
|
|
centerId: this.tenantId, |
|
|
|
}, |
|
|
|
}; |
|
|
|
// detailId 存在,说明是编辑 |
|
|
|
if (this.detailId) { |
|
|
|
this.loading = true; |
|
|
|
this.handlesaveCommit(); |
|
|
|
} else { |
|
|
|
create(params).then(async (res) => { |
|
|
|
this.loading = true; |
|
|
|
this.detailId = res.data.detailId; |
|
|
|
this.id = res.data.id; |
|
|
|
this.handlesaveCommit(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} catch (error) { |
|
|
|
this.loading = false; |
|
|
|
this.disabled = false; |
|
|
|
console.log("提交失败:", error); |
|
|
|
this.$message.error("提交失败,请稍后重试!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 保存答案、提交 |
|
|
|
async handlesaveCommit() { |
|
|
|
// ------ 保存答案 ------ |
|
|
|
// 基本信息 |
|
|
|
await this.saveAnswer(this.form["SCWJ-DW"], "SCWJ-DW"); |
|
|
@ -922,21 +944,7 @@ export default { |
|
|
|
await this.saveAnswer(this.form["SCWJ-SXSJ"], "SCWJ-SXSJ"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-QCSJ"], "SCWJ-QCSJ"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-SMXL"], "SCWJ-SMXL"); |
|
|
|
// 现病史暂时去掉(甲方:把疾病风险选择去掉,领导说太占时间了) |
|
|
|
// await this.saveAnswer( |
|
|
|
// this.form["SCWJ-XBS"].toString(), |
|
|
|
// "SCWJ-XBS" |
|
|
|
// ); |
|
|
|
// await this.saveAnswer(this.form["SCWJ-XBS-QT"], "SCWJ-XBS-QT"); |
|
|
|
await this.saveAnswer(this.tips, "SCREEN-JL"); |
|
|
|
|
|
|
|
// 筛查总分 |
|
|
|
// await this.saveAnswer(score, "SCWJ-RESULT"); |
|
|
|
// await this.saveAnswer( |
|
|
|
// this.form["SCWJ-ZLFS"].toString(), |
|
|
|
// "SCWJ-ZLFS" |
|
|
|
// ); // 治疗方式 |
|
|
|
// await this.saveAnswer(this.form["SCWJ-ZLZQ"], "SCWJ-ZLZQ"); // 治疗周期 |
|
|
|
// ------ 提交筛查 ------ |
|
|
|
const submitParams = { param: { detailId: this.detailId } }; |
|
|
|
await screenSubmit(submitParams).then((response) => { |
|
|
@ -952,15 +960,6 @@ export default { |
|
|
|
data: JSON.stringify(this.form), |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} catch (error) { |
|
|
|
this.loading = false; |
|
|
|
this.disabled = false; |
|
|
|
console.log("提交失败:", error); |
|
|
|
this.$message.error("提交失败,请稍后重试!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 保存答案 |
|
|
|
async saveAnswer(value, str) { |
|
|
|