|
|
|
@ -950,7 +950,7 @@ export default { |
|
|
|
this.$peisAPI.peopleIcCard().then(res => { |
|
|
|
console.log('peopleIcCard', res) |
|
|
|
let lres = JSON.parse(res) |
|
|
|
if (lres.code >= 0) { |
|
|
|
if (lres.code >= -1) { |
|
|
|
let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation) |
|
|
|
this.form.patientName = idNos.Name |
|
|
|
this.form.birthDate = idNos.birthDate |
|
|
|
@ -963,6 +963,8 @@ export default { |
|
|
|
this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo |
|
|
|
|
|
|
|
this.changeIdNo() // 触发身份证查询档案号 |
|
|
|
}else{ |
|
|
|
this.$message.error({showClose:true,message:`${lres.message}`}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -1458,7 +1460,7 @@ export default { |
|
|
|
.then(res => { |
|
|
|
console.log('this.$peisAPI.photoGrah 原始返回结果', res) |
|
|
|
let lres = JSON.parse(res) |
|
|
|
if (lres.code == 1) { |
|
|
|
if (lres.code > -1) { |
|
|
|
let uploadPhoto = { |
|
|
|
patientRegisterId: this.form.id, |
|
|
|
photo: lres.data.Photo, |
|
|
|
@ -1470,7 +1472,7 @@ export default { |
|
|
|
this.$message.error({ showClose: true, message: "上传照片错误" + lres.code}) |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
if (res.code == 1) { |
|
|
|
if (res && res.code > -1) { |
|
|
|
let body = { |
|
|
|
patientRegisterId: this.form.id, |
|
|
|
photo: res.data, |
|
|
|
@ -1479,13 +1481,14 @@ export default { |
|
|
|
return postapi(`/api/app/patient-register/update-photo`, body); |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
if (res && res.code > -1) { |
|
|
|
//console.log('拍照',res.data) |
|
|
|
this.patientRegister.patientRegisterRd.photo = res.data.photo |
|
|
|
console.log("操作成功"); |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log('this.$peisAPI.photoGrah', err) |
|
|
|
this.$message.error({ showClose: true, message: `照片操作错误 ${err}`}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|