|
@ -72,7 +72,7 @@
|
|
|
<template v-if="qst.isThird==3&&qst.question.thirdKey=='smoke'">
|
|
|
<input
|
|
|
:type="qst.questionType==1?'checkbox':'radio'"
|
|
|
:checked="opt.thirdValue == (ascvdShow?ascvdShow:smoke)"
|
|
|
:checked="opt.thirdValue == smoke"
|
|
|
id="myInput3"
|
|
|
:name="'ques'+index+screeningType+(qst.questionType==1?'[]':'')"
|
|
|
value="1" />
|
|
@ -82,7 +82,7 @@
|
|
|
<template v-if="qst.isThird==3&&qst.question.thirdKey=='diabetes'">
|
|
|
<input
|
|
|
:type="qst.questionType==1?'checkbox':'radio'"
|
|
|
:checked="opt.thirdValue == (ascvdShow?ascvdShow:diabetes)"
|
|
|
:checked="opt.thirdValue == diabetes"
|
|
|
id="myInput3"
|
|
|
:name="'ques'+index+screeningType+(qst.questionType==1?'[]':'')"
|
|
|
value="1" />
|
|
@ -92,7 +92,7 @@
|
|
|
<template v-if="qst.isThird==3&&qst.question.thirdKey=='hypertension'">
|
|
|
<input
|
|
|
:type="qst.questionType==1?'checkbox':'radio'"
|
|
|
:checked="opt.thirdValue == (ascvdShow?ascvdShow:hypertension)"
|
|
|
:checked="opt.thirdValue == hypertension"
|
|
|
id="myInput3"
|
|
|
:name="'ques'+index+screeningType+(qst.questionType==1?'[]':'')"
|
|
|
value="1" />
|
|
@ -250,17 +250,17 @@
|
|
|
noswitch: httpData['noswitch']
|
|
|
},
|
|
|
mounted: function () {
|
|
|
console.log('screeningTitle', this.screeningTitle)
|
|
|
if (this.screeningType != '6bcd306aaafb4e4381071346d86fadbb1') {
|
|
|
// if (this.screeningType != '6bcd306aaafb4e4381071346d86fadbb1') {
|
|
|
this.getHealth()
|
|
|
}
|
|
|
// console.log(123456);
|
|
|
|
|
|
// }
|
|
|
this.getQuestion()
|
|
|
this.getDoctorInfo()
|
|
|
},
|
|
|
methods: {
|
|
|
getInitData() {
|
|
|
var vm = this
|
|
|
console.log('sssssssssssxxxxxxxxx', vm.questions)
|
|
|
httpRequest.get('doctor/screen/physicalList', { data: { patient: vm.screeningResidents } }).then(function (res) {
|
|
|
var data = res.data
|
|
|
if (res.status == 200 && data) {
|
|
@ -332,7 +332,6 @@
|
|
|
|
|
|
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)])
|
|
|
}
|
|
|
}
|
|
@ -400,7 +399,6 @@
|
|
|
},
|
|
|
//计算选中个数,组装成后台接收格式
|
|
|
selectItem: function (qst, select, num) {
|
|
|
console.log('ssssssssssss99999999999999999999', qst, select)
|
|
|
var vm = this
|
|
|
var isFlag = 1
|
|
|
if (qst.title == '抗栓药物其他名称' && vm.screeningTitle == '大肠癌筛查问卷(OB筛查)') {
|
|
@ -471,7 +469,6 @@
|
|
|
]
|
|
|
}
|
|
|
if (select.thirdKey == 'ascvd' && select.thirdValue == 0) {
|
|
|
console.log('333333333333333333333333')
|
|
|
this.ascvdShow = '0'
|
|
|
vm.spliceFunction()
|
|
|
for (var i in this.questions) {
|
|
@ -578,7 +575,6 @@
|
|
|
}
|
|
|
|
|
|
data.options = options
|
|
|
console.log('111111111111xsssssssss')
|
|
|
var oldLen = this.selectArr.length
|
|
|
this.selectArr =
|
|
|
_.filter(this.selectArr, function (o) {
|
|
@ -588,12 +584,10 @@
|
|
|
this.selectArr = this.selectArr.concat(ls)
|
|
|
this.selectArr.push(data)
|
|
|
|
|
|
console.log(this.selectArr, 'this.selectArr')
|
|
|
var len = this.selectArr.length
|
|
|
// 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)
|
|
@ -707,7 +701,6 @@
|
|
|
}
|
|
|
if (res.data[i].question.title == '性别') {
|
|
|
var index = vm.sex == 1 ? '0' : '1'
|
|
|
console.log('==================aaaaaaaaaa', res.data[i].question, res.data[i].option[index])
|
|
|
vm.selectItem(res.data[i].question, res.data[i].option[index])
|
|
|
}
|
|
|
if (res.data[i].question.thirdKey == 'createDate') {
|
|
@ -722,7 +715,6 @@
|
|
|
vm.selectItem(res.data[i].question, res.data[i].option[index])
|
|
|
}
|
|
|
}
|
|
|
console.log(res.data, 'ssssssssslllllllllll')
|
|
|
vm.questions = res.data
|
|
|
|
|
|
for (var i in res.data) {
|
|
@ -744,7 +736,6 @@
|
|
|
}
|
|
|
if (res.data[i].question.thirdKey == 'sex') {
|
|
|
var index = vm.sex == 1 ? '0' : '1'
|
|
|
console.log('------111111000000000', res.data[i].question, res.data[i].option[index])
|
|
|
vm.selectItem(res.data[i].question, res.data[i].option[index])
|
|
|
}
|
|
|
}
|
|
@ -774,6 +765,8 @@
|
|
|
.then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
var data = res.medical_detail
|
|
|
console.log(data,"data");
|
|
|
|
|
|
for (var i in vm.questions) {
|
|
|
if (vm.questions[i].question.thirdKey == 'height') {
|
|
|
vm.questions[i].question.content = data.height
|
|
@ -826,6 +819,15 @@
|
|
|
vm.questions[i].question.content = data.renalFunctionCreatinine
|
|
|
vm.changeContent(vm.questions[i].question, data.renalFunctionCreatinine)
|
|
|
}
|
|
|
|
|
|
if(vm.questions[i].question.thirdKey == 'ckd34'){
|
|
|
if(data.renalFunctionCreatinine){
|
|
|
var ckd34 = (((140 - vm.age) * data.weight) / (0.818 * data.renalFunctionCreatinine)).toFixed(2)
|
|
|
vm.questions[i].question.content = ckd34
|
|
|
vm.changeContent(vm.questions[i].question, ckd34)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@ -878,7 +880,6 @@
|
|
|
})
|
|
|
},
|
|
|
save: function () {
|
|
|
console.log('2222221sssssssssssssssss', this.selectArr)
|
|
|
var vm = this
|
|
|
if (vm.progress != 100) {
|
|
|
top.layer.msg('问卷还未全部填写', { icon: 5 })
|