刘洋 2 年之前
父节点
当前提交
bae772f42f
共有 2 个文件被更改,包括 9 次插入10 次删除
  1. 7 9
      src/features/mark/MarkBoardTrack.vue
  2. 2 1
      src/features/mark/use/focusTracks.ts

+ 7 - 9
src/features/mark/MarkBoardTrack.vue

@@ -144,10 +144,10 @@
                 定位
               </div>
             </div>
-            <div v-if="!!question.questionName">
+            <div v-if="!!question.questionName" @click="positioning(question)">
               {{ question.questionName }}
             </div>
-            <div v-else>
+            <div v-else @click="positioning(question)">
               {{ question.title }} {{ question.mainNumber }}-{{
                 question.subNumber
               }}
@@ -303,13 +303,11 @@ const rightBlur = () => {
   removeFocusTrack();
 };
 const positioning = (question: Question) => {
-  addFocusTrack(
-    undefined,
-    question.mainNumber,
-    question.subNumber,
-    true,
-    sliceImagesWithTrackListCopy.value
-  );
+  let list =
+    store.getMarkStatus === "正评" || store.getMarkStatus === "试评"
+      ? sliceImagesWithTrackListCopy.value
+      : undefined;
+  addFocusTrack(undefined, question.mainNumber, question.subNumber, true, list);
   activeRightMenuItem.value = null;
 };
 watch(topPercent, () => {

+ 2 - 1
src/features/mark/use/focusTracks.ts

@@ -1,4 +1,5 @@
 import { store } from "@/store/store";
+import { unref } from "vue";
 
 let hovering = false;
 let timeoutId = -1;
@@ -27,7 +28,7 @@ function _addFocusTrack(
   list?: any
 ) {
   store.focusTracks.splice(0);
-  if (list) {
+  if (unref(list)) {
     const trackList: any = list.map((q) => q.trackList).flat();
 
     trackList