chenxiong %!s(int64=3) %!d(string=hai) anos
pai
achega
1b447e505a

+ 16 - 3
pages2/bank/questionBank.vue

@@ -866,11 +866,13 @@ export default {
 					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
 					allScore += item.score;
-					if (item.ques) {
+					if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});
@@ -937,6 +939,7 @@ export default {
 				let number = 0;
 				let score = 0;
 				let doQuestionNum = 0;
+				let doQuestionIds = []; //做过的题目id
 				this.questionList.forEach((item, index) => {
 					if (item.type == 1) {
 						if (item.ques == item.ans) {
@@ -946,6 +949,7 @@ export default {
 
 						if (item.ques) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item.type == 2) {
 						let isRight =
@@ -1001,6 +1005,7 @@ export default {
 						}
 						if (item.ques && item.ques.length) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item.type == 3) {
 						if (item.ques == item.ans) {
@@ -1010,14 +1015,17 @@ export default {
 
 						if (item.ques) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item == 4) {
 						if (item.ques.length) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item.type == 5) {
-						if (item.ques) {
+						if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					}
 				});
@@ -1027,6 +1035,7 @@ export default {
 						examId: this.id,
 						goodsId: this.goodsId,
 						recordId: this.recordId,
+						doQuestionIds:doQuestionIds.join(','),
 						rightQuestionNum: number,
 						moduleExamId:this.moduleId || 0,
 						chapterExamId:this.chapterId || 0,
@@ -1197,8 +1206,10 @@ export default {
 							item.ans = item.answerQuestion;
 						}
 					});
+					
 
 					this.questionList = res.data.data;
+					console.log(this.questionList)
 					this.lastCount = this.questionList.length;
 					this.examRecord();
 					this.getCollectInfo(this.current);
@@ -1565,11 +1576,13 @@ export default {
 					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
 					allScore += item.score;
-					if (item.ques) {
+					if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});

+ 6 - 2
pages2/bank/questionBankContinue.vue

@@ -871,11 +871,13 @@ export default {
 					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
 					allScore += item.score;
-					if (item.ques) {
+					if (item.ques && (item.ques.imageList || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			})
@@ -1122,10 +1124,12 @@ export default {
 				} else if (item.type == 4) {
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
-					if (item.ques) {
+					if (item.ques && (item.ques.imageList || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});

+ 29 - 4
pages2/class/questionBank.vue

@@ -971,6 +971,8 @@ export default {
 			let score = 0; //计算总分
 			let reportStatus = 0;
 			let number = 0;
+			let doQuestionIds = []; //做过的题目id
+			let doQuestionNum = 0;  //做过的题目数量
 			let passScore = 0;
 			let allScore = 0;  //总分
 			this.questionList.forEach((item, index) => {
@@ -984,6 +986,11 @@ export default {
 						
 						item.scoreResult = 0;
 					}
+					
+					if (item.ques) {
+						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
+					}
 					allScore += item.score;
 				} else if (item.type == 2) {
 					let isRight =
@@ -1034,6 +1041,11 @@ export default {
 						score += checkboxScore;
 						
 					}
+					
+					if (item.ques && item.ques.length) {
+						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
+					}
 					allScore += item.score;
 				} else if (item.type == 3) {
 					if (item.ques == item.ans) {
@@ -1044,6 +1056,10 @@ export default {
 						
 						item.scoreResult = 0;
 					}
+					if (item.ques) {
+						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
+					}
 					allScore += item.score;
 				} else {
 					allScore += item.score;
@@ -1066,7 +1082,9 @@ export default {
 					courseId:this.courseId,
 					reportStatus:reportStatus,
 					rightQuestionNum: number,
+					doQuestionNum:doQuestionNum,
 					status: 1,
+					doQuestionIds:doQuestionIds.join(','),
 					gradeId:this.gradeId,
 					performance: score,
 					totalScore: allScore,
@@ -1092,8 +1110,10 @@ export default {
 				let number = 0;
 				let score = 0;
 				let doQuestionNum = 0;
+				let passScore = 0;
 				let reportStatus = 0;
 				this.questionList.forEach((item, index) => {
+					passScore = item.passScore
 					if (item.type == 1) {
 						if (item.ques == item.ans) {
 							score += item.score;
@@ -1174,8 +1194,11 @@ export default {
 					}
 				});
 				
-				if(score >= 60) {
+				//大于分及格
+				if(score >= passScore) {
 					reportStatus = 1
+				} else {
+					reportStatus = 0
 				}
 
 				this.$api
@@ -1648,11 +1671,13 @@ export default {
 					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
 					allScore += item.score;
-					if (item.ques) {
+					if (item.ques && (item.ques.imageList || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});
@@ -1675,9 +1700,9 @@ export default {
 					reportStatus:reportStatus,
 					recordId: this.recordId,
 					courseId:this.courseId,
-					// rightQuestionNum: number,
+					rightQuestionNum: number,
 					status: 1,
-					// doQuestionIds:doQuestionIds.join(','),
+					doQuestionIds:doQuestionIds.join(','),
 					// rightQuestionIds:rightQuestionIds.join(','),
 					// doQuestionNum: doQuestionNum,
 					performance: score,