|
@@ -379,12 +379,40 @@ const questionScore = $computed(
|
|
|
store.currentTask.markResult.scoreList[store.currentQuestion.__index]
|
|
|
);
|
|
|
|
|
|
+// const questionScoreSteps = $computed(() => {
|
|
|
+// const question = store.currentQuestion;
|
|
|
+// if (!question) return [];
|
|
|
+
|
|
|
+// const remainScore =
|
|
|
+// Math.round(question.maxScore * 100 - (questionScore || 0) * 100) / 100;
|
|
|
+
|
|
|
+// const steps = [];
|
|
|
+// if (question.intervalScore <= 0) {
|
|
|
+// console.warn(`question.intervalScore got: ${question.intervalScore}`);
|
|
|
+// }
|
|
|
+// for (
|
|
|
+// let i = 0;
|
|
|
+// i <= remainScore && question.intervalScore > 0;
|
|
|
+// i = Math.round(i * 100 + question.intervalScore * 100) / 100
|
|
|
+// ) {
|
|
|
+// steps.push(i);
|
|
|
+// }
|
|
|
+// if (
|
|
|
+// Math.round(remainScore * 100) % Math.round(question.intervalScore * 100) !==
|
|
|
+// 0
|
|
|
+// ) {
|
|
|
+// steps.push(remainScore);
|
|
|
+// }
|
|
|
+
|
|
|
+// return steps;
|
|
|
+// });
|
|
|
+
|
|
|
const questionScoreSteps = $computed(() => {
|
|
|
const question = store.currentQuestion;
|
|
|
if (!question) return [];
|
|
|
|
|
|
const remainScore =
|
|
|
- Math.round(question.maxScore * 100 - (questionScore || 0) * 100) / 100;
|
|
|
+ Math.round(question.maxScore * 1000 - (questionScore || 0) * 1000) / 1000;
|
|
|
|
|
|
const steps = [];
|
|
|
if (question.intervalScore <= 0) {
|
|
@@ -393,12 +421,13 @@ const questionScoreSteps = $computed(() => {
|
|
|
for (
|
|
|
let i = 0;
|
|
|
i <= remainScore && question.intervalScore > 0;
|
|
|
- i = Math.round(i * 100 + question.intervalScore * 100) / 100
|
|
|
+ i = Math.round(i * 1000 + question.intervalScore * 1000) / 1000
|
|
|
) {
|
|
|
steps.push(i);
|
|
|
}
|
|
|
if (
|
|
|
- Math.round(remainScore * 100) % Math.round(question.intervalScore * 100) !==
|
|
|
+ Math.round(remainScore * 1000) %
|
|
|
+ Math.round(question.intervalScore * 1000) !==
|
|
|
0
|
|
|
) {
|
|
|
steps.push(remainScore);
|
|
@@ -530,7 +559,7 @@ function clearLatestMarkOfCurrentQuetion() {
|
|
|
? null
|
|
|
: ts
|
|
|
.map((t) => t.score)
|
|
|
- .reduce((acc, v) => (acc += Math.round(v * 100)), 0) / 100;
|
|
|
+ .reduce((acc, v) => (acc += Math.round(v * 1000)), 0) / 1000;
|
|
|
}
|
|
|
|
|
|
function clearAllMarksOfCurrentQuetion() {
|