|
@ -134,6 +134,7 @@
|
|
|
},
|
|
|
patientInfo: undefined,
|
|
|
searchKey: '',
|
|
|
allLabel: {},
|
|
|
customLabel: [],
|
|
|
diseaseLabel: [],
|
|
|
healthLabel: [],
|
|
@ -150,11 +151,10 @@
|
|
|
},
|
|
|
watch: {
|
|
|
curTeamId: function(){
|
|
|
var vm = this
|
|
|
this.getSpecialistPatientLabel(this.curTeamId)
|
|
|
this.curTeamInfo = this.teamListObj[this.curTeamId]
|
|
|
if(vm.patientInfo){
|
|
|
vm.findPatientSignSpecialistInfo()
|
|
|
}
|
|
|
vm.patientInfo = undefined
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@ -258,12 +258,46 @@
|
|
|
vm.patientInfo.healthLabel = healthLabel
|
|
|
vm.patientInfo.diseaseLabel = diseaseLabel
|
|
|
vm.patientInfo.customLabel = customLabel
|
|
|
vm.getSpecialistPatientLabel(vm.curTeamId)
|
|
|
vm.initLabelData()
|
|
|
} else {
|
|
|
showErrorMessage(res.msg);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
initLabelData: function(){
|
|
|
var vm = this
|
|
|
var dLabel = [], cLabel = [];
|
|
|
$.each(vm.allLabel['diseaseLabel'], function(index, o){
|
|
|
o.flag = false
|
|
|
o.disease = o.code
|
|
|
o.diseaseName = o.name
|
|
|
$.each(vm.patientInfo.diseaseLabel, function(index1, o1){
|
|
|
if(o1.disease == o.code){
|
|
|
o.flag = true
|
|
|
}
|
|
|
})
|
|
|
dLabel.push(o)
|
|
|
})
|
|
|
$.each(vm.allLabel['customLabel'], function(index, o){
|
|
|
o.flag = false
|
|
|
o.labelCode = o.labelCode
|
|
|
o.labelName = o.labelName
|
|
|
$.each(vm.patientInfo.customLabel, function(index1, o1){
|
|
|
if(o1.label == o.labelCode){
|
|
|
o.flag = true
|
|
|
}else{
|
|
|
|
|
|
}
|
|
|
})
|
|
|
if(o.isSystem!=1){
|
|
|
cLabel.push(o)
|
|
|
}
|
|
|
})
|
|
|
vm.healthLabel = vm.allLabel['healthLabel'] || []
|
|
|
vm.curHealthStatu = vm.patientInfo.healthLabel&&vm.patientInfo.healthLabel.length>0?vm.patientInfo.healthLabel[0].label:res.data['healthLabel'][0].labelCode
|
|
|
vm.diseaseLabel = dLabel
|
|
|
vm.customLabel = cLabel
|
|
|
},
|
|
|
// 获取居民标签字典(健康情况、疾病类型、自定义分组)
|
|
|
getSpecialistPatientLabel: function(teamId){
|
|
|
var vm = this,
|
|
@ -274,37 +308,7 @@
|
|
|
rehaAPI.getSpecialistPatientLabel(params).then(function(res){
|
|
|
layer.close(loading)
|
|
|
if(res.status==200){
|
|
|
var dLabel = [], cLabel = [];
|
|
|
$.each(res.data['diseaseLabel'], function(index, o){
|
|
|
o.flag = false
|
|
|
o.disease = o.code
|
|
|
o.diseaseName = o.name
|
|
|
$.each(vm.patientInfo.diseaseLabel, function(index1, o1){
|
|
|
if(o1.disease == o.code){
|
|
|
o.flag = true
|
|
|
}
|
|
|
})
|
|
|
dLabel.push(o)
|
|
|
})
|
|
|
$.each(res.data['customLabel'], function(index, o){
|
|
|
o.flag = false
|
|
|
o.labelCode = o.labelCode
|
|
|
o.labelName = o.labelName
|
|
|
$.each(vm.patientInfo.customLabel, function(index1, o1){
|
|
|
if(o1.label == o.labelCode){
|
|
|
o.flag = true
|
|
|
}else{
|
|
|
|
|
|
}
|
|
|
})
|
|
|
if(o.isSystem!=1){
|
|
|
cLabel.push(o)
|
|
|
}
|
|
|
})
|
|
|
vm.healthLabel = res.data['healthLabel'] || []
|
|
|
vm.curHealthStatu = vm.patientInfo.healthLabel&&vm.patientInfo.healthLabel.length>0?vm.patientInfo.healthLabel[0].label:res.data['healthLabel'][0].labelCode
|
|
|
vm.diseaseLabel = dLabel
|
|
|
vm.customLabel = cLabel
|
|
|
vm.allLabel = res.data
|
|
|
}else{
|
|
|
showErrorMessage(res.msg);
|
|
|
}
|
|
@ -418,10 +422,10 @@
|
|
|
labelType: o.labelType
|
|
|
})
|
|
|
}
|
|
|
if(num2==vm.customLabel.length){
|
|
|
showWarningMessage('请选择自定义分组!')
|
|
|
return false
|
|
|
}
|
|
|
// if(num2==vm.customLabel.length){
|
|
|
// showWarningMessage('请选择自定义分组!')
|
|
|
// return false
|
|
|
// }
|
|
|
}
|
|
|
var data = {
|
|
|
health: health,
|