Browse Source

筛查结论

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

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

@ -153,7 +153,7 @@
</el-form-item> </el-form-item>
<el-form-item label="睡眠效率" prop="SCWJ-SMXL"> <el-form-item label="睡眠效率" prop="SCWJ-SMXL">
<span :class="`BIMTips${BMIVerdict[form['SCWJ-SMXL']]}`"> <span :class="`BIMTips${BMIVerdict[form['SCWJ-SMXL']]}`">
{{ form["SCWJ-SMXL"] || "- - -" }} {{ form["SCWJ-SMXL"] || "- - -" }}%
</span> </span>
</el-form-item> </el-form-item>
</div> </div>
@ -173,7 +173,7 @@
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div v-if="stepNum == 2"> <!-- <div v-if="stepNum == 2">
<div class="card"> <div class="card">
<div class="card-title">失眠自评SRSS</div> <div class="card-title">失眠自评SRSS</div>
<div <div
@ -220,9 +220,37 @@
<el-radio class="item-radio" :label="3">3个月</el-radio> <el-radio class="item-radio" :label="3">3个月</el-radio>
</el-radio-group> </el-radio-group>
</div> </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
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>
<!-- <div class="submit-box" v-if="stepNum == 1">
<div class="submit-box" v-if="stepNum == 1">
<el-button type="primary" class="submit-box-but" @click="submitForm"> <el-button type="primary" class="submit-box-but" @click="submitForm">
下一步 下一步
</el-button> </el-button>
@ -231,6 +259,11 @@
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm"> <el-button type="primary" class="submit-box-but" @click="scaleSubmitForm">
提交 提交
</el-button> </el-button>
</div> -->
<div class="submit-box" v-if="disabled">
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm">
提交
</el-button>
</div> </div>
<div class="hospital1">{{ tenantName || "- - - -" }}</div> <div class="hospital1">{{ tenantName || "- - - -" }}</div>
</div> </div>
@ -243,6 +276,7 @@ import {
screenSubmit, screenSubmit,
queryHospitalNoToken, queryHospitalNoToken,
} from "@/api/screening.js"; } from "@/api/screening.js";
export default { export default {
name: "Notice", name: "Notice",
data() { data() {
@ -303,6 +337,8 @@ export default {
超重: "3", 超重: "3",
肥胖: "4", 肥胖: "4",
}, },
tips: "", //
tipsError: false, //
// 1. ? // 1. ?
// //
// 2. ? // 2. ?
@ -436,13 +472,13 @@ export default {
"SCWJ-BMI": "", "SCWJ-BMI": "",
"SCWJ-JL": "", "SCWJ-JL": "",
"SCWJ-ZLFS": [], "SCWJ-ZLFS": [],
"SCWJ-SCSJ": "22:00", "SCWJ-SCSJ": "22:00", //
"SCWJ-RSSJ": "22:30", "SCWJ-RSSJ": "22:30", //
"SCWJ-SXSJ": "06:30", "SCWJ-SXSJ": "06:30", //
"SCWJ-QCSJ": "07:00", "SCWJ-QCSJ": "07:00", //
"SCWJ-SMXL": "", // "SCWJ-SMXL": "", //
"SCWJ-XBS": [], "SCWJ-XBS": [], //
"SCWJ-XBS-QT": "", "SCWJ-XBS-QT": "", // -
// "SCWJ-NAME": "2", // "SCWJ-NAME": "2",
// "SCWJ-SEX": "", // "SCWJ-SEX": "",
// "SCWJ-BIRTH": "1945-01-01", // "SCWJ-BIRTH": "1945-01-01",
@ -538,6 +574,13 @@ export default {
trigger: "change", trigger: "change",
}, },
], ],
"SCWJ-QCSJ": [
{
required: true,
message: "起床时间不能为空",
trigger: "change",
},
],
}, },
loading: false, loading: false,
}; };
@ -549,7 +592,33 @@ export default {
this.getQueryHospitalNoToken(); // id this.getQueryHospitalNoToken(); // id
this.calculateSleepTime(); // this.calculateSleepTime(); //
}, },
//
watch: {
form: {
handler(newVal, oldVal) {
this.getTips();
},
deep: true,
},
},
methods: { 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; const sleepEfficiency = (sleepMinutes / inBedMinutes) * 100;
// //
this.form["SCWJ-SMXL"] = sleepEfficiency.toFixed(2) + "%"; this.form["SCWJ-SMXL"] = sleepEfficiency.toFixed(0);
}, },
// //
@ -728,48 +797,55 @@ export default {
// //
async scaleSubmitForm() { async scaleSubmitForm() {
try { try {
// ------ ------ this.$refs["form"].validate(async (valid) => {
let score = 0; if (valid) {
// , topic${i} // ------ ------
for (let i = 1; i <= 24; i++) { let score = 0;
if (this.form[`topic${i}`] !== undefined) { // , topic${i}
score += this.form[`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,
tenantId: this.tenantId,
centerId: this.tenantId,
},
};
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("提交成功");
});
});
} }
}
// ------ ------
const params = {
param: {
type: 33,
tenantId: this.tenantId,
centerId: this.tenantId,
},
};
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) { } catch (error) {
this.loading = false; this.loading = false;
@ -804,7 +880,9 @@ export default {
.form-item-xbs >>> .el-form-item__content { .form-item-xbs >>> .el-form-item__content {
margin-left: 0 !important; margin-left: 0 !important;
} }
.qq {
color: green;
}
.idcardupd { .idcardupd {
height: 44px; height: 44px;
margin-bottom: 14px; margin-bottom: 14px;
@ -896,6 +974,7 @@ export default {
font-size: 20px; font-size: 20px;
margin-bottom: 16px; margin-bottom: 16px;
} }
.card-tips { .card-tips {
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;

Loading…
Cancel
Save