Browse Source

feat: 分值精度

zhangjie 5 months ago
parent
commit
9041f8e036
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/features/student/studentInspect/MarkBody.vue

+ 2 - 1
src/features/student/studentInspect/MarkBody.vue

@@ -142,6 +142,7 @@ import {
   loadImage,
   loadImage,
   addHeaderTrackColorAttr,
   addHeaderTrackColorAttr,
   calcSumPrecision,
   calcSumPrecision,
+  toPrecision,
 } from "@/utils/utils";
 } from "@/utils/utils";
 import { dragImage } from "@/features/mark/use/draggable";
 import { dragImage } from "@/features/mark/use/draggable";
 import { maxNum } from "@/utils/utils";
 import { maxNum } from "@/utils/utils";
@@ -183,7 +184,7 @@ const objectiveScore = $computed(() => {
   return store.currentTask?.objectiveScore || 0;
   return store.currentTask?.objectiveScore || 0;
 });
 });
 const subjectiveScore = $computed(() => {
 const subjectiveScore = $computed(() => {
-  return totalScore - objectiveScore;
+  return toPrecision(totalScore - objectiveScore);
 });
 });
 
 
 let sliceImagesWithTrackList: SliceImage[] = reactive([]);
 let sliceImagesWithTrackList: SliceImage[] = reactive([]);