Explorar o código

fix: 模式4轨迹丢失问题

zhangjie hai 10 meses
pai
achega
131bbdda70
Modificáronse 1 ficheiros con 16 adicións e 2 borrados
  1. 16 2
      src/features/student/studentInspect/MarkBody.vue

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

@@ -265,10 +265,24 @@ async function processImage() {
     for (const url of urls) {
       const indexInSliceUrls = urls.indexOf(url) + 1;
       const image = images[indexInSliceUrls - 1];
+      const thisImageTrackList = trackLists.filter(
+        (t) => t.offsetIndex === indexInSliceUrls
+      );
+      const thisImageTagList = store.currentTask.headerTagList?.length
+        ? addHeaderTrackColorAttr(
+            (store.currentTask.headerTagList || []).filter(
+              (t) => t.offsetIndex === indexInSliceUrls
+            )
+          )
+        : addTagColorAttr(
+            (store.currentTask.specialTagList || []).filter(
+              (t) => t.offsetIndex === indexInSliceUrls
+            )
+          );
       sliceImagesWithTrackList.push({
         url,
-        trackList: [],
-        tagList: [],
+        trackList: thisImageTrackList,
+        tagList: thisImageTagList,
         originalImageWidth: image.naturalWidth,
         originalImageHeight: image.naturalHeight,
         width: (image.naturalWidth / maxImageWidth) * 100 + "%",