From 49b6c428b3e77b85ff7c8a7062575a280c8bf117 Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 25 Nov 2022 11:50:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=A1=E5=8F=A3=E7=99=BB=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pingchang/AppCheckpointRegistration/Edit.vue | 7 +++++-- .../pingchang/AppCommunityManagement/Edit.vue | 13 ++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/project/pingchang/AppCheckpointRegistration/Edit.vue b/src/project/pingchang/AppCheckpointRegistration/Edit.vue index 29fe416e..67e97eae 100644 --- a/src/project/pingchang/AppCheckpointRegistration/Edit.vue +++ b/src/project/pingchang/AppCheckpointRegistration/Edit.vue @@ -187,14 +187,17 @@ export default { this.$http.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${this.id}`).then((res) => { if (res.code == 0) { this.form = res.data - this.travelType = res.data.travelType?.split(',') || [] + if(res.data.travelType) { + this.travelType = res.data.travelType?.split(',') + } + if(res.data.startTime) { this.form.startTime = res.data.startTime.substring(0, 16) } if(res.data.arriveTime) { this.form.arriveTime = res.data.arriveTime.substring(0, 16) } - console.log(this.form) + console.log(this.travelType) } }) }, diff --git a/src/project/pingchang/AppCommunityManagement/Edit.vue b/src/project/pingchang/AppCommunityManagement/Edit.vue index dc8100ce..08d92f66 100644 --- a/src/project/pingchang/AppCommunityManagement/Edit.vue +++ b/src/project/pingchang/AppCommunityManagement/Edit.vue @@ -255,9 +255,16 @@ export default { this.$http.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${this.id}`).then((res) => { if (res.code == 0) { this.form = res.data - this.travelType = res.data.travelType?.split(',') - this.form.startTime = res.data.startTime.substr(0, res.data.startTime.length - 3) - this.form.arriveTime = res.data.arriveTime.substr(0, res.data.arriveTime.length - 3) + if(res.data.travelType) { + this.travelType = res.data.travelType?.split(',') + } + + if(res.data.startTime) { + this.form.startTime = res.data.startTime.substring(0, 16) + } + if(res.data.arriveTime) { + this.form.arriveTime = res.data.arriveTime.substring(0, 16) + } } }) },