From 6e0ab142f7abf4c6f1af59cfff862d4b1d06d0c4 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 3 Jan 2020 16:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=AF=95=E5=8D=B7=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=8E=A7=E5=88=B6=EF=BC=8C=E9=81=BF=E5=85=8D=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/publish/examRule/draft/examFrom.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/publish/examRule/draft/examFrom.vue b/src/views/publish/examRule/draft/examFrom.vue index 3aef4c25c..5528e74b7 100644 --- a/src/views/publish/examRule/draft/examFrom.vue +++ b/src/views/publish/examRule/draft/examFrom.vue @@ -231,8 +231,12 @@ export default { submitForm() { this.$refs['form'].validate((valid) => { if (valid) { - this.form.startDate = this.getDate(this.form.startDate); - this.form.endDate = this.getDate(this.form.endDate); + if (this.form.startDate) { + this.form.startDate = this.getDate(this.form.startDate); + } + if (this.form.endDate) { + this.form.endDate = this.getDate(this.form.endDate); + } this.form['trial'] = this.trial; this.$store.dispatch('exam/setCourseDetail', this.form); this.$emit('definition', this.form);