清理idCardNoUtils,改使用ID对象
This commit is contained in:
@@ -113,6 +113,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {ID} from "dvcp-ui/lib/js/utils";
|
||||
|
||||
export default {
|
||||
name: 'Add',
|
||||
@@ -137,7 +138,7 @@ export default {
|
||||
|
||||
let IdNumberPass = (rule, value, callback) => {
|
||||
if (value) {
|
||||
if (this.idCardNoUtil.checkIdCardNo(value)) {
|
||||
if (ID.check(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('身份证号格式错误'))
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {ID} from "dvcp-ui/lib/js/utils";
|
||||
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
@@ -66,14 +68,13 @@
|
||||
tabTitle: ['人员信息', '走访记录'],
|
||||
info: {},
|
||||
list: [],
|
||||
idNumberInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
|
||||
|
||||
this.dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
|
||||
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel',
|
||||
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive','isReflection','yesOrNo').then(() => {
|
||||
@@ -84,13 +85,14 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
computed:{
|
||||
idNumberInfo:v=>new ID(v.info.idNumber)
|
||||
},
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appspecialdisabled/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.idNumberInfo = this.idCardNoUtil.getIdCardInfo(res.data.idNumber)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user