From 2114486851ccd752ee2874659b68bd1a66a561fb Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 21 Feb 2023 16:07:16 +0800 Subject: [PATCH] bug --- .../app/AppExaminationManage/components/Add.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/project/qujing/app/AppExaminationManage/components/Add.vue b/project/qujing/app/AppExaminationManage/components/Add.vue index 1b8503f5..3b02c338 100644 --- a/project/qujing/app/AppExaminationManage/components/Add.vue +++ b/project/qujing/app/AppExaminationManage/components/Add.vue @@ -100,9 +100,6 @@ :pager-count="7" @size-change="getList" @current-change="getList"> - @@ -341,6 +338,16 @@ if (valid) { let subjectNumber = 0 let eachScore = 0 + + for (let i = 0; i < this.form.assessments.length; i++) { + if (!this.form.assessments[i].upCondition) { + return this.$message.error(`${this.dict.getLabel('qjEAType', this.form.assessments[i].assessmentType)}不能为空`) + } + if (!this.form.assessments[i].upScore && this.form.assessments[i].upScore !== '0') { + return this.$message.error(`${this.dict.getLabel('qjEAType', this.form.assessments[i].assessmentType)}分值不能为空`) + } + } + this.form.subjectConfigs.forEach(v => { eachScore = Number(v.eachScore) + eachScore subjectNumber = Number(v.subjectNumber) + subjectNumber