From 1b253aecd41a19a563ada638b12da4f988989d2b Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Tue, 5 Jul 2022 14:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E4=B8=BA=E5=87=BA=E7=94=9F?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epidemicuserinfoaudit-add-or-update.vue | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/views/modules/epidemic/epidemicuserinfoaudit-add-or-update.vue b/src/views/modules/epidemic/epidemicuserinfoaudit-add-or-update.vue index f3ec283..d9f2929 100644 --- a/src/views/modules/epidemic/epidemicuserinfoaudit-add-or-update.vue +++ b/src/views/modules/epidemic/epidemicuserinfoaudit-add-or-update.vue @@ -36,6 +36,9 @@ + + + @@ -113,6 +116,12 @@ + + + + + + @@ -227,8 +236,25 @@ export default { ...this.dataForm, ...res.data } + this.dataForm.birthday = this.IdCard(this.dataForm.idCard, 1) }).catch(() => {}) }, + IdCard (UUserCard, num) { + if (num === 1) { + // 获取出生日期 + return UUserCard.substring(6, 10) + '-' + UUserCard.substring(10, 12) + '-' + UUserCard.substring(12, 14) + } + if (num === 2) { + // 获取性别 + if (parseInt(UUserCard.substr(16, 1)) % 2 === 1) { + // 男 + return '1' + } else { + // 女 + return '0' + } + } + }, beforeSubmit (state) { if (state === '2') { if(this.dataForm.auditReason.length === 0){