diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 2461895..da6fca2 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -289,10 +289,18 @@ if (window.frames['iframeIDCard'].result) { this.personForm.idCardNo = window.frames['iframeIDCard'].CardNo this.personForm.name = window.frames['iframeIDCard'].Name - if (window.frames['iframeIDCard'].Sex === '2') { this.personForm.sex = '女' } else { this.personForm.sex = '男' } + // if (window.frames['iframeIDCard'].Sex === '2') { this.personForm.sex = '女' } else { this.personForm.sex = '男' } + this.personForm.sex = parseInt(window.frames['iframeIDCard'].Sex) this.personForm.birthday = window.frames['iframeIDCard'].Born.substring(0, 4) + '-' + window.frames['iframeIDCard'].Born.substring(4, 6) + '-' + window.frames['iframeIDCard'].Born.substring(6, 8) this.photo = 'data:image/png;base64,' + window.frames['iframeIDCard'].Picture this.personForm.nation = window.frames['iframeIDCard'].Nation + '族' + var nationName = window.frames['iframeIDCard'].Nation + '族' + for (var item of this.nationList) { + if (item.name === nationName) { + this.personForm.nation = item.value + break + } + } this.personForm.ext.certificationUnit = window.frames['iframeIDCard'].IssuedAt this.personForm.ext.address = window.frames['iframeIDCard'].Address } else { diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 2461895..da6fca2 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -289,10 +289,18 @@ if (window.frames['iframeIDCard'].result) { this.personForm.idCardNo = window.frames['iframeIDCard'].CardNo this.personForm.name = window.frames['iframeIDCard'].Name - if (window.frames['iframeIDCard'].Sex === '2') { this.personForm.sex = '女' } else { this.personForm.sex = '男' } + // if (window.frames['iframeIDCard'].Sex === '2') { this.personForm.sex = '女' } else { this.personForm.sex = '男' } + this.personForm.sex = parseInt(window.frames['iframeIDCard'].Sex) this.personForm.birthday = window.frames['iframeIDCard'].Born.substring(0, 4) + '-' + window.frames['iframeIDCard'].Born.substring(4, 6) + '-' + window.frames['iframeIDCard'].Born.substring(6, 8) this.photo = 'data:image/png;base64,' + window.frames['iframeIDCard'].Picture this.personForm.nation = window.frames['iframeIDCard'].Nation + '族' + var nationName = window.frames['iframeIDCard'].Nation + '族' + for (var item of this.nationList) { + if (item.name === nationName) { + this.personForm.nation = item.value + break + } + } this.personForm.ext.certificationUnit = window.frames['iframeIDCard'].IssuedAt this.personForm.ext.address = window.frames['iframeIDCard'].Address } else { diff --git a/src/views/memberManage/addPersonIris.vue b/src/views/memberManage/addPersonIris.vue index 0512f0e..cc4bc1d 100644 --- a/src/views/memberManage/addPersonIris.vue +++ b/src/views/memberManage/addPersonIris.vue @@ -295,9 +295,7 @@ }) }, beforeRouteLeave(to, from, next) { - if (this.inited === true) { - window.frames['iframeMap'].closeDev() - } + window.frames['iframeMap'].closeDev() next() }, fetchData(id) { @@ -334,10 +332,18 @@ if (window.frames['iframeIDCard'].result) { this.personForm.idCardNo = window.frames['iframeIDCard'].CardNo this.personForm.name = window.frames['iframeIDCard'].Name - if (window.frames['iframeIDCard'].Sex === '2') { this.personForm.sex = '女' } else { this.personForm.sex = '男' } + // if (window.frames['iframeIDCard'].Sex === '2') { this.personForm.sex = '女' } else { this.personForm.sex = '男' } + this.personForm.sex = parseInt(window.frames['iframeIDCard'].Sex) this.personForm.birthday = window.frames['iframeIDCard'].Born.substring(0, 4) + '-' + window.frames['iframeIDCard'].Born.substring(4, 6) + '-' + window.frames['iframeIDCard'].Born.substring(6, 8) this.photo = 'data:image/png;base64,' + window.frames['iframeIDCard'].Picture this.personForm.nation = window.frames['iframeIDCard'].Nation + '族' + var nationName = window.frames['iframeIDCard'].Nation + '族' + for (var item of this.nationList) { + if (item.name === nationName) { + this.personForm.nation = item.value + break + } + } this.personForm.ext.certificationUnit = window.frames['iframeIDCard'].IssuedAt this.personForm.ext.address = window.frames['iframeIDCard'].Address } else { @@ -431,7 +437,7 @@ } }) }, - // 注册虹膜 + // 注册虹膜 (没用了) registerIris() { // 如果已经保存 this.isSave = true @@ -446,12 +452,13 @@ }, // 接收iframe传来的消息 receiveParamsFromHtml(res) { - if(res === 'saveIrisData') { + if (res === 'saveIrisData') { this.saveIrisData() - }else{ + } else { this.iframeMsg = res } }, + // 没用了 startCapture() { if (this.irisBtnName === '初始化设备') { this.devLoading = true @@ -465,6 +472,7 @@ this.saveIrisData() } }, + // 保存虹膜数据 saveIrisData() { this.irisForm.image_zy0 = window.frames['iframeMap'].image0 this.irisForm.image_zy1 = window.frames['iframeMap'].image1 @@ -472,7 +480,6 @@ this.irisForm.image_yy1 = window.frames['iframeMap'].image3 this.irisForm.personId = this.personForm.id this.irisForm.idCardNo = this.personForm.idCardNo - console.log(this.irisForm) saveIris(this.irisForm).then(response => { this.step = '1' if (response.code === 200) {