From 39bc75b0a19d2d6b066f302ad7f11cf488e2ebf2 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Fri, 6 May 2022 17:55:25 +0800 Subject: [PATCH] 29497 --- src/apps/AppInfotainment/AppInfotainment.vue | 4 +++- src/apps/AppMonitoringObject/Add.vue | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/apps/AppInfotainment/AppInfotainment.vue b/src/apps/AppInfotainment/AppInfotainment.vue index d9ec456b..cf637f9a 100644 --- a/src/apps/AppInfotainment/AppInfotainment.vue +++ b/src/apps/AppInfotainment/AppInfotainment.vue @@ -50,7 +50,9 @@ export default { categoryType: '1', } }).then((res)=>{ - this.list = this.current == 1? res.data.records:[...this.list,...res.data.records,] + if (res?.data) { + this.list = this.current == 1? res.data.records:[...this.list,...res.data.records,] + } }) }, toNewList(id,categoryName) { diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index 754094b8..43c417f0 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -525,8 +525,10 @@ export default { let {name, idNumber, currentAreaId, currentAreaName} = v?.[0] || {} this.form = {...this.form, name, idNumber, currentAreaId, currentAreaName} this.form.sex = this.$idCardNoUtil.getIdCardInfo(idNumber)?.sex - this.form.birthday = this.$idCardNoUtil.getIdCardInfo(idNumber)?.birthday + // this.form.birthday = this.$idCardNoUtil.getIdCardInfo(idNumber)?.birthday this.form.age = this.$calcAge(this.form.idNumber) + let birth = idNumber.substr(6,8) + this.form.birthday = birth.replace(/(.{4})(.{2})/,"$1-$2-"); }, deep: true, },