|
|
@@ -495,8 +495,25 @@ export default {
|
|
|
if (!exam_answer) return;
|
|
|
this.bookAnswerContent = exam_answer.content;
|
|
|
this.duration = exam_answer.duration;
|
|
|
- this.rightNumber = exam_answer.count_right;
|
|
|
- this.errorNumber = exam_answer.count_error;
|
|
|
+ // this.rightNumber = exam_answer.count_right;
|
|
|
+ // this.errorNumber = exam_answer.count_error;
|
|
|
+ let userErrorNumberTotal = 0;
|
|
|
+ let userRightNumberTotal = 0;
|
|
|
+ let errReg = /\[JUDGE##F##JUDGE\]/g;
|
|
|
+ let rightReg = /\[JUDGE##T##JUDGE\]/g;
|
|
|
+ if (errReg.test(this.bookAnswerContent)) {
|
|
|
+ let errorArr =
|
|
|
+ this.bookAnswerContent.match(/\[JUDGE##F##JUDGE\]/g);
|
|
|
+ userErrorNumberTotal = errorArr.length;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rightReg.test(this.bookAnswerContent)) {
|
|
|
+ let rightArr =
|
|
|
+ this.bookAnswerContent.match(/\[JUDGE##T##JUDGE\]/g);
|
|
|
+ userRightNumberTotal = rightArr.length;
|
|
|
+ }
|
|
|
+ this.rightNumber = userRightNumberTotal;
|
|
|
+ this.errorNumber = userErrorNumberTotal;
|
|
|
} else {
|
|
|
this.loading = false;
|
|
|
}
|