diff --git a/client/src/views/exam/testPaperCreate.vue b/client/src/views/exam/testPaperCreate.vue index 6a60a5e..a4e3e2c 100644 --- a/client/src/views/exam/testPaperCreate.vue +++ b/client/src/views/exam/testPaperCreate.vue @@ -10,7 +10,29 @@ 分钟 - + + + + + + + + + + + + + + +
单选题 {{Form.danxuan_count}} 道 @@ -34,6 +56,31 @@ {{Form.total_score}}
+ +
+ 单选题 + 道 + 每道 + 分 +
+
+ 多选题 + 道 + 每道 + 分 +
+
+ 判断题 + 道 + 每道 + 分 +
+
+ 总分数 + + {{ totalScore }} +
+
@@ -45,7 +92,7 @@ - +
选择试题 @@ -131,7 +178,9 @@ name: "", // workscope: null, limit: 60, + paper_types:"", total_score: 0, + category:[], pass_score: 60, questions_: [], danxuan_score: 2, @@ -172,6 +221,15 @@ watch: { questions: "calScore" }, + computed:{ + totalScore(){ + return( + this.Form.danxuan_score * this.Form.danxuan_count + + this.Form.duoxuan_score * this.Form.duoxuan_count + + this.Form.panduan_score * this.Form.panduan_count + ); + }, + }, created() { this.getQuestioncat(); }, @@ -222,6 +280,11 @@ this.$refs[formName].validate(valid => { if (valid) { this.submitLoding = true; + if (this.Form.paper_types == 'false'){ + this.Form.paper_types = '抽考'; + this.Form.total_score = this.totalScore; + }else{this.Form.paper_types = '押题'}; + createPaper(this.Form).then(response => { this.submitLoding = false; this.$message({ diff --git a/client/src/views/system/userExam.vue b/client/src/views/system/userExam.vue index a31eb2d..67c2b61 100644 --- a/client/src/views/system/userExam.vue +++ b/client/src/views/system/userExam.vue @@ -520,7 +520,7 @@ export default { updateUser(this.user.id, this.user).then((res) => { if (res.code >= 200) { this.getList(); - this.dialogVisible = true; + this.dialogVisible = false; this.impForm.file = '' this.$message.success("成功"); };