清理$calcAge

This commit is contained in:
aixianling
2022-10-14 11:53:24 +08:00
parent 54f1356756
commit e710fc4604
10 changed files with 574 additions and 592 deletions

View File

@@ -33,7 +33,7 @@
:maxLength="15"
placeholder="请输入姓名"
v-model="form.name"
>
<template slot="append" v-if="!isEdit">
<ai-person-select
@@ -765,16 +765,17 @@
<script>
import {mapState} from "vuex";
import {ID} from "dvcp-ui/lib/js/utils";
export default {
name: "Add",
props: {
instance: Function,
dict: Object,
selected: Object
},
computed: {
...mapState(["user"]),
...mapState(["user"]),
isEdit() {
return !!this.$route.query.id;
},
@@ -938,10 +939,10 @@ export default {
this.isShowDisciplinaryForm = true;
},
idChange(val) {
let info = this.idCardNoUtil.getIdCardInfo(val)
let info = new ID(val)
this.form.sex = info.sex || "";
this.form.birthday = info.birthday || "";
this.form.age = this.$calcAge(val) || "";
this.form.age = info.age
},
checkName(val) {
for (let i in this.form) {