Browse Source

筛查结论

newMaster
1747191978@qq.com 3 months ago
parent
commit
c8ce65d4cd
  1. 105
      acupuncture-前台/src/views/screening/h5.vue

105
acupuncture-前台/src/views/screening/h5.vue

@ -153,7 +153,7 @@
</el-form-item>
<el-form-item label="睡眠效率" prop="SCWJ-SMXL">
<span :class="`BIMTips${BMIVerdict[form['SCWJ-SMXL']]}`">
{{ form["SCWJ-SMXL"] || "- - -" }}
{{ form["SCWJ-SMXL"] || "- - -" }}%
</span>
</el-form-item>
</div>
@ -173,7 +173,7 @@
</el-form-item>
</div>
</el-form>
<div v-if="stepNum == 2">
<!-- <div v-if="stepNum == 2">
<div class="card">
<div class="card-title">失眠自评SRSS</div>
<div
@ -220,9 +220,37 @@
<el-radio class="item-radio" :label="3">3个月</el-radio>
</el-radio-group>
</div>
</div> -->
<div class="card">
<div class="card-title">筛查结论</div>
<div
style="
display: flex;
justify-content: space-between;
margin-bottom: 6px;
"
>
<span>您的体重指数BMI</span>
<span>{{ form["SCWJ-BMI"] || "- - -" }}</span>
</div>
<div class="submit-box" v-if="stepNum == 1">
<div
style="
display: flex;
justify-content: space-between;
margin-bottom: 6px;
"
>
<span>您的睡眠效率为</span>
<span>{{ form["SCWJ-SMXL"] || "- - -" }}%</span>
</div>
<div>
<span v-if="tips" :style="{ color: tipsError ? 'red' : 'green' }">
{{ tips }}
</span>
<span v-if="!tips">- - -</span>
</div>
</div>
<!-- <div class="submit-box" v-if="stepNum == 1">
<el-button type="primary" class="submit-box-but" @click="submitForm">
下一步
</el-button>
@ -231,6 +259,11 @@
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm">
提交
</el-button>
</div> -->
<div class="submit-box" v-if="disabled">
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm">
提交
</el-button>
</div>
<div class="hospital1">{{ tenantName || "- - - -" }}</div>
</div>
@ -243,6 +276,7 @@ import {
screenSubmit,
queryHospitalNoToken,
} from "@/api/screening.js";
export default {
name: "Notice",
data() {
@ -303,6 +337,8 @@ export default {
超重: "3",
肥胖: "4",
},
tips: "", //
tipsError: false, //
// 1. ?
//
// 2. ?
@ -436,13 +472,13 @@ export default {
"SCWJ-BMI": "",
"SCWJ-JL": "",
"SCWJ-ZLFS": [],
"SCWJ-SCSJ": "22:00",
"SCWJ-RSSJ": "22:30",
"SCWJ-SXSJ": "06:30",
"SCWJ-QCSJ": "07:00",
"SCWJ-SCSJ": "22:00", //
"SCWJ-RSSJ": "22:30", //
"SCWJ-SXSJ": "06:30", //
"SCWJ-QCSJ": "07:00", //
"SCWJ-SMXL": "", //
"SCWJ-XBS": [],
"SCWJ-XBS-QT": "",
"SCWJ-XBS": [], //
"SCWJ-XBS-QT": "", // -
// "SCWJ-NAME": "2",
// "SCWJ-SEX": "",
// "SCWJ-BIRTH": "1945-01-01",
@ -538,6 +574,13 @@ export default {
trigger: "change",
},
],
"SCWJ-QCSJ": [
{
required: true,
message: "起床时间不能为空",
trigger: "change",
},
],
},
loading: false,
};
@ -549,7 +592,33 @@ export default {
this.getQueryHospitalNoToken(); // id
this.calculateSleepTime(); //
},
//
watch: {
form: {
handler(newVal, oldVal) {
this.getTips();
},
deep: true,
},
},
methods: {
//
getTips() {
console.log("获取筛查结论");
const BMI = this.form["SCWJ-BMI"]; // BMI
const sleepEfficiency = this.form["SCWJ-SMXL"]; //
if (BMI && sleepEfficiency) {
// BMI2585%{{ "" }}
if (BMI > 25 || sleepEfficiency < 85) {
this.tips = "建议找专业医师进一步评估";
this.tipsError = true;
} else {
this.tips = "均属于正常范围,请继续保持";
this.tipsError = false;
}
}
},
//
// /
// = -
@ -596,7 +665,7 @@ export default {
const sleepEfficiency = (sleepMinutes / inBedMinutes) * 100;
//
this.form["SCWJ-SMXL"] = sleepEfficiency.toFixed(2) + "%";
this.form["SCWJ-SMXL"] = sleepEfficiency.toFixed(0);
},
//
@ -728,6 +797,8 @@ export default {
//
async scaleSubmitForm() {
try {
this.$refs["form"].validate(async (valid) => {
if (valid) {
// ------ ------
let score = 0;
// , topic${i}
@ -761,7 +832,10 @@ export default {
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-ZLFS"].toString(),
"SCWJ-ZLFS"
); //
await this.saveAnswer(this.form["SCWJ-ZLZQ"], "SCWJ-ZLZQ"); //
// ------ ------
const submitParams = { param: { detailId: this.detailId } };
@ -771,6 +845,8 @@ export default {
this.$modal.msgSuccess("提交成功");
});
});
}
});
} catch (error) {
this.loading = false;
this.disabled = false;
@ -804,7 +880,9 @@ export default {
.form-item-xbs >>> .el-form-item__content {
margin-left: 0 !important;
}
.qq {
color: green;
}
.idcardupd {
height: 44px;
margin-bottom: 14px;
@ -896,6 +974,7 @@ export default {
font-size: 20px;
margin-bottom: 16px;
}
.card-tips {
font-size: 14px;
color: #999999;

Loading…
Cancel
Save