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, },