소스 검색

fix: 模式4轨迹丢失问题

zhangjie 10 달 전
부모
커밋
131bbdda70
1개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  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) {
     for (const url of urls) {
       const indexInSliceUrls = urls.indexOf(url) + 1;
       const indexInSliceUrls = urls.indexOf(url) + 1;
       const image = images[indexInSliceUrls - 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({
       sliceImagesWithTrackList.push({
         url,
         url,
-        trackList: [],
-        tagList: [],
+        trackList: thisImageTrackList,
+        tagList: thisImageTagList,
         originalImageWidth: image.naturalWidth,
         originalImageWidth: image.naturalWidth,
         originalImageHeight: image.naturalHeight,
         originalImageHeight: image.naturalHeight,
         width: (image.naturalWidth / maxImageWidth) * 100 + "%",
         width: (image.naturalWidth / maxImageWidth) * 100 + "%",