Эх сурвалжийг харах

fix: 主观题复核轨迹清除问题

zhangjie 11 сар өмнө
parent
commit
b880937508
1 өөрчлөгдсөн 7 нэмэгдсэн , 1 устгасан
  1. 7 1
      src/store/store.ts

+ 7 - 1
src/store/store.ts

@@ -188,7 +188,13 @@ export const initMarkStore = () => {
           studentId: studentId,
           spent: 0,
 
-          trackList: task.questionList.map((q) => q.trackList).flat(),
+          trackList: task.questionList
+            .map((q) =>
+              q.headerTrack && q.headerTrack.length
+                ? q.headerTrack
+                : q.trackList
+            )
+            .flat(),
           specialTagList: [...(task.specialTagList ?? [])],
           scoreList: task.questionList.map((q) => q.score),
           markerScore: null, // 后期通过 scoreList 自动更新