创建试卷过滤控制,避免其他错误

This commit is contained in:
zyy 2020-01-03 16:43:07 +08:00
parent ad9d14e842
commit 6e0ab142f7

View File

@ -231,8 +231,12 @@ export default {
submitForm() { submitForm() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.form.startDate = this.getDate(this.form.startDate); if (this.form.startDate) {
this.form.endDate = this.getDate(this.form.endDate); 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.form['trial'] = this.trial;
this.$store.dispatch('exam/setCourseDetail', this.form); this.$store.dispatch('exam/setCourseDetail', this.form);
this.$emit('definition', this.form); this.$emit('definition', this.form);