清理idCardNoUtils,改使用ID对象

This commit is contained in:
aixianling
2022-10-14 13:58:35 +08:00
parent 12b3a48baa
commit cfb0177a45
27 changed files with 193 additions and 162 deletions

View File

@@ -448,7 +448,7 @@ export default {
data() {
let IdNumberPass = (rule, value, callback) => {
if (value) {
if (this.idCardNoUtil.checkIdCardNo(value)) {
if (ID.check(value)) {
callback();
} else {
callback(new Error("身份证号格式错误"));
@@ -568,7 +568,7 @@ export default {
{label: "姓名", prop: "name"},
{label: "性别", prop: "sex", dict: "sex", align: 'center'},
{label: "年龄", prop: "age", align: 'center'},
{label: "身份证号", render: (h, {row}) => h('p', this.idCardNoUtil.hideId(row.idNumber))},
{label: "身份证号", render: (h, {row}) => h('p', ID.hideId(row.idNumber))},
{slot: "options"}
]
}
@@ -653,7 +653,7 @@ export default {
},
showFamily(row) {
this.familyInfo = row;
let {birthday} = this.idCardNoUtil.getIdCardInfo(this.familyInfo.idNumber)
let {birthday} = ID.getIdCardInfo(this.familyInfo.idNumber)
this.familyInfo.birthday = birthday
if (this.familyInfo.photo) {
this.familyInfo.imgUrl = this.familyInfo.photo.split(";")[0];