|
@ -69,6 +69,36 @@
|
|
|
<i></i>
|
|
|
<span v-text="opt.content"></span>
|
|
|
</template>
|
|
|
<template v-if="qst.isThird==3&&qst.question.thirdKey=='smoke'">
|
|
|
<input
|
|
|
:type="qst.questionType==1?'checkbox':'radio'"
|
|
|
:checked="opt.thirdValue == (ascvdShow?ascvdShow:smoke)"
|
|
|
id="myInput3"
|
|
|
:name="'ques'+index+screeningType+(qst.questionType==1?'[]':'')"
|
|
|
value="1" />
|
|
|
<i></i>
|
|
|
<span v-text="opt.content"></span>
|
|
|
</template>
|
|
|
<template v-if="qst.isThird==3&&qst.question.thirdKey=='diabetes'">
|
|
|
<input
|
|
|
:type="qst.questionType==1?'checkbox':'radio'"
|
|
|
:checked="opt.thirdValue == (ascvdShow?ascvdShow:diabetes)"
|
|
|
id="myInput3"
|
|
|
:name="'ques'+index+screeningType+(qst.questionType==1?'[]':'')"
|
|
|
value="1" />
|
|
|
<i></i>
|
|
|
<span v-text="opt.content"></span>
|
|
|
</template>
|
|
|
<template v-if="qst.isThird==3&&qst.question.thirdKey=='hypertension'">
|
|
|
<input
|
|
|
:type="qst.questionType==1?'checkbox':'radio'"
|
|
|
:checked="opt.thirdValue == (ascvdShow?ascvdShow:hypertension)"
|
|
|
id="myInput3"
|
|
|
:name="'ques'+index+screeningType+(qst.questionType==1?'[]':'')"
|
|
|
value="1" />
|
|
|
<i></i>
|
|
|
<span v-text="opt.content"></span>
|
|
|
</template>
|
|
|
<template v-if="qst.isThird==3&&qst.question.thirdKey=='seriousMedicalHistory'">
|
|
|
<input
|
|
|
:type="qst.questionType==1?'checkbox':'radio'"
|
|
@ -80,7 +110,7 @@
|
|
|
<span v-text="opt.content"></span>
|
|
|
</template>
|
|
|
<template
|
|
|
v-if="qst.question.thirdKey!='sex'&&qst.question.thirdKey!='acs'&&qst.question.thirdKey!='myocardialInfarct'&&qst.question.thirdKey!='ischemicStroke'&&qst.question.thirdKey!='seriousMedicalHistory'">
|
|
|
v-if="qst.question.thirdKey!='sex'&&qst.question.thirdKey!='acs'&&qst.question.thirdKey!='myocardialInfarct'&&qst.question.thirdKey!='ischemicStroke'&&qst.question.thirdKey!='smoke'&&qst.question.thirdKey!='hypertension'&&qst.question.thirdKey!='diabetes'&&qst.question.thirdKey!='seriousMedicalHistory'">
|
|
|
<input
|
|
|
:type="qst.questionType==1||qst.question.questionType?'checkbox':'radio'"
|
|
|
v-if="qst.question.thirdKey!='sex'"
|
|
@ -213,6 +243,10 @@
|
|
|
ascvdS3: '',
|
|
|
ascvdS4: '',
|
|
|
shaowas: '',
|
|
|
smoke: '',
|
|
|
hypertension: '',
|
|
|
diabetes: '',
|
|
|
|
|
|
noswitch: httpData['noswitch']
|
|
|
},
|
|
|
mounted: function () {
|
|
@ -233,36 +267,56 @@
|
|
|
for (var i in vm.questions) {
|
|
|
if (vm.questions[i].question.thirdKey == 'height' && data.height) {
|
|
|
vm.questions[i].question.content = data.height + ''
|
|
|
vm.changeContent(vm.questions[i].question, data.height + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'weight' && data.weight) {
|
|
|
vm.questions[i].question.content = data.weight + ''
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'bmi' && data.BodyMassIndex) {
|
|
|
vm.questions[i].question.content = data.BodyMassIndex + ''
|
|
|
vm.changeContent(vm.questions[i].question, data.weight + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'bmi') {
|
|
|
if (data.height && data.weight) {
|
|
|
var w = data.weight
|
|
|
var h = data.height / 100
|
|
|
var s = (w / (h * h)).toFixed(2)
|
|
|
vm.questions[i].question.content = s
|
|
|
vm.shaowas = s
|
|
|
vm.changeContent(vm.questions[i].question, s + '')
|
|
|
} else {
|
|
|
vm.questions[i].question.content = ''
|
|
|
vm.shaowas = ''
|
|
|
vm.changeContent(vm.questions[i].question, '')
|
|
|
}
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'systolicPressure' && data.systolicPressure) {
|
|
|
vm.questions[i].question.content = data.systolicPressure + ''
|
|
|
vm.changeContent(vm.questions[i].question, data.systolicPressure + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'diastolicPressure' && data.diastolicPressure) {
|
|
|
vm.questions[i].question.content = data.diastolicPressure + ''
|
|
|
vm.changeContent(vm.questions[i].question, data.diastolicPressure + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'totalCholesterol' && data.totalCholesterol) {
|
|
|
vm.questions[i].question.content = data.totalCholesterol + ''
|
|
|
vm.changeContent(vm.questions[i].question, data.totalCholesterol + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'hdlc' && data.HDL) {
|
|
|
vm.questions[i].question.content = data.HDL + ''
|
|
|
vm.changeContent(vm.questions[i].question, data.HDL + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'ldlc' && data.LDL) {
|
|
|
vm.questions[i].question.content = data.LDL + ''
|
|
|
vm.changeContent(vm.questions[i].question, data.LDL + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'ckd34' && data.height) {
|
|
|
vm.questions[i].question.content = data.height + ''
|
|
|
}
|
|
|
// if (vm.questions[i].question.thirdKey == 'ckd34' && data.height) {
|
|
|
// vm.questions[i].question.content = data.height + ''
|
|
|
// vm.changeContent(vm.questions[i].question, data.LDL + '')
|
|
|
// }
|
|
|
if (vm.questions[i].question.title == '既往有心肌梗死病史' && data.AMI) {
|
|
|
var index = data.AMI == 1 ? 0 : data.AMI == 2 ? 1 : ''
|
|
|
vm.selectItem(vm.questions[i].question, vm.questions[i].option[Number(index)])
|
|
|
}
|
|
|
if (vm.questions[i].question.title == '缺血性脑卒中病史' && data.CerebralIschemicStroke) {
|
|
|
console.log('缺血性脑卒中病史', vm.questions[i], data.CerebralIschemicStroke)
|
|
|
var index = data.CerebralIschemicStroke == 1 ? 0 : data.CerebralIschemicStroke == 2 ? 1 : ''
|
|
|
vm.selectItem(vm.questions[i].question, vm.questions[i].option[Number(index)])
|
|
|
}
|
|
@ -271,11 +325,14 @@
|
|
|
vm.selectItem(vm.questions[i].question, vm.questions[i].option[index])
|
|
|
}
|
|
|
if (vm.questions[i].question.title == '糖尿病' && data.Diabetes) {
|
|
|
console.log('vm.questions[i]', vm.questions[i])
|
|
|
var index = data.Diabetes == 1 ? 0 : data.Diabetes == 2 ? 1 : ''
|
|
|
vm.selectItem(vm.questions[i].question, vm.questions[i].option[Number(index)])
|
|
|
}
|
|
|
if (vm.questions[i].question.title == '吸烟' && data.smoke) {
|
|
|
var index = data.smoke == 1 ? 0 : data.smoke == 2 ? 1 : ''
|
|
|
|
|
|
if (vm.questions[i].question.title == '吸烟' && (data.smoke || data.smoke == 0)) {
|
|
|
var index = data.smoke == 1 ? 0 : data.smoke == 0 ? 1 : ''
|
|
|
console.log('222222222222222222222222', data.smoke)
|
|
|
vm.selectItem(vm.questions[i].question, vm.questions[i].option[Number(index)])
|
|
|
}
|
|
|
}
|
|
@ -287,19 +344,23 @@
|
|
|
for (var i in vm.questions) {
|
|
|
if (vm.questions[i].question.thirdKey == 'hdlc' && !vm.questions[i].question.content) {
|
|
|
vm.questions[i].question.content = obj.hdlc
|
|
|
vm.changeContent(vm.questions[i].question, obj.hdlc)
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'ldlc' && !vm.questions[i].question.content) {
|
|
|
vm.questions[i].question.content = obj.ldlc
|
|
|
vm.changeContent(vm.questions[i].question, obj.ldlc + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'totalCholesterol' && !vm.questions[i].question.content) {
|
|
|
vm.questions[i].question.content = obj.totalCholesterol
|
|
|
console.log('ssssssssssyyyyyyyyyyyyy', obj.totalCholesterol)
|
|
|
vm.changeContent(vm.questions[i].question, obj.totalCholesterol + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'diastolicPressure' && !vm.questions[i].question.content) {
|
|
|
vm.questions[i].question.content = obj.diastolicPressure
|
|
|
vm.changeContent(vm.questions[i].question, obj.diastolicPressure + '')
|
|
|
}
|
|
|
if (vm.questions[i].question.thirdKey == 'systolicPressure' && !vm.questions[i].question.content) {
|
|
|
vm.questions[i].question.content = obj.systolicPressure
|
|
|
vm.changeContent(vm.questions[i].question, obj.systolicPressure + '')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -410,6 +471,7 @@
|
|
|
]
|
|
|
}
|
|
|
if (select.thirdKey == 'ascvd' && select.thirdValue == 0) {
|
|
|
console.log('333333333333333333333333')
|
|
|
this.ascvdShow = '0'
|
|
|
vm.spliceFunction()
|
|
|
for (var i in this.questions) {
|
|
@ -466,6 +528,15 @@
|
|
|
if (select.thirdKey == 'seriousMedicalHistory') {
|
|
|
vm.ascvdS4 = select.thirdValue
|
|
|
}
|
|
|
if (select.thirdKey == 'smoke') {
|
|
|
vm.smoke = select.thirdValue
|
|
|
}
|
|
|
if (select.thirdKey == 'hypertension') {
|
|
|
vm.hypertension = select.thirdValue
|
|
|
}
|
|
|
if (select.thirdKey == 'diabetes') {
|
|
|
vm.diabetes = select.thirdValue
|
|
|
}
|
|
|
}
|
|
|
if ((num && qst.thirdKey == 'weight') || qst.thirdKey == 'height') {
|
|
|
var weight = ''
|
|
@ -522,6 +593,7 @@
|
|
|
// var questions=Object.values(this.questions)
|
|
|
var questions = _.toArray(this.questions)
|
|
|
var allLen = questions.length
|
|
|
console.log('22222222222222222', len, allLen)
|
|
|
var progress = len === allLen ? 100 : (len / allLen) * 100
|
|
|
if (select && select.thirdKey == 'ascvd') {
|
|
|
this.$refs.progress.dataFunction(progress)
|