|
@@ -1139,6 +1139,7 @@ export default {
|
|
|
let passScore = 0;
|
|
|
let doWrongQuestionIds = []; //错题和未做题id(客观题)
|
|
|
let doQuestionIds = []; //做过的题目id
|
|
|
+ let lessQuestionNum = 0;
|
|
|
let rightQuestionIds = []; //做对的题目id
|
|
|
this.questionList.forEach((item, index) => {
|
|
|
// passScore = item.passScore
|
|
@@ -1152,7 +1153,9 @@ export default {
|
|
|
} else {
|
|
|
//错误
|
|
|
item.scoreResult = 0;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ if (item.ques) {
|
|
|
+ doWrongQuestionIds.push(item.questionId);
|
|
|
+ }
|
|
|
}
|
|
|
allScore += item.score;
|
|
|
if (item.ques) {
|
|
@@ -1176,7 +1179,8 @@ export default {
|
|
|
item.scoreResult = item.score;
|
|
|
rightQuestionIds.push(item.questionId);
|
|
|
} else {
|
|
|
- let checkboxScore = item.score; //获取单题总分数
|
|
|
+ let hasPart = false;
|
|
|
+ let checkboxScore = 1; //获取单题总分数
|
|
|
item.ques &&
|
|
|
item.ques.forEach((ques, quesIndex) => {
|
|
|
//选错一个全扣
|
|
@@ -1192,11 +1196,13 @@ export default {
|
|
|
|
|
|
//没选错
|
|
|
if (checkboxScore) {
|
|
|
+ checkboxScore = 0;
|
|
|
item.ans.forEach((ans, quesIndex) => {
|
|
|
//漏选只能得部分分数
|
|
|
if (item.ques) {
|
|
|
if (item.ques.indexOf(item.ans[quesIndex]) == -1) {
|
|
|
- checkboxScore = item.partScore;
|
|
|
+ checkboxScore = +item.partScore;
|
|
|
+ hasPart = true;
|
|
|
}
|
|
|
} else {
|
|
|
checkboxScore = 0;
|
|
@@ -1204,14 +1210,17 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- if (checkboxScore <= 0) {
|
|
|
+ if (!hasPart) {
|
|
|
//0分
|
|
|
item.scoreResult = 0;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ if (item.ques) {
|
|
|
+ doWrongQuestionIds.push(item.questionId);
|
|
|
+ }
|
|
|
} else {
|
|
|
//部分分
|
|
|
// number++;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ lessQuestionNum++;
|
|
|
+ // doWrongQuestionIds.push(item.questionId);
|
|
|
item.scoreResult = checkboxScore;
|
|
|
score += checkboxScore;
|
|
|
// rightQuestionIds.push(item.questionId)
|
|
@@ -1230,7 +1239,9 @@ export default {
|
|
|
rightQuestionIds.push(item.questionId);
|
|
|
} else {
|
|
|
item.scoreResult = 0;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ if (item.ques) {
|
|
|
+ doWrongQuestionIds.push(item.questionId);
|
|
|
+ }
|
|
|
}
|
|
|
allScore += item.score;
|
|
|
if (item.ques) {
|
|
@@ -1269,6 +1280,7 @@ export default {
|
|
|
recordId: this.recordId,
|
|
|
rightQuestionNum: number,
|
|
|
status: 1,
|
|
|
+ lessQuestionNum:lessQuestionNum,
|
|
|
moduleExamId: this.moduleId || 0,
|
|
|
chapterExamId: this.chapterId || 0,
|
|
|
doQuestionIds: doQuestionIds.join(","),
|
|
@@ -1342,7 +1354,7 @@ export default {
|
|
|
score += item.score;
|
|
|
number++;
|
|
|
} else {
|
|
|
- let checkboxScore = item.score; //获取单题总分数
|
|
|
+ let checkboxScore = 1; //获取单题总分数
|
|
|
item.ques &&
|
|
|
item.ques.forEach((ques, quesIndex) => {
|
|
|
//选错一个全扣
|
|
@@ -1934,6 +1946,7 @@ export default {
|
|
|
let passScore = 0;
|
|
|
let doWrongQuestionIds = []; //错题和未做题id(客观题)
|
|
|
let doQuestionIds = []; //做过的题目id
|
|
|
+ let lessQuestionNum = 0;
|
|
|
let rightQuestionIds = []; //做对的题目id
|
|
|
this.questionList.forEach((item, index) => {
|
|
|
passScore = item.passScore;
|
|
@@ -1947,7 +1960,9 @@ export default {
|
|
|
} else {
|
|
|
//错误
|
|
|
item.scoreResult = 0;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ if (item.ques) {
|
|
|
+ doWrongQuestionIds.push(item.questionId);
|
|
|
+ }
|
|
|
}
|
|
|
allScore += item.score;
|
|
|
if (item.ques) {
|
|
@@ -1971,7 +1986,8 @@ export default {
|
|
|
item.scoreResult = item.score;
|
|
|
rightQuestionIds.push(item.questionId);
|
|
|
} else {
|
|
|
- let checkboxScore = item.score; //获取单题总分数
|
|
|
+ let hasPart = false;
|
|
|
+ let checkboxScore = 1; //获取单题总分数
|
|
|
item.ques &&
|
|
|
item.ques.forEach((ques, quesIndex) => {
|
|
|
//选错一个全扣
|
|
@@ -1992,6 +2008,7 @@ export default {
|
|
|
if (item.ques) {
|
|
|
if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
|
|
|
checkboxScore += item.partScore;
|
|
|
+ hasPart = true;
|
|
|
}
|
|
|
} else {
|
|
|
checkboxScore = 0;
|
|
@@ -1999,14 +2016,17 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- if (checkboxScore <= 0) {
|
|
|
+ if (!hasPart) {
|
|
|
//0分
|
|
|
item.scoreResult = 0;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ if (item.ques) {
|
|
|
+ doWrongQuestionIds.push(item.questionId);
|
|
|
+ }
|
|
|
} else {
|
|
|
//部分分
|
|
|
// number++;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ lessQuestionNum++
|
|
|
+ // doWrongQuestionIds.push(item.questionId);
|
|
|
item.scoreResult = checkboxScore;
|
|
|
score += checkboxScore;
|
|
|
// rightQuestionIds.push(item.questionId)
|
|
@@ -2025,7 +2045,9 @@ export default {
|
|
|
rightQuestionIds.push(item.questionId);
|
|
|
} else {
|
|
|
item.scoreResult = 0;
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
+ if (item.ques) {
|
|
|
+ doWrongQuestionIds.push(item.questionId);
|
|
|
+ }
|
|
|
}
|
|
|
allScore += item.score;
|
|
|
if (item.ques) {
|
|
@@ -2064,6 +2086,7 @@ export default {
|
|
|
rightQuestionNum: number,
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
status: 1,
|
|
|
+ lessQuestionNum:lessQuestionNum,
|
|
|
moduleExamId: this.moduleId || 0,
|
|
|
chapterExamId: this.chapterId || 0,
|
|
|
doQuestionIds: doQuestionIds.join(","),
|