Browse Source

添加筛查知情同意,筛查信息去掉现病史

newMaster
1747191978@qq.com 3 months ago
parent
commit
d6f2ee0adf
  1. 8
      acupuncture-前台/src/router/index.js
  2. 939
      acupuncture-前台/src/views/screening/h5.vue
  3. 1043
      acupuncture-前台/src/views/screening/h5eva.vue

8
acupuncture-前台/src/router/index.js

@ -166,13 +166,17 @@ export const constantRoutes = [
},
],
},
// 筛查基本信息
// 知情同意
{
path: "/screening/h5",
component: () => import("@/views/screening/h5.vue"),
hidden: true,
},
{
path: "/screening/h5eva",
component: () => import("@/views/screening/h5eva.vue"),
hidden: true,
},
];
// 动态路由,基于用户权限动态去加载

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

@ -1,910 +1,113 @@
<template>
<div class="app-container" v-loading="loading">
<div class="hospital">{{ tenantName || "- - - -" }}</div>
<el-form
v-if="stepNum == 1"
:rules="rules"
ref="form"
:model="form"
label-width="100px"
>
<!-- 姓名性别单选出生日期年龄联系方式 -->
<div class="card">
<div class="card-title">基本信息</div>
<div>
<!-- <el-upload
name="file"
accept=".img,.png,.jpg"
:action="uploadFileUrl"
list-type="picture-card"
class="idcardupd"
:show-file-list="false"
:on-success="changeFile"
:on-change="uploader"
:on-progress="handleProgress"
>
<div slot="trigger" class="idcardupd-but">
<img
src="@/assets/images/idcard.png"
class="img-icon"
style="margin-right: 5px"
/>
<span>扫描身份证</span>
<div class="app-container">
<div class="hospital">南宁市健康体重管理活动知情同意书</div>
<div class="zqty">
<div class="text-bt">尊敬的先生/女士</div>
<div class="text-dl">
您好非常感谢您参与南宁市享瘦美好邕抱健康健康体重管理活动本次活动是由南宁市卫生健康委组织的南宁市体重管理年系列活动之一旨在通过建立筛查-干预-追踪全流程的体重管理服务体系全面提升南宁市民的健康水平
</div>
</el-upload> -->
<el-form-item label="单位" prop="SCWJ-DW">
<el-input
v-model="form['SCWJ-DW']"
placeholder="请输入单位"
></el-input>
</el-form-item>
<el-form-item label="姓名" prop="SCWJ-NAME">
<el-input
v-model="form['SCWJ-NAME']"
placeholder="请输入姓名"
></el-input>
</el-form-item>
<el-form-item label="性别" prop="SCWJ-SEX">
<el-radio-group v-model="form['SCWJ-SEX']">
<el-radio label="男"></el-radio>
<el-radio label="女"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="出生日期" prop="SCWJ-BIRTH">
<el-date-picker
v-model="form['SCWJ-BIRTH']"
value-format=" yyyy-MM-dd"
format="yyyy-MM-dd"
type="date"
placeholder="选择日期"
@change="calculateAge"
>
</el-date-picker>
</el-form-item>
<el-form-item label="年龄" prop="SCWJ-AGE">
<el-input
v-model="form['SCWJ-AGE']"
type="number"
placeholder="请输入年龄"
></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="SCWJ-PHONE">
<el-input
v-model="form['SCWJ-PHONE']"
type="number"
placeholder="请输入联系方式"
></el-input>
</el-form-item>
<el-form-item label="身高cm" prop="SCWJ-HEIGHT">
<el-input
@blur="calculateBMI"
v-model="form['SCWJ-HEIGHT']"
type="number"
placeholder="请输入身高"
></el-input>
</el-form-item>
<el-form-item label="体重kg" prop="SCWJ-WEIGHT">
<el-input
@blur="calculateBMI"
v-model="form['SCWJ-WEIGHT']"
type="number"
placeholder="请输入体重"
></el-input>
</el-form-item>
<el-form-item label="BMI" prop="SCWJ-BMI">
<el-input
:disabled="true"
v-model="form['SCWJ-BMI']"
type="number"
placeholder="BMI"
></el-input>
</el-form-item>
<el-form-item label="结论" prop="SCWJ-JL">
<span :class="`BIMTips${BMIVerdict[form['SCWJ-JL']]}`">
{{ form["SCWJ-JL"] || "- - -" }}
</span>
</el-form-item>
<div class="text-dl">
在您参与此次意义非凡的活动前请您仔细阅读以下内容这将帮助您充分了解本次活动并保障您的权益
</div>
<div class="text-dl">
1.减重方法安全性本次采用的减重方法已通过严格的医学验证与实践检验安全可靠不会对您的身体造成任何伤害
</div>
<!-- 睡眠质量评估 -->
<div class="card">
<div class="card-title">睡眠质量评估</div>
<el-form-item label="上床睡觉" prop="SCWJ-SCSJ">
<el-time-select
@change="calculateSleepTime"
placeholder="请选择时间"
v-model="form['SCWJ-SCSJ']"
:picker-options="{
start: '00:30',
step: '00:15',
end: '23:59',
}"
></el-time-select>
</el-form-item>
<el-form-item label="入睡时间" prop="SCWJ-RSSJ">
<el-time-select
@change="calculateSleepTime"
placeholder="请选择时间"
v-model="form['SCWJ-RSSJ']"
:picker-options="{
start: '00:30',
step: '00:15',
end: '23:59',
}"
></el-time-select>
</el-form-item>
<el-form-item label="睡醒时间" prop="SCWJ-SXSJ">
<el-time-select
@change="calculateSleepTime"
placeholder="请选择时间"
v-model="form['SCWJ-SXSJ']"
:picker-options="{
start: '00:30',
step: '00:15',
end: '23:59',
}"
></el-time-select>
</el-form-item>
<el-form-item label="起床时间" prop="SCWJ-QCSJ">
<el-time-select
@change="calculateSleepTime"
placeholder="请选择时间"
v-model="form['SCWJ-QCSJ']"
:picker-options="{
start: '00:30',
step: '00:15',
end: '23:59',
}"
></el-time-select>
</el-form-item>
<el-form-item label="睡眠效率" prop="SCWJ-SMXL">
<span :class="`BIMTips${BMIVerdict[form['SCWJ-SMXL']]}`">
{{ form["SCWJ-SMXL"] || "- - -" }}%
</span>
</el-form-item>
<div class="text-dl">
2.生活影响说明参与本次活动仅需您投入少量时间整个过程不会干扰您的日常生活节奏不会给您带来任何不利影响
</div>
<!-- 疾病风险选择(现病史) -->
<div class="card">
<div class="card-title">疾病风险选择</div>
<el-form-item prop="SCWJ-XBS" class="form-item-xbs">
<el-checkbox-group v-model="form['SCWJ-XBS']">
<el-checkbox
v-for="(item, index) in medicalHistory"
:label="item"
:key="index"
>
</el-checkbox>
</el-checkbox-group>
<el-input v-model="form['SCWJ-XBS-QT']" placeholder="其他" />
</el-form-item>
</div>
</el-form>
<!-- <div v-if="stepNum == 2">
<div class="card">
<div class="card-title">失眠自评SRSS</div>
<div
class="item-container"
v-for="(item, index) in scaleList"
:key="index"
>
<div class="item-title">{{ index + 1 }}. {{ item.question }}</div>
<div class="item-radio-box">
<el-radio-group v-model="form[`topic${index + 1}`]">
<el-radio
class="item-radio"
v-for="(criteria, index) in item.options"
:key="index"
:label="criteria.score"
>{{ criteria.label }}
</el-radio>
</el-radio-group>
<div class="text-dl">
3.个人信息保护我们高度重视您的隐私将严格遵循相关法律法规采用严密的信息安全防护措施对您提供的所有个人信息和数据进行严格保密绝不会泄露给未经授权的第三方
</div>
<div class="text-dl">
4.信息填报与回访要求您所提供的信息是南宁市民健康体重管理数据的重要组成部分关乎整体数据的准确性与有效性请您务必如实填写各项信息并按照活动组织者的要求按时参与后续的数据填报及回访工作这对确保活动的完整性至关重要
</div>
<div class="card-tips">
SRSS共有10个项目每个项目分5级评分1~5总分为每个项目得分之和评分愈高说明睡眠问题愈严重此量表最低分为10分基本无睡眠问题最高分为50分最严重
<div class="text-dl">
5.退出机制若在活动过程中您因身体突发状况或其他不可抗力因素需要退出请及时告知活动组织者我们将尊重您的决定并妥善处理后续事宜
</div>
<div class="text-dl">
本人已仔细阅读并充分理解上述内容同意自愿参与本次活动愿意积极配合组织者完成后续各项任务
</div>
<div class="card">
<div class="card-title">可接受的治疗方式</div>
<el-checkbox-group v-model="form['SCWJ-ZLFS']">
<el-checkbox label="饮食治疗" class="item-radio">
饮食治疗中药代饮减脂餐营养制剂
</el-checkbox>
<el-checkbox label="运动治疗" class="item-radio">
运动治疗功率踏车有氧运动跑步
</el-checkbox>
<el-checkbox label="中医治疗" class="item-radio">
中医治疗针灸拔罐埋线
</el-checkbox>
</el-checkbox-group>
</div>
<div class="card">
<div class="card-title">可接受的治疗周期</div>
<el-radio-group v-model="form['SCWJ-ZLZQ']">
<el-radio class="item-radio" :label="1">1个月</el-radio>
<el-radio class="item-radio" :label="2">2个月</el-radio>
<el-radio class="item-radio" :label="3">3个月</el-radio>
</el-radio-group>
</div>
</div> -->
<div class="card">
<div class="card-title">筛查结论</div>
<div class="btn-dl">
<div
style="
display: flex;
justify-content: space-between;
margin-bottom: 6px;
"
class="btn-dl-ty"
:class="{ 'btn-dl-gl': flag === 1 }"
@click="handleFlag(1)"
>
<span>您的体重指数BMI</span>
<span>{{ form["SCWJ-BMI"] || "- - -" }}</span>
同意
</div>
<div
style="
display: flex;
justify-content: space-between;
margin-bottom: 6px;
"
class="btn-dl-bty"
:class="{ 'btn-dl-gl': flag === 0 }"
@click="flag = 0"
>
<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>
不同意
</div>
<div class="submit-box" v-if="stepNum == 2 && disabled">
<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>
</template>
<script>
import {
create,
screenSave,
screenSubmit,
queryHospitalNoToken,
} from "@/api/screening.js";
export default {
name: "Notice",
data() {
return {
loading: false,
disabled: true,
tenantId: "",
tenantName: "",
stepNum: 1, //
uploadFileUrl: process.env.VUE_APP_BASE_URL + "/baidu/ocr/idcardInfo", //
fileList: [],
//
medicalHistory: [
"无",
"高脂血症",
"肝脏疾病(脂肪肝、乙型肝炎、肝硬化等)",
"胰岛素抵抗",
"高尿酸",
"多囊卵巢综合症",
"高血压",
"脑血管病",
"恶性肿瘤",
"冠心病",
"精神疾病",
"胃和十二指肠溃疡",
"肥胖症",
"骨质疏松症",
"遗传性、先天性疾病",
"糖尿病",
"慢性肺系疾病",
"过敏性疾病",
"关节炎",
"痛风",
"肾炎、肾病",
],
BMITips: [
{
label: "体重过轻",
score: 18.5,
},
{
label: "正常",
score: 23.9,
},
{
label: "超重",
score: 27.9,
},
{
label: "肥胖",
score: 28,
},
],
BMIVerdict: {
体重过轻: "1",
正常: "2",
超重: "3",
肥胖: "4",
},
tips: "", //
tipsError: false, //
// 1. ?
//
// 2. ?
//
// 3., ?
// 0~5 6~12 13~18 ) 19~24 25~31
// 4. ?
// 9 7~8 5~6 3~4 1~2
// 5. ?
// 0~5 6~12 13~18 19~24 25~31
// 6. ?
// 0~5 6~12 13~18 19~24 25~31
// 7. ?
// 0~5 61~2 13~18 19~24 25~31
// 8. ?
// 0~5 61~2 13~18 19~24 25~31
// 9. , ?
// 0~5 61~2 13~18 19~24 25~31
// 10. ?
//
scaleList: [
{
question: "您觉得平时睡眠足够吗 ?",
options: [
{ label: "睡眠过多了", score: 1 },
{ label: "睡眠正好", score: 2 },
{ label: "睡眠欠一些", score: 3 },
{ label: "睡眠不够", score: 4 },
{ label: "睡眠时间远远不够", score: 5 },
],
},
{
question: "您在睡眠后是否已觉得充分休息过了 ?",
options: [
{ label: "觉得充分休息过了", score: 1 },
{ label: "觉得休息过了", score: 2 },
{ label: "觉得休息了一点", score: 3 },
{ label: "不觉得休息过了", score: 4 },
{ label: "觉得一点儿也没休息", score: 5 },
],
},
{
question: "您晚上已睡过觉,白天是否打瞌睡 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少 (6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常(19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您平均每个晚上大约能睡几小时 ?",
options: [
{ label: "≥9小时", score: 1 },
{ label: "7~8 小时", score: 2 },
{ label: "5~6 小时", score: 3 },
{ label: "3~4 小时", score: 4 },
{ label: "1~2 小时", score: 5 },
],
},
{
question: "您是否有入睡困难 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少 (6~12 天)", score: 2 },
{ label: "有时(13~18 天 )", score: 3 },
{ label: "经常(19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您入睡后中间是否易醒 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时(13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您在醒后是否难于再入睡 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "您是否多梦或常被恶梦惊醒 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "为了睡眠 , 您是否吃安眠药 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "您失眠后心情(心境)如何 ?",
options: [
{ label: "无不适", score: 1 },
{ label: "无所谓", score: 2 },
{ label: "有时心烦、急躁", score: 3 },
{ label: "心慌、气短", score: 4 },
{ label: "乏力、没精神、做事效率低", score: 5 },
],
},
], //
form: {
"SCWJ-DW": "",
"SCWJ-NAME": "",
"SCWJ-SEX": "男",
"SCWJ-BIRTH": "",
"SCWJ-AGE": "",
"SCWJ-PHONE": "",
"SCWJ-HEIGHT": "",
"SCWJ-WEIGHT": "",
"SCWJ-BMI": "",
"SCWJ-JL": "",
"SCWJ-ZLFS": [],
"SCWJ-SCSJ": "22:00", //
"SCWJ-RSSJ": "22:30", //
"SCWJ-SXSJ": "06:30", //
"SCWJ-QCSJ": "07:00", //
"SCWJ-SMXL": "", //
"SCWJ-XBS": [], //
"SCWJ-XBS-QT": "", // -
// "SCWJ-NAME": "2",
// "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": [],
},
//
rules: {
"SCWJ-DW": [
{
required: true,
message: "单位不能为空",
trigger: "blur",
},
],
"SCWJ-NAME": [
{
required: true,
message: "姓名不能为空",
trigger: "blur",
},
],
"SCWJ-SEX": [
{
required: true,
message: "性别不能为空",
trigger: "change",
},
],
"SCWJ-BIRTH": [
{
required: true,
message: "出生日期不能为空",
trigger: "change",
},
],
"SCWJ-AGE": [
{
required: true,
message: "年龄不能为空",
trigger: "change",
},
],
"SCWJ-PHONE": [
{
required: true,
message: "联系方式不能为空",
trigger: "blur",
},
{
pattern: /^1[3456789]\d{9}$/,
message: "格式不正确",
trigger: ["blur", "change"],
},
],
"SCWJ-HEIGHT": [
{
required: true,
message: "身高不能为空",
trigger: "blur",
},
],
"SCWJ-WEIGHT": [
{
required: true,
message: "体重不能为空",
trigger: "blur",
},
],
"SCWJ-BMI": [
{
required: false,
message: "BMI不能为空",
trigger: "blur",
},
],
"SCWJ-SCSJ": [
{
required: true,
message: "上床睡觉不能为空",
trigger: "change",
},
],
"SCWJ-RSSJ": [
{
required: true,
message: "入睡时间不能为空",
trigger: "change",
},
],
"SCWJ-SXSJ": [
{
required: true,
message: "睡醒时间不能为空",
trigger: "change",
},
],
"SCWJ-QCSJ": [
{
required: true,
message: "起床时间不能为空",
trigger: "change",
},
],
},
loading: false,
flag: null,
};
},
created() {
this.tenantId = this.$route.query.tenantId;
console.log("this.tenantId", this.tenantId);
localStorage.setItem("tenantId", this.tenantId);
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;
}
}
},
//
// /
// = -
// = -
// = /
//
//
//
calculateSleepTime() {
//
const bedTime = this.form["SCWJ-SCSJ"]; //
const sleepTime = this.form["SCWJ-RSSJ"]; //
const wakeTime = this.form["SCWJ-SXSJ"]; //
const wakeBedTime = this.form["SCWJ-QCSJ"]; //
//
if (!bedTime || !sleepTime || !wakeTime || !wakeBedTime) return;
//
const toMinutes = (timeStr) => {
const [hour, minute] = timeStr.split(":");
return parseInt(hour) * 60 + parseInt(minute);
};
//
// = -
// = -
let inBedMinutes = toMinutes(wakeBedTime) - toMinutes(bedTime); //
let sleepMinutes = toMinutes(wakeTime) - toMinutes(sleepTime); //
//
// 24
if (inBedMinutes < 0) {
inBedMinutes += 24 * 60;
}
// 24
if (sleepMinutes < 0) {
sleepMinutes += 24 * 60;
}
console.log("inBedMinutes", inBedMinutes);
console.log("sleepMinutes", sleepMinutes);
// /
const sleepEfficiency = (sleepMinutes / inBedMinutes) * 100;
//
this.form["SCWJ-SMXL"] = sleepEfficiency.toFixed(0);
},
//
calculateAge() {
const birthDate = new Date(this.form["SCWJ-BIRTH"]);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
if (
monthDiff < 0 ||
(monthDiff === 0 && today.getDate() < birthDate.getDate())
) {
age--;
}
this.form["SCWJ-AGE"] = age;
},
// ,
async changeFile(e) {
this.loading = false;
console.log("上传身份信息: ", e);
const { code, data } = e;
console.log("data: ", data);
if (code === 200) {
this.spinning = false;
this.codeValue["SCWJ-NAME"] = data.name;
this.codeValue["SCWJ-SEX"] = data.sex;
this.codeValue["SCWJ-idCard"] = data.idcard;
this.codeValue["SCWJ-AGE"] = data.age;
await this.setValueByIdCard(data.idcard);
// await this.saveAnswer(data.name, "SCWJ-NAME");
// await this.saveAnswer(data.idcard, "SCWJ-idCard");
}
},
handleProgress() {
this.loading = true;
},
uploader(res) {
this.loading = false;
},
// id
getQueryHospitalNoToken() {
let params = {
id: this.$route.query.tenantId,
};
queryHospitalNoToken(params).then((response) => {
this.tenantName = response.data.name || "";
});
},
// BIM
calculateBMI() {
if (this.form["SCWJ-WEIGHT"] && this.form["SCWJ-HEIGHT"]) {
const weight = parseFloat(this.form["SCWJ-WEIGHT"]);
const height = parseFloat(this.form["SCWJ-HEIGHT"]);
const bmi = weight / (height / 100) ** 2;
this.form["SCWJ-BMI"] = bmi.toFixed(2);
this.getBMITips(bmi);
}
},
// BIM
// <18.5
// 18.5~23.9
// 24~27.9
// 28
getBMITips(bmi) {
let tips = "";
if (bmi < 18.5) {
tips = "体重过轻";
}
if (bmi >= 18.5 && bmi < 23.9) {
tips = "正常";
}
if (bmi >= 24 && bmi < 27.9) {
tips = "超重";
}
if (bmi >= 28) {
tips = "肥胖";
}
this.form["SCWJ-JL"] = tips;
},
// - pdg
handleUploadPdfAdd1(res) {
if (res.code == 200) {
this.importOpen = false;
this.getList();
this.$modal.msgSuccess("导入成功");
} else {
this.$message.error(res.msg || "导入失败");
this.fileList = [];
}
},
// -
handleBeforeUpload1(file) {
const isLt2M = file.size / 1024 / 1024 < 100;
//
if (!isLt2M) {
this.$message.error("上传文件大小不能超过 100MB!");
}
return isLt2M;
},
// -
handleBeforePdfUpload1(file) {
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
const whiteList = ["xlsx", "xls"];
if (whiteList.indexOf(fileSuffix) === -1) {
this.$message.error("上传文件只能是.xlsx, .xls");
return false;
}
},
/** 查询公告列表 */
getList() {
this.loading = true;
queryPatient(this.queryParams).then((res) => {
this.listDat = res.data.list;
this.total = res.data.total;
this.loading = false;
});
},
/** 基本信息 */
submitForm: function () {
this.$refs["form"].validate(async (valid) => {
if (valid) {
//
window.scrollTo(0, 0);
this.stepNum++;
}
});
},
//
async scaleSubmitForm() {
try {
this.$refs["form"].validate(async (valid) => {
if (valid) {
// ------ ------
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,
//
handleFlag(_flag) {
this.flag = _flag;
this.$router.push({
path: "/screening/h5eva",
query: {
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-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("提交成功");
});
});
}
});
} catch (error) {
this.loading = false;
this.disabled = false;
console.log("提交失败:", error);
this.$message.error("提交失败,请稍后重试!");
}
},
//
async saveAnswer(value, str) {
try {
const params = {
param: {
answer: value,
code: str,
detailId: this.detailId,
},
};
await screenSave(params).then((response) => {});
} catch (error) {
this.loading = false;
this.disabled = false;
console.log("保存失败:", error);
this.$message.error("保存失败,请稍后重试!");
}
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.btn-dl {
display: flex;
}
.btn-dl div {
flex: 1;
background: #fff;
border-radius: 4px;
line-height: 40px;
text-align: center;
}
.btn-dl-gl {
color: #c6a268;
}
.btn-dl-ty {
margin-right: 16px;
}
.text-dl {
text-indent: 2em;
font-size: 16px;
color: #222;
line-height: 28px;
}
.text-bt {
font-size: 18px;
color: #222;
line-height: 30px;
margin-bottom: 5px;
}
.zqty {
padding: 16px;
background: #fff;
border-radius: 6px;
margin-bottom: 14px;
}
>>> .el-checkbox {
margin-right: 10px rtant;
}
@ -946,10 +149,10 @@ export default {
background: #fff;
font-size: 20px;
color: #70483e;
line-height: 50px;
font-weight: 600;
margin-bottom: 10px;
border-radius: 6px;
padding: 10px 16px;
text-align: center;
}
.BIMTips1 {

1043
acupuncture-前台/src/views/screening/h5eva.vue

File diff suppressed because it is too large
Loading…
Cancel
Save