|
|
@ -6,7 +6,7 @@ |
|
|
|
:rules="rules" |
|
|
|
ref="form" |
|
|
|
:model="form" |
|
|
|
label-width="105px" |
|
|
|
label-width="135px" |
|
|
|
> |
|
|
|
<!-- 姓名、性别(单选)、出生日期、年龄、联系方式 --> |
|
|
|
<div class="card"> |
|
|
@ -32,7 +32,7 @@ |
|
|
|
<span>扫描身份证</span> |
|
|
|
</div> |
|
|
|
</el-upload> --> |
|
|
|
<el-form-item label="单位" prop="SCWJ-DW"> |
|
|
|
<el-form-item label="单位(全称/无)" prop="SCWJ-DW"> |
|
|
|
<el-input |
|
|
|
v-model="form['SCWJ-DW']" |
|
|
|
placeholder="请输入单位" |
|
|
@ -276,19 +276,30 @@ |
|
|
|
<div class="hospital1">{{ tenantName || "-" }}</div> |
|
|
|
<el-dialog |
|
|
|
class="popup" |
|
|
|
title="筛查结论" |
|
|
|
title="提示" |
|
|
|
:visible.sync="open" |
|
|
|
width="80%" |
|
|
|
append-to-body |
|
|
|
:show-close="false" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
属于<span :class="`BIMTips${BMIVerdict[form['SCWJ-JL']]}`">{{ |
|
|
|
form["SCWJ-JL"] || "-" |
|
|
|
}}</span |
|
|
|
>型肥胖,建议扫码关注医院公众号,预约体重管理中心医师进一步评估。 |
|
|
|
<div> |
|
|
|
<img src="./gzh.jpg" style="max-width: 100%" /> |
|
|
|
<div class="popup-box"> |
|
|
|
<el-radio v-model="popupRadio" :label="1" class="popup-radio"> |
|
|
|
编辑信息</el-radio |
|
|
|
> |
|
|
|
<el-radio v-model="popupRadio" :label="2" class="popup-radio" |
|
|
|
>查看结论</el-radio |
|
|
|
> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="submit-box submit-box1"> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
class="submit-box-but" |
|
|
|
@click="handlePopupVerify" |
|
|
|
> |
|
|
|
确认 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
@ -307,10 +318,12 @@ export default { |
|
|
|
name: "Notice", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
popupRadio: 1, |
|
|
|
open: false, |
|
|
|
loading: false, |
|
|
|
disabled: true, |
|
|
|
|
|
|
|
detailList: {}, // 筛查患者详情 |
|
|
|
detailId: null, // 筛查患者id |
|
|
|
tenantId: "", |
|
|
|
tenantName: "", |
|
|
|
stepNum: 1, // 步骤数 |
|
|
@ -527,42 +540,42 @@ export default { |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "单位不能为空", |
|
|
|
trigger: "blur", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-NAME": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "姓名不能为空", |
|
|
|
trigger: "blur", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-SEX": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "性别不能为空", |
|
|
|
trigger: "change", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-BIRTH": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "出生日期不能为空", |
|
|
|
trigger: "change", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-AGE": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "年龄不能为空", |
|
|
|
trigger: "change", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-PHONE": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "联系方式不能为空", |
|
|
|
trigger: "blur", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
{ |
|
|
|
pattern: /^1[3456789]\d{9}$/, |
|
|
@ -574,49 +587,49 @@ export default { |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "身高不能为空", |
|
|
|
trigger: "blur", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-WEIGHT": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "体重不能为空", |
|
|
|
trigger: "blur", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-BMI": [ |
|
|
|
{ |
|
|
|
required: false, |
|
|
|
message: "BMI不能为空", |
|
|
|
trigger: "blur", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-SCSJ": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "上床睡觉不能为空", |
|
|
|
trigger: "change", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-RSSJ": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "入睡时间不能为空", |
|
|
|
trigger: "change", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-SXSJ": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "睡醒时间不能为空", |
|
|
|
trigger: "change", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
"SCWJ-QCSJ": [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "起床时间不能为空", |
|
|
|
trigger: "change", |
|
|
|
trigger: ["blur", "change"], |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
@ -640,39 +653,44 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 编辑信息 |
|
|
|
handlePopupVerify() { |
|
|
|
if (this.popupRadio === 1) { |
|
|
|
this.form = { ...this.form, ...this.detailList }; |
|
|
|
setTimeout(() => { |
|
|
|
this.open = false; |
|
|
|
}, 500); |
|
|
|
} else { |
|
|
|
this.$router.replace({ |
|
|
|
path: "/screening/h5Result", |
|
|
|
query: { |
|
|
|
tenantName: this.tenantName, |
|
|
|
data: JSON.stringify(this.detailList), |
|
|
|
}, |
|
|
|
}); |
|
|
|
this.open = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 通过手机号查询 |
|
|
|
getqueryDetailNoToken() { |
|
|
|
let phone = this.form["SCWJ-PHONE"]; |
|
|
|
let name = this.form["SCWJ-NAME"]; |
|
|
|
// // 手机号是否格式正确 |
|
|
|
if (name && phone && /^1[3456789]\d{9}$/.test(phone)) { |
|
|
|
queryDetailNoToken({ param: { keywords: phone } }).then((res) => { |
|
|
|
let flat = false; |
|
|
|
let detailList = null; |
|
|
|
res.data.list.forEach((item) => { |
|
|
|
let data = {}; |
|
|
|
if (item.detailList) { |
|
|
|
item.detailList?.forEach((row) => { |
|
|
|
item[row.questionCode] = row.answer; |
|
|
|
data[row.questionCode] = row.answer; |
|
|
|
queryDetailNoToken({ param: { name: name, phone: phone } }).then( |
|
|
|
(res) => { |
|
|
|
this.detailList = {}; |
|
|
|
if (res.data.list.length) { |
|
|
|
let data = res.data.list[0]; |
|
|
|
this.detailId = data.id; |
|
|
|
console.log("this.detailId", this.detailId); |
|
|
|
data.detailList.forEach((item) => { |
|
|
|
this.detailList[item.questionCode] = item.answer; |
|
|
|
}); |
|
|
|
this.open = true; |
|
|
|
} |
|
|
|
if (item["SCWJ-NAME"] == name && item["SCWJ-PHONE"] == phone) { |
|
|
|
flat = true; |
|
|
|
detailList = data; |
|
|
|
console.log("已经筛查过,直接显示结果"); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (flat) { |
|
|
|
this.$router.replace({ |
|
|
|
path: "/screening/h5Result", |
|
|
|
query: { |
|
|
|
tenantName: this.tenantName, |
|
|
|
data: JSON.stringify(detailList), |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取筛查结论 |
|
|
@ -743,6 +761,7 @@ export default { |
|
|
|
|
|
|
|
// 通过出生日期计算年龄 |
|
|
|
calculateAge() { |
|
|
|
if (!this.form["SCWJ-BIRTH"]) return; |
|
|
|
const birthDate = new Date(this.form["SCWJ-BIRTH"]); |
|
|
|
const today = new Date(); |
|
|
|
let age = today.getFullYear() - birthDate.getFullYear(); |
|
|
@ -894,58 +913,17 @@ export default { |
|
|
|
centerId: this.tenantId, |
|
|
|
}, |
|
|
|
}; |
|
|
|
create(params).then(async (res) => { |
|
|
|
// detailId 存在,说明是编辑 |
|
|
|
if (this.detailId) { |
|
|
|
this.loading = true; |
|
|
|
this.detailId = res.data.detailId; |
|
|
|
this.id = res.data.id; |
|
|
|
// ------ 保存答案 ------ |
|
|
|
// 基本信息 |
|
|
|
await this.saveAnswer(this.form["SCWJ-DW"], "SCWJ-DW"); |
|
|
|
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(this.form["SCWJ-SCSJ"], "SCWJ-SCSJ"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-RSSJ"], "SCWJ-RSSJ"); |
|
|
|
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) => { |
|
|
|
this.loading = false; |
|
|
|
this.disabled = false; |
|
|
|
this.$modal.msgSuccess("提交成功"); |
|
|
|
this.handlesaveCommit(); |
|
|
|
} else { |
|
|
|
create(params).then(async (res) => { |
|
|
|
this.loading = true; |
|
|
|
this.detailId = res.data.detailId; |
|
|
|
this.handlesaveCommit(); |
|
|
|
}); |
|
|
|
// 根据筛查结果,判断是否需要显示二维码 |
|
|
|
this.$router.replace({ |
|
|
|
path: "/screening/h5Result", |
|
|
|
query: { |
|
|
|
tenantName: this.tenantName, |
|
|
|
data: JSON.stringify(this.form), |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} catch (error) { |
|
|
@ -955,6 +933,42 @@ export default { |
|
|
|
this.$message.error("提交失败,请稍后重试!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 保存答案、提交 |
|
|
|
async handlesaveCommit() { |
|
|
|
// ------ 保存答案 ------ |
|
|
|
// 基本信息 |
|
|
|
await this.saveAnswer(this.form["SCWJ-DW"], "SCWJ-DW"); |
|
|
|
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(this.form["SCWJ-SCSJ"], "SCWJ-SCSJ"); |
|
|
|
await this.saveAnswer(this.form["SCWJ-RSSJ"], "SCWJ-RSSJ"); |
|
|
|
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.tips, "SCREEN-JL"); |
|
|
|
// ------ 提交筛查 ------ |
|
|
|
const submitParams = { param: { detailId: this.detailId } }; |
|
|
|
await screenSubmit(submitParams).then((response) => { |
|
|
|
this.loading = false; |
|
|
|
this.disabled = false; |
|
|
|
this.$modal.msgSuccess("提交成功"); |
|
|
|
}); |
|
|
|
// 根据筛查结果,判断是否需要显示二维码 |
|
|
|
this.$router.replace({ |
|
|
|
path: "/screening/h5Result", |
|
|
|
query: { |
|
|
|
tenantName: this.tenantName, |
|
|
|
data: JSON.stringify(this.form), |
|
|
|
}, |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 保存答案 |
|
|
|
async saveAnswer(value, str) { |
|
|
|
try { |
|
|
@ -978,6 +992,19 @@ export default { |
|
|
|
</script> |
|
|
|
<style scoped src="@/assets/styles/common.css"></style> |
|
|
|
<style scoped> |
|
|
|
.popup-item { |
|
|
|
font-size: 16px; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: space-between; |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
.popup-title { |
|
|
|
font-size: 20px; |
|
|
|
color: #333333; |
|
|
|
margin-bottom: 20px; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
>>> .el-dialog__header { |
|
|
|
padding-bottom: 0; |
|
|
|
} |
|
|
@ -1061,17 +1088,27 @@ export default { |
|
|
|
color: #555555; |
|
|
|
line-height: 20px; |
|
|
|
} |
|
|
|
.popup-box { |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
.submit-box { |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
.submit-box .submit-box-but { |
|
|
|
background: #c6a268; |
|
|
|
width: 100%; |
|
|
|
font-size: 16px; |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
.submit-box1 .submit-box-but { |
|
|
|
width: 65% !important; |
|
|
|
border: none; |
|
|
|
margin-top: 30px; |
|
|
|
margin-bottom: 0; |
|
|
|
} |
|
|
|
.card { |
|
|
|
padding: 16px; |
|
|
|
background: #fff; |
|
|
|