From 1369d6a202497b89ce0e3e23e8d08d2936c5feb7 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 30 Jun 2022 15:28:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B8=E9=85=B8=E6=A3=80=E6=B5=8B=E7=82=B9?= =?UTF-8?q?=E3=80=81=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D=E7=82=B9=20PC=20?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icpointvaccinesinoculation-add-or-update.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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 763ad21f..93573015 100644 --- a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue +++ b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue @@ -185,7 +185,7 @@ export default { moEndTime: "", afStartTime: "", afEndTime: "", - noAvailableVaccines: "1", + noAvailableVaccines: '1', mobile: "", address: "", longitude: "120.38945519", @@ -216,7 +216,7 @@ export default { ], inoculationDate: [ { - required: true, + required: this.dataForm.noAvailableVaccines === '2', message: this.$t("validate.required"), trigger: "blur", }, @@ -479,8 +479,10 @@ export default { ...this.dataForm, ...res.data, }; - this.morningTime = [res.data.moStartTime,res.data.moEndTime] - this.afterTime = [res.data.afStartTime,res.data.afEndTime] + if(res.data.moStartTime !== ''){ + this.morningTime = [res.data.moStartTime,res.data.moEndTime] + this.afterTime = [res.data.afStartTime,res.data.afEndTime] + } if(!this.dataForm.longitude && !this.dataForm.latitude){ this.dataForm.longitude = "120.38945519" this.dataForm.latitude = "36.0722275" @@ -496,11 +498,11 @@ export default { if (!valid) { return false; } - if(this.morningTime === null && this.dataForm.noAvailableVaccines !== '1'){ + if(this.morningTime === null && this.dataForm.noAvailableVaccines === '2'){ this.$message.error('请填写上午接种时间'); return false } - if(this.afterTime === null && this.dataForm.noAvailableVaccines !== '1'){ + if(this.afterTime === null && this.dataForm.noAvailableVaccines === '2'){ this.$message.error('请填写下午接种时间'); return false }