|
@@ -171,11 +171,21 @@ export default function useMakeTrack() {
|
|
markStore.currentQuestion = question;
|
|
markStore.currentQuestion = question;
|
|
const markResult = markStore.currentTaskEnsured.markResult;
|
|
const markResult = markStore.currentTaskEnsured.markResult;
|
|
markResult.scoreList[question.__index] = score;
|
|
markResult.scoreList[question.__index] = score;
|
|
- const questionTrack = markResult.markerTrackList.find(
|
|
|
|
|
|
+ const questionTracks = markResult.markerTrackList.filter(
|
|
(t) =>
|
|
(t) =>
|
|
t.mainNumber === question.mainNumber &&
|
|
t.mainNumber === question.mainNumber &&
|
|
t.subNumber === question.subNumber
|
|
t.subNumber === question.subNumber
|
|
);
|
|
);
|
|
|
|
+ // 多于一个轨迹时,删除全部轨迹,重新生成轨迹
|
|
|
|
+ if (questionTracks.length > 1) {
|
|
|
|
+ markResult.markerTrackList = markResult.markerTrackList.filter(
|
|
|
|
+ (t) =>
|
|
|
|
+ t.mainNumber !== question.mainNumber ||
|
|
|
|
+ t.subNumber !== question.subNumber
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const questionTrack = questionTracks.length > 1 ? null : questionTracks[0];
|
|
// 存在轨迹时直接使用已有的轨迹位置
|
|
// 存在轨迹时直接使用已有的轨迹位置
|
|
if (questionTrack) {
|
|
if (questionTrack) {
|
|
questionTrack.score = score;
|
|
questionTrack.score = score;
|