|
@@ -76,12 +76,12 @@ type MakeTrack = (
|
|
|
// TODO: https://github.com/vuejs/rfcs/discussions/369 defineProps deconstructure retain reactivity
|
|
|
// eslint-disable-next-line vue/no-setup-props-destructure
|
|
|
const {
|
|
|
- useMarkResult = false,
|
|
|
+ hasMarkResultToRender = false,
|
|
|
makeTrack = () => {
|
|
|
console.debug("非评卷界面makeTrack没有意义");
|
|
|
},
|
|
|
} = defineProps<{
|
|
|
- useMarkResult?: boolean;
|
|
|
+ hasMarkResultToRender?: boolean;
|
|
|
makeTrack?: MakeTrack;
|
|
|
}>();
|
|
|
|
|
@@ -149,7 +149,7 @@ let theFinalHeight = 0; // 最终宽度,用来定位轨迹在第几张图片
|
|
|
|
|
|
async function processSliceConfig() {
|
|
|
let markResult = store.currentTask?.markResult as MarkResult;
|
|
|
- if (useMarkResult) {
|
|
|
+ if (hasMarkResultToRender) {
|
|
|
// check if have MarkResult for currentTask
|
|
|
if (!markResult) return;
|
|
|
}
|
|
@@ -192,7 +192,7 @@ async function processSliceConfig() {
|
|
|
);
|
|
|
|
|
|
let trackLists = [] as Array<Track>;
|
|
|
- if (useMarkResult) {
|
|
|
+ if (hasMarkResultToRender) {
|
|
|
trackLists = markResult.trackList;
|
|
|
} else {
|
|
|
trackLists = store.currentTask.questionList
|
|
@@ -207,7 +207,7 @@ async function processSliceConfig() {
|
|
|
);
|
|
|
|
|
|
let tagLists = [] as Array<SpecialTag>;
|
|
|
- if (useMarkResult) {
|
|
|
+ if (hasMarkResultToRender) {
|
|
|
tagLists = markResult.specialTagList ?? [];
|
|
|
} else {
|
|
|
tagLists = store.currentTask.specialTagList ?? [];
|
|
@@ -260,7 +260,7 @@ async function processSliceConfig() {
|
|
|
|
|
|
async function processSplitConfig() {
|
|
|
let markResult = store.currentTask?.markResult as MarkResult;
|
|
|
- if (useMarkResult) {
|
|
|
+ if (hasMarkResultToRender) {
|
|
|
// check if have MarkResult for currentTask
|
|
|
if (!markResult) return;
|
|
|
}
|
|
@@ -329,7 +329,7 @@ async function processSplitConfig() {
|
|
|
);
|
|
|
|
|
|
let trackLists = [] as Array<Track>;
|
|
|
- if (useMarkResult) {
|
|
|
+ if (hasMarkResultToRender) {
|
|
|
trackLists = markResult.trackList;
|
|
|
} else {
|
|
|
// 成绩查询 questionList 可能为空
|
|
@@ -345,7 +345,7 @@ async function processSplitConfig() {
|
|
|
);
|
|
|
|
|
|
let tagLists = [] as Array<SpecialTag>;
|
|
|
- if (useMarkResult) {
|
|
|
+ if (hasMarkResultToRender) {
|
|
|
tagLists = markResult.specialTagList ?? [];
|
|
|
} else {
|
|
|
tagLists = store.currentTask.specialTagList ?? [];
|
|
@@ -409,7 +409,7 @@ const renderPaperAndMark = async () => {
|
|
|
// check if have MarkResult for currentTask
|
|
|
let markResult = store.currentTask?.markResult;
|
|
|
|
|
|
- if ((useMarkResult && !markResult) || !store.currentTask) {
|
|
|
+ if ((hasMarkResultToRender && !markResult) || !store.currentTask) {
|
|
|
renderLock = false;
|
|
|
return;
|
|
|
}
|
|
@@ -485,7 +485,7 @@ let answerPaperScale = $computed(() => {
|
|
|
|
|
|
//#region : 显示评分状态和清除轨迹
|
|
|
let markStatus = $ref("");
|
|
|
-if (useMarkResult) {
|
|
|
+if (hasMarkResultToRender) {
|
|
|
watch(
|
|
|
() => store.currentTask,
|
|
|
() => {
|