|
@@ -332,8 +332,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (
|
|
|
- row.answer &&
|
|
|
- row.objectivePolicyScore * row.answer.length > row.totalScore
|
|
|
+ row.optionCount &&
|
|
|
+ row.objectivePolicyScore * row.optionCount > row.totalScore
|
|
|
) {
|
|
|
row.objectivePolicyError = "分值过大";
|
|
|
return;
|
|
@@ -353,12 +353,10 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
objectivePolicyChange(row) {
|
|
|
- const { totalScore, answer, objectivePolicy } = row;
|
|
|
+ const { totalScore, optionCount, objectivePolicy } = row;
|
|
|
if (objectivePolicy === "LEAK") {
|
|
|
- if (answer) {
|
|
|
- const answerCount = answer.length;
|
|
|
- const pickScore = Math.floor((totalScore * 2) / answerCount) / 2;
|
|
|
-
|
|
|
+ if (optionCount) {
|
|
|
+ const pickScore = Math.floor((totalScore * 2) / optionCount) / 2;
|
|
|
row.objectivePolicyScore = pickScore;
|
|
|
} else {
|
|
|
row.objectivePolicyScore = undefined;
|