瀏覽代碼

feat: 分值精度

zhangjie 5 月之前
父節點
當前提交
9041f8e036
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/features/student/studentInspect/MarkBody.vue

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

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