|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<div class="app-container" v-loading="loading"> |
|
|
|
<div class="hospital">{{ tenantName || "- - - -" }}</div> |
|
|
|
<el-form |
|
|
|
v-if="stepNum == 1" |
|
|
@ -157,7 +157,7 @@ |
|
|
|
下一步 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<div class="submit-box" v-if="stepNum == 2"> |
|
|
|
<div class="submit-box" v-if="stepNum == 2 && disabled"> |
|
|
|
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm"> |
|
|
|
提交 |
|
|
|
</el-button> |
|
|
@ -177,9 +177,12 @@ export default { |
|
|
|
name: "Notice", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
loading: false, |
|
|
|
disabled: true, |
|
|
|
|
|
|
|
hospitalId: "", |
|
|
|
tenantName: "", |
|
|
|
stepNum: 1, // 步骤数 |
|
|
|
stepNum: 2, // 步骤数 |
|
|
|
uploadFileUrl: process.env.VUE_APP_BASE_URL + "/baidu/ocr/idcardInfo", // 上传的图片服务器地址 |
|
|
|
fileList: [], |
|
|
|
|
|
|
@ -331,15 +334,15 @@ export default { |
|
|
|
}, |
|
|
|
], // 表单参数 |
|
|
|
form: { |
|
|
|
"SCWJ-NAME": "", |
|
|
|
"SCWJ-SEX": "", |
|
|
|
"SCWJ-BIRTH": "", |
|
|
|
"SCWJ-AGE": "", |
|
|
|
"SCWJ-PHONE": "", |
|
|
|
"SCWJ-HEIGHT": "", |
|
|
|
"SCWJ-WEIGHT": "", |
|
|
|
"SCWJ-BMI": "", |
|
|
|
"SCWJ-JL": "", |
|
|
|
"SCWJ-NAME": "测试患者", |
|
|
|
"SCWJ-SEX": "男", |
|
|
|
"SCWJ-BIRTH": "1945-01-01", |
|
|
|
"SCWJ-AGE": "70", |
|
|
|
"SCWJ-PHONE": "18534353638", |
|
|
|
"SCWJ-HEIGHT": "170", |
|
|
|
"SCWJ-WEIGHT": "80", |
|
|
|
"SCWJ-BMI": "24.56", |
|
|
|
"SCWJ-JL": "正常", |
|
|
|
"SCWJ-ZLFS": [], |
|
|
|
}, |
|
|
|
// 表单校验 |
|
|
@ -542,49 +545,55 @@ export default { |
|
|
|
}, |
|
|
|
// 量表结果 |
|
|
|
async scaleSubmitForm() { |
|
|
|
// ------ 量表分值计算 ------ |
|
|
|
let score = 0; |
|
|
|
// 计算总分, topic${i}属性不一定存在,先校验是否存在 |
|
|
|
for (let i = 1; i <= 24; i++) { |
|
|
|
if (this.form[`topic${i}`] !== undefined) { |
|
|
|
score += this.form[`topic${i}`]; |
|
|
|
try { |
|
|
|
// ------ 量表分值计算 ------ |
|
|
|
let score = 0; |
|
|
|
// 计算总分, topic${i}属性不一定存在,先校验是否存在 |
|
|
|
for (let i = 1; i <= 24; i++) { |
|
|
|
if (this.form[`topic${i}`] !== undefined) { |
|
|
|
score += this.form[`topic${i}`]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// ------ 创建筛查 ------ |
|
|
|
const params = { |
|
|
|
param: { |
|
|
|
type: 33, |
|
|
|
hospitalId: this.hospitalId, |
|
|
|
centerId: this.hospitalId, |
|
|
|
}, |
|
|
|
}; |
|
|
|
create(params).then(async (res) => { |
|
|
|
this.detailId = res.data.detailId; |
|
|
|
this.id = res.data.id; |
|
|
|
// ------ 保存答案 ------ |
|
|
|
// 基本信息 |
|
|
|
await this.saveAnswer(this.form["SCWJ-NAME"], "SCWJ-NAME"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-SEX"], "SCWJ-SEX"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-BIRTH"], "SCWJ-BIRTH"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-AGE"], "SCWJ-AGE"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-PHONE"], "SCWJ-PHONE"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-HEIGHT"], "SCWJ-HEIGHT"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-WEIGHT"], "SCWJ-WEIGHT"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-BMI"], "SCWJ-BMI"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-JL"], "SCWJ-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) => { |
|
|
|
this.$modal.msgSuccess("提交成功"); |
|
|
|
// setTimeout(() => { |
|
|
|
// location.reload(); |
|
|
|
// }, 3000); |
|
|
|
// ------ 创建筛查 ------ |
|
|
|
const params = { |
|
|
|
param: { |
|
|
|
type: 33, |
|
|
|
hospitalId: this.hospitalId, |
|
|
|
centerId: this.hospitalId, |
|
|
|
}, |
|
|
|
}; |
|
|
|
create(params).then(async (res) => { |
|
|
|
this.loading = true; |
|
|
|
this.detailId = res.data.detailId; |
|
|
|
this.id = res.data.id; |
|
|
|
// ------ 保存答案 ------ |
|
|
|
// 基本信息 |
|
|
|
await this.saveAnswer(this.form["SCWJ-NAME"], "SCWJ-NAME"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-SEX"], "SCWJ-SEX"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-BIRTH"], "SCWJ-BIRTH"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-AGE"], "SCWJ-AGE"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-PHONE"], "SCWJ-PHONE"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-HEIGHT"], "SCWJ-HEIGHT"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-WEIGHT"], "SCWJ-WEIGHT"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-BMI"], "SCWJ-BMI"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-JL"], "SCWJ-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) => { |
|
|
|
this.loading = false; |
|
|
|
this.disabled = false; |
|
|
|
this.$modal.msgSuccess("提交成功"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} catch (error) { |
|
|
|
this.loading = false; |
|
|
|
console.log("提交失败:", error); |
|
|
|
this.$message.error("提交失败,请稍后重试!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 保存答案 |
|
|
|
async saveAnswer(value, str) { |
|
|
@ -598,8 +607,8 @@ export default { |
|
|
|
}; |
|
|
|
await screenSave(params).then((response) => {}); |
|
|
|
} catch (error) { |
|
|
|
console.log("error", error); |
|
|
|
this.$message.error("网络异常,请检查您的网络!"); |
|
|
|
console.log("保存失败:", error); |
|
|
|
this.$message.error("保存失败,请稍后重试!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|