清理idCardNoUtils,改使用ID对象
This commit is contained in:
		| @@ -62,6 +62,7 @@ | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
| import AddVaccination from "./addVaccination"; | ||||
| import {ID} from "dvcp-ui/lib/js/utils"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppVaccination", | ||||
| @@ -108,7 +109,7 @@ export default { | ||||
|         {label: "出生日期", prop: "birthday", align: 'center'}, | ||||
|         { | ||||
|           label: "身份证号", width: "160px", align: 'center', | ||||
|           render: (h, {row}) => h('span', null, this.idCardNoUtil.hideId(row.idNumber)) | ||||
|           render: (h, {row}) => h('span', null, ID.hideId(row.idNumber)) | ||||
|         }, | ||||
|         {label: "所属地区", prop: "areaName", align: 'center'}, | ||||
|         {label: "住址", prop: "address", width: "200px", align: 'center'}, | ||||
|   | ||||
| @@ -82,6 +82,7 @@ | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
| import {ID} from "dvcp-ui/lib/js/utils"; | ||||
|  | ||||
| export default { | ||||
|   name: "addVaccination", | ||||
| @@ -183,9 +184,9 @@ export default { | ||||
|       this.form = {...this.form, name, idNumber, phone, areaId, address} | ||||
|     }, | ||||
|     getInfoByIdNumber(code) { | ||||
|       if (this.idCardNoUtil.checkIdCardNo(code)) { | ||||
|         let info = this.idCardNoUtil.getIdCardInfo(code) | ||||
|         this.form.sex = this.dict.getValue('sex', info.gender) | ||||
|       if (ID.check(code)) { | ||||
|         let info = new ID(code) | ||||
|         this.form.sex = info.sex | ||||
|         this.form.birthday = info.birthday | ||||
|         this.$forceUpdate() | ||||
|       } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user