From 9c055e263e54c06a0dd387ca455b76b5f91aae61 Mon Sep 17 00:00:00 2001 From: 123456 <17862666717> Date: Fri, 24 Jun 2022 17:15:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...pointvaccinesinoculation-add-or-update.vue | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue index e3430eea..b7b781a9 100644 --- a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue +++ b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue @@ -39,11 +39,11 @@ > - + - + 0) { - let hour_0 = Number(this.startTime[0].substring(0, 2)); - let hour_1 = Number(this.startTime[1].substring(0, 2)); + if (Array.isArray(this.morningTime) && this.morningTime.length > 0) { + let hour_0 = Number(this.morningTime[0].substring(0, 2)); + let hour_1 = Number(this.morningTime[1].substring(0, 2)); if (hour_0 >= 12 || hour_1 >= 12) { this.$message.error("请选择00:00-11:59时间段的时间"); - this.startTime = null; + this.morningTime = null; return false; } - this.dataForm.moStartTime = this.startTime[0]; - this.dataForm.moEndTime = this.startTime[1]; + this.dataForm.moStartTime = this.morningTime[0]; + this.dataForm.moEndTime = this.morningTime[1]; } }, endTimeChange() { - if (Array.isArray(this.endTime) && this.endTime.length > 0) { - let hour_0 = Number(this.endTime[0].substring(0, 2)); - let hour_1 = Number(this.endTime[1].substring(0, 2)); + if (Array.isArray(this.afterTime) && this.afterTime.length > 0) { + let hour_0 = Number(this.afterTime[0].substring(0, 2)); + let hour_1 = Number(this.afterTime[1].substring(0, 2)); if (hour_0 < 12 || hour_1 < 12) { this.$message.error("请选择12:00-23:59时间段的时间"); - this.endTime = null; + this.afterTime = null; return false; } - this.dataForm.afStartTime = this.endTime[0]; - this.dataForm.afEndTime = this.endTime[1]; + this.dataForm.afStartTime = this.afterTime[0]; + this.dataForm.afEndTime = this.afterTime[1]; } }, closeSubmit() { @@ -435,8 +435,8 @@ export default { ...this.dataForm, ...res.data, }; - this.startTime = [res.data.moStartTime,res.data.moEndTime] - this.endTime = [res.data.afStartTime,res.data.afEndTime] + this.morningTime = [res.data.moStartTime,res.data.moEndTime] + this.afterTime = [res.data.afStartTime,res.data.afEndTime] this.initMap(); }) .catch(() => {}); @@ -448,11 +448,11 @@ export default { if (!valid) { return false; } - if(this.startTime === null){ + if(this.morningTime === null){ this.$message.error('请填写上午接种时间'); return false } - if(this.endTime === null ){ + if(this.afterTime === null ){ this.$message.error('请填写下午接种时间'); return false }