diff --git a/src/project/pingchang/AppCheckpointRegistration/Edit.vue b/src/project/pingchang/AppCheckpointRegistration/Edit.vue index 6b876046..29fe416e 100644 --- a/src/project/pingchang/AppCheckpointRegistration/Edit.vue +++ b/src/project/pingchang/AppCheckpointRegistration/Edit.vue @@ -142,15 +142,15 @@ export default { }, methods: { submit() { - if(!this.travelType.length) { - return this.$u.toast('请选择出行方式') - } if(!this.form.startTime) { return this.$u.toast('请选择出发时间') } if(!this.form.startAreaId) { return this.$u.toast('请选择出发地') } + if(!this.travelType.length) { + return this.$u.toast('请选择出行方式') + } if(!this.form.arriveTime) { return this.$u.toast('请选择抵平时间') } @@ -160,7 +160,7 @@ export default { this.form.startTime = this.form.startTime + ':00' this.form.arriveTime = this.form.arriveTime + ':00' - this.form.travelType = this.travelType.join(',') + this.travelType = this.travelType.join(',') this.$http.post(`/app/appepidemicpreventionregisterinfo/updateForAdmin`, this.form).then((res) => { if (res.code == 0) { this.$u.toast('提交成功') @@ -187,9 +187,14 @@ 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) + 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) } }) }, diff --git a/src/project/pingchang/AppCheckpointRegistration/ManagementContent.vue b/src/project/pingchang/AppCheckpointRegistration/ManagementContent.vue index a52aa893..0d57c07b 100644 --- a/src/project/pingchang/AppCheckpointRegistration/ManagementContent.vue +++ b/src/project/pingchang/AppCheckpointRegistration/ManagementContent.vue @@ -7,7 +7,7 @@