Browse Source

扫码筛查分两步

newMaster
liuzhipeng 3 months ago
parent
commit
b5093db17a
  1. 67
      acupuncture-前台/src/views/screening/index.vue

67
acupuncture-前台/src/views/screening/index.vue

@ -1,7 +1,13 @@
<template>
<div class="app-container">
<div class="hospital">山西因孚社区</div>
<el-form :rules="rules" ref="form" :model="form" label-width="110px">
<el-form
v-if="stepNum == 1"
:rules="rules"
ref="form"
:model="form"
label-width="110px"
>
<!-- 姓名性别单选出生日期年龄联系方式 -->
<div class="card">
<div class="card-title">基本信息</div>
@ -58,9 +64,10 @@
</el-form-item>
<el-form-item label="BMI" prop="BMI">
<el-input
:disabled="true"
v-model="form.BMI"
type="number"
placeholder="请输入BMI"
placeholder="BMI"
></el-input>
</el-form-item>
<el-form-item label="结论" prop="verdict">
@ -70,7 +77,7 @@
</el-form-item>
</div>
</el-form>
<div class="card">
<div class="card" v-if="stepNum == 2">
<div class="card-title">失眠自评SRSS</div>
<div
class="item-container"
@ -91,7 +98,12 @@
</div>
</div>
</div>
<div class="submit-box">
<div class="submit-box" v-if="stepNum == 1">
<el-button type="primary" class="submit-box-but" @click="submitForm">
下一步
</el-button>
</div>
<div class="submit-box" v-if="stepNum == 2">
<el-button type="primary" class="submit-box-but" @click="submitForm">
提交
</el-button>
@ -112,6 +124,8 @@ export default {
dicts: ["sys_notice_status", "sys_notice_type"],
data() {
return {
stepNum: 1,
headers: {
Authorization: "Bearer " + getToken(),
deptId: localStorage.getItem("hospitalId"),
@ -122,7 +136,7 @@ export default {
//
form: {
name: "",
sex: "",
sex: "0",
dateOfBirth: "",
age: "",
phone: "",
@ -354,7 +368,6 @@ export default {
methods: {
// BIM
calculateBMI() {
console.log(this.form.weight, this.form.height);
if (this.form.weight && this.form.height) {
const weight = parseFloat(this.form.weight);
const height = parseFloat(this.form.height);
@ -364,20 +377,20 @@ export default {
}
},
// BIM
// <18.5 35
// 18.5~23.9 45
// 24~27.9 46
// <18.5
// 18.5~23.9
// 24~27.9
// 28
getBMITips(bmi) {
let tips = "";
if (bmi < 18.5) {
tips = "体重过轻";
tips = "偏瘦";
}
if (bmi >= 18.5 && bmi < 23.9) {
tips = "正常";
}
if (bmi >= 24 && bmi < 27.9) {
tips = "超重";
tips = "偏胖";
}
if (bmi >= 28) {
tips = "肥胖";
@ -432,26 +445,30 @@ export default {
this.form = {};
this.resetForm("form");
},
/** 提交按钮 */
/** 基本信息 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
patientUpd(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
patientAdd(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
// patientAdd(this.form).then((response) => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
this.stepNum++;
}
});
},
//
scaleSubmitForm() {
let score = 0;
// , topic${i}
for (let i = 1; i <= 24; i++) {
if (this.form[`topic${i}`] !== undefined) {
score += this.form[`topic${i}`];
}
}
console.log("score", score);
},
},
};
</script>

Loading…
Cancel
Save