diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 5f4542d..7b3b1a3 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -32,7 +32,6 @@ type="date" style="width: 100%" value-format="yyyy-MM-dd" - format="yyyy-MM-dd" /> @@ -137,7 +136,7 @@ import { addPerson, updatePerson, personInfo, getSexType, getDutyType, getNationType, getPersonPhoto } from '@/api/person' import { getToken } from '@/utils/auth' // getToken from cookie import { getProject } from '@/utils/baseConfig' -import { getBirthdayByIdNO, getSexByIdNO } from '@/utils/dataAnalysis' +// import { getBirthdayByIdNO, getSexByIdNO } from '@/utils/dataAnalysis' import { isIE } from '@/utils/browser' export default { @@ -205,10 +204,10 @@ } }, watch: { - 'personForm.idCardNo': function(val) { - this.personForm.birthday = getBirthdayByIdNO(val) - this.personForm.sex = getSexByIdNO(val) - } + // 'personForm.idCardNo': function(val) { + // this.personForm.birthday = getBirthdayByIdNO(val) + // this.personForm.sex = getSexByIdNO(val) + // } }, mounted() { this.fetchSexType()// 获取性别列表 diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 5f4542d..7b3b1a3 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -32,7 +32,6 @@ type="date" style="width: 100%" value-format="yyyy-MM-dd" - format="yyyy-MM-dd" /> @@ -137,7 +136,7 @@ import { addPerson, updatePerson, personInfo, getSexType, getDutyType, getNationType, getPersonPhoto } from '@/api/person' import { getToken } from '@/utils/auth' // getToken from cookie import { getProject } from '@/utils/baseConfig' -import { getBirthdayByIdNO, getSexByIdNO } from '@/utils/dataAnalysis' +// import { getBirthdayByIdNO, getSexByIdNO } from '@/utils/dataAnalysis' import { isIE } from '@/utils/browser' export default { @@ -205,10 +204,10 @@ } }, watch: { - 'personForm.idCardNo': function(val) { - this.personForm.birthday = getBirthdayByIdNO(val) - this.personForm.sex = getSexByIdNO(val) - } + // 'personForm.idCardNo': function(val) { + // this.personForm.birthday = getBirthdayByIdNO(val) + // this.personForm.sex = getSexByIdNO(val) + // } }, mounted() { this.fetchSexType()// 获取性别列表 diff --git a/src/views/memberManage/addPersonIris.vue b/src/views/memberManage/addPersonIris.vue index c866fa0..ebc8c90 100644 --- a/src/views/memberManage/addPersonIris.vue +++ b/src/views/memberManage/addPersonIris.vue @@ -355,6 +355,7 @@ }, // 重置表单 resetForm() { + const id = this.personForm.id this.personForm = { idCardNo: '', // 身份证号 name: '', // 姓名 @@ -371,6 +372,9 @@ address: ''// 住址 } } + if (id) { + this.personForm.id = id + } this.photo = '' this.irisForm = { personId: '', @@ -407,6 +411,8 @@ // 如果是新增页面已经保存,则调用update // 其他情况均为修改页面 if (this.isSave === false && this.isEditMode === false) { + console.log('add', this.personForm) + delete this.personForm.id addPerson(this.personForm).then(response => { if (response.code === 200) { // 保存用户id @@ -437,19 +443,6 @@ } }) }, - // 注册虹膜 (没用了) - registerIris() { - // 如果已经保存 - // this.isSave = true - if (this.isSave) { - this.step = '2' - this.irisBtnName = '初始化设备' - this.irisBtnDisable = true - this.devLoading = true - } else { - this.$message.warning('请先保存用户基本信息') - } - }, // 接收iframe传来的消息 receiveParamsFromHtml(res) { if (res === 'saveIrisData') { @@ -458,20 +451,6 @@ this.iframeMsg = res } }, - // 没用了 - startCapture() { - if (this.irisBtnName === '初始化设备') { - this.devLoading = true - this.irisBtnDisable = true - window.frames['iframeMap'].initDev() - } else if (this.irisBtnName === '立即采集') { - this.irisBtnDisable = true - window.frames['iframeMap'].StartCaptureStepTwo() - } else if (this.irisBtnName === '保存虹膜数据') { - this.irisBtnDisable = true - this.saveIrisData() - } - }, // 保存虹膜数据 saveIrisData() { this.irisForm.image_zy0 = window.frames['iframeMap'].image0 @@ -489,6 +468,7 @@ cancelButtonText: '否', type: 'info' }).then(() => { + this.personForm.id = '' this.resetForm() this.isSave = false this.isEditMode = false diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 5f4542d..7b3b1a3 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -32,7 +32,6 @@ type="date" style="width: 100%" value-format="yyyy-MM-dd" - format="yyyy-MM-dd" /> @@ -137,7 +136,7 @@ import { addPerson, updatePerson, personInfo, getSexType, getDutyType, getNationType, getPersonPhoto } from '@/api/person' import { getToken } from '@/utils/auth' // getToken from cookie import { getProject } from '@/utils/baseConfig' -import { getBirthdayByIdNO, getSexByIdNO } from '@/utils/dataAnalysis' +// import { getBirthdayByIdNO, getSexByIdNO } from '@/utils/dataAnalysis' import { isIE } from '@/utils/browser' export default { @@ -205,10 +204,10 @@ } }, watch: { - 'personForm.idCardNo': function(val) { - this.personForm.birthday = getBirthdayByIdNO(val) - this.personForm.sex = getSexByIdNO(val) - } + // 'personForm.idCardNo': function(val) { + // this.personForm.birthday = getBirthdayByIdNO(val) + // this.personForm.sex = getSexByIdNO(val) + // } }, mounted() { this.fetchSexType()// 获取性别列表 diff --git a/src/views/memberManage/addPersonIris.vue b/src/views/memberManage/addPersonIris.vue index c866fa0..ebc8c90 100644 --- a/src/views/memberManage/addPersonIris.vue +++ b/src/views/memberManage/addPersonIris.vue @@ -355,6 +355,7 @@ }, // 重置表单 resetForm() { + const id = this.personForm.id this.personForm = { idCardNo: '', // 身份证号 name: '', // 姓名 @@ -371,6 +372,9 @@ address: ''// 住址 } } + if (id) { + this.personForm.id = id + } this.photo = '' this.irisForm = { personId: '', @@ -407,6 +411,8 @@ // 如果是新增页面已经保存,则调用update // 其他情况均为修改页面 if (this.isSave === false && this.isEditMode === false) { + console.log('add', this.personForm) + delete this.personForm.id addPerson(this.personForm).then(response => { if (response.code === 200) { // 保存用户id @@ -437,19 +443,6 @@ } }) }, - // 注册虹膜 (没用了) - registerIris() { - // 如果已经保存 - // this.isSave = true - if (this.isSave) { - this.step = '2' - this.irisBtnName = '初始化设备' - this.irisBtnDisable = true - this.devLoading = true - } else { - this.$message.warning('请先保存用户基本信息') - } - }, // 接收iframe传来的消息 receiveParamsFromHtml(res) { if (res === 'saveIrisData') { @@ -458,20 +451,6 @@ this.iframeMsg = res } }, - // 没用了 - startCapture() { - if (this.irisBtnName === '初始化设备') { - this.devLoading = true - this.irisBtnDisable = true - window.frames['iframeMap'].initDev() - } else if (this.irisBtnName === '立即采集') { - this.irisBtnDisable = true - window.frames['iframeMap'].StartCaptureStepTwo() - } else if (this.irisBtnName === '保存虹膜数据') { - this.irisBtnDisable = true - this.saveIrisData() - } - }, // 保存虹膜数据 saveIrisData() { this.irisForm.image_zy0 = window.frames['iframeMap'].image0 @@ -489,6 +468,7 @@ cancelButtonText: '否', type: 'info' }).then(() => { + this.personForm.id = '' this.resetForm() this.isSave = false this.isEditMode = false diff --git a/src/views/memberManage/listStaff.vue b/src/views/memberManage/listStaff.vue index 9d5d46a..f531ba7 100644 --- a/src/views/memberManage/listStaff.vue +++ b/src/views/memberManage/listStaff.vue @@ -38,7 +38,7 @@ - +