|
@@ -68,7 +68,7 @@ import {
|
|
|
watch,
|
|
|
watchEffect,
|
|
|
} from "vue";
|
|
|
-import { findCurrentTaskMarkResult, getMarkStatus, store } from "./store";
|
|
|
+import { getMarkStatus, store } from "./store";
|
|
|
import filters from "@/filters";
|
|
|
import MarkDrawTrack from "./MarkDrawTrack.vue";
|
|
|
import { ModeEnum, SpecialTag, Track } from "@/types";
|
|
@@ -81,7 +81,6 @@ import {
|
|
|
import { isNumber } from "lodash";
|
|
|
// @ts-ignore
|
|
|
import CustomCursor from "custom-cursor.js";
|
|
|
-
|
|
|
import { dragImage } from "./use/draggable";
|
|
|
|
|
|
interface SliceImage {
|
|
@@ -119,7 +118,7 @@ export default defineComponent({
|
|
|
|
|
|
async function processSliceConfig() {
|
|
|
// check if have MarkResult for currentTask
|
|
|
- let markResult = findCurrentTaskMarkResult();
|
|
|
+ let markResult = store.currentMarkResult;
|
|
|
|
|
|
if (!markResult || !store.currentTask) return;
|
|
|
|
|
@@ -194,7 +193,7 @@ export default defineComponent({
|
|
|
|
|
|
async function processSplitConfig() {
|
|
|
// check if have MarkResult for currentTask
|
|
|
- let markResult = findCurrentTaskMarkResult();
|
|
|
+ let markResult = store.currentMarkResult;
|
|
|
|
|
|
if (!markResult || !store.currentTask) return;
|
|
|
|
|
@@ -272,8 +271,6 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 供回退和清除使用
|
|
|
- // let trackLen = store.currentMarkResult?.trackList.length;
|
|
|
const renderPaperAndMark = async () => {
|
|
|
if (__lock) {
|
|
|
if (store.currentTask?.libraryId === __currentLibraryId) {
|
|
@@ -287,7 +284,7 @@ export default defineComponent({
|
|
|
__currentLibraryId = store.currentTask?.libraryId ?? -1;
|
|
|
sliceImagesWithTrackList.splice(0);
|
|
|
// check if have MarkResult for currentTask
|
|
|
- let markResult = findCurrentTaskMarkResult();
|
|
|
+ let markResult = store.currentMarkResult;
|
|
|
// if (!store.currentTask) {
|
|
|
// sliceImagesWithTrackList.splice(0);
|
|
|
// _studentId = -1;
|
|
@@ -419,7 +416,7 @@ export default defineComponent({
|
|
|
) {
|
|
|
store.currentScore = undefined;
|
|
|
}
|
|
|
- const markResult = findCurrentTaskMarkResult();
|
|
|
+ const markResult = store.currentMarkResult;
|
|
|
if (markResult) {
|
|
|
const maxNumber =
|
|
|
markResult.trackList.length === 0
|
|
@@ -470,7 +467,7 @@ export default defineComponent({
|
|
|
console.log("两个轨迹相距过近");
|
|
|
return;
|
|
|
}
|
|
|
- const markResult = findCurrentTaskMarkResult();
|
|
|
+ const markResult = store.currentMarkResult;
|
|
|
if (markResult) {
|
|
|
markResult.specialTagList.push(track);
|
|
|
}
|
|
@@ -532,7 +529,7 @@ export default defineComponent({
|
|
|
() => store.currentMarkResult?.trackList,
|
|
|
() => {
|
|
|
if (store.setting.mode !== ModeEnum.TRACK) return;
|
|
|
- const markResult = findCurrentTaskMarkResult();
|
|
|
+ const markResult = store.currentMarkResult;
|
|
|
if (markResult && store.currentMarkResult) {
|
|
|
const cq = store.currentQuestion;
|
|
|
// 当无轨迹时,不更新;无轨迹时,将分数置null
|
|
@@ -563,7 +560,7 @@ export default defineComponent({
|
|
|
|
|
|
// question.score更新后,自动关联markResult.scoreList和markResult.markerScore
|
|
|
watchEffect(() => {
|
|
|
- const markResult = findCurrentTaskMarkResult();
|
|
|
+ const markResult = store.currentMarkResult;
|
|
|
|
|
|
if (markResult && store.currentTask) {
|
|
|
const scoreList = store.currentTask.questionList.map((q) => q.score);
|