|
@ -21,8 +21,9 @@ Vue.component('copd-patient-record-edit', {
|
|
|
return {
|
|
|
formData:{},
|
|
|
nationDict:[],
|
|
|
dicName:['jkcopd_isLive','jkcopd_first_area','jkcopd_first_org_level', 'jkcopd_marriage','jkcopd_occupation','jkcopd_smoke','jkcopd_drink','jkcopd_archivesStatus','jkcopd_disease_conversion','jkcopd_firstVisitType','jkcopd_educational','idCardType'],
|
|
|
dicName:['jkcopd_followup_status','jkcopd_isLive','jkcopd_first_area','jkcopd_first_org_level', 'jkcopd_marriage','jkcopd_occupation','jkcopd_smoke','jkcopd_drink','jkcopd_archivesStatus','jkcopd_disease_conversion','jkcopd_firstVisitType','jkcopd_educational','idCardType'],
|
|
|
marriageArr:[],
|
|
|
followupArr:[],
|
|
|
idCardTypeArr:[],
|
|
|
firstAreaArr:[],
|
|
|
isLiveArr:[],
|
|
@ -44,6 +45,12 @@ Vue.component('copd-patient-record-edit', {
|
|
|
addressVal:[],
|
|
|
resiginAddressVal:[],
|
|
|
docInfo: JSON.parse(window.localStorage.getItem('docInfo')),
|
|
|
rules: {
|
|
|
mobile:[
|
|
|
{ required: true, message: '请输入联系方式', trigger: 'blur' },
|
|
|
{ min: 11, max: 11, message: '请输入正确的联系方式', trigger: 'blur' }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@ -120,7 +127,11 @@ Vue.component('copd-patient-record-edit', {
|
|
|
vm.orgLevelArr=res.list
|
|
|
}else if(value=='jkcopd_isLive'){
|
|
|
vm.isLiveArr=res.list
|
|
|
}else if(value=='jkcopd_followup_status'){
|
|
|
vm.followupArr=res.list
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
@ -261,52 +272,61 @@ Vue.component('copd-patient-record-edit', {
|
|
|
},
|
|
|
updJkCopdPatient(){
|
|
|
var vm =this
|
|
|
if(!this.formData.mobile){
|
|
|
this.$message.error('请填写手机号!')
|
|
|
return false
|
|
|
}
|
|
|
if(this.formData.sexName=='男'){
|
|
|
this.formData.sex=1
|
|
|
}else{
|
|
|
this.formData.sex=2
|
|
|
}
|
|
|
this.addressVal.forEach(function(item,index){
|
|
|
if(index==0){
|
|
|
vm.formData.liveProvince=item
|
|
|
vm.formData.liveProvinceName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==1){
|
|
|
vm.formData.liveCity=item
|
|
|
vm.formData.liveCityName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==2){
|
|
|
vm.formData.liveTown=item
|
|
|
vm.formData.liveTownName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==3){
|
|
|
vm.formData.liveStreet=item
|
|
|
vm.formData.liveStreetName=vm.$refs.cascader.currentLabels[index]
|
|
|
}
|
|
|
})
|
|
|
this.resiginAddressVal.forEach(function(item,index){
|
|
|
if(index==0){
|
|
|
vm.formData.registProvince=item
|
|
|
vm.formData.registProvinceName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==1){
|
|
|
vm.formData.registCity=item
|
|
|
vm.formData.registCityName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==2){
|
|
|
vm.formData.registTown=item
|
|
|
vm.formData.registTownName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==3){
|
|
|
vm.formData.registStreet=item
|
|
|
vm.formData.registStreetName=vm.$refs.cas.currentLabels[index]
|
|
|
}
|
|
|
})
|
|
|
statisticAPI.updJkCopdPatient({jsonData:JSON.stringify(vm.formData),doctor:vm.docInfo.code}).then(
|
|
|
function(res){
|
|
|
if(res.status==200){
|
|
|
EventBus.$emit('copd-reset-save')
|
|
|
this.$refs.ruleForm.validate(function(valid){
|
|
|
if(valid){
|
|
|
if(!vm.formData.mobile){
|
|
|
this.$message.error('请填写联系方式!')
|
|
|
return false
|
|
|
}
|
|
|
if(vm.formData.sexName=='男'){
|
|
|
vm.formData.sex=1
|
|
|
}else{
|
|
|
vm.formData.sex=2
|
|
|
}
|
|
|
vm.addressVal.forEach(function(item,index){
|
|
|
if(index==0){
|
|
|
vm.formData.liveProvince=item
|
|
|
vm.formData.liveProvinceName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==1){
|
|
|
vm.formData.liveCity=item
|
|
|
vm.formData.liveCityName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==2){
|
|
|
vm.formData.liveTown=item
|
|
|
vm.formData.liveTownName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==3){
|
|
|
vm.formData.liveStreet=item
|
|
|
vm.formData.liveStreetName=vm.$refs.cascader.currentLabels[index]
|
|
|
}
|
|
|
})
|
|
|
vm.resiginAddressVal.forEach(function(item,index){
|
|
|
if(index==0){
|
|
|
vm.formData.registProvince=item
|
|
|
vm.formData.registProvinceName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==1){
|
|
|
vm.formData.registCity=item
|
|
|
vm.formData.registCityName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==2){
|
|
|
vm.formData.registTown=item
|
|
|
vm.formData.registTownName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==3){
|
|
|
vm.formData.registStreet=item
|
|
|
vm.formData.registStreetName=vm.$refs.cas.currentLabels[index]
|
|
|
}
|
|
|
})
|
|
|
statisticAPI.updJkCopdPatient({jsonData:JSON.stringify(vm.formData),doctor:vm.docInfo.code}).then(
|
|
|
function(res){
|
|
|
if(res.status==200){
|
|
|
EventBus.$emit('copd-reset-save')
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
}else{
|
|
|
vm.$message.error('请填写联系方式!')
|
|
|
window.scrollTo({ top: top, behavior: 'smooth' });
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|