|
@@ -1,12 +1,11 @@
|
|
|
<template>
|
|
|
<div
|
|
|
v-if="store.currentTask"
|
|
|
- class="mark-board-track-container tw-flex tw-flex-col"
|
|
|
+ class="mark-board-track"
|
|
|
:class="[
|
|
|
{
|
|
|
hide: store.isScoreBoardCollapsed && !props.modal,
|
|
|
- 'mark-board-track-container-in-dialog':
|
|
|
- store.isScoreBoardCollapsed && !props.modal,
|
|
|
+ 'in-dialog': store.isScoreBoardCollapsed && props.modal,
|
|
|
show: !store.isScoreBoardCollapsed,
|
|
|
},
|
|
|
]"
|
|
@@ -14,28 +13,30 @@
|
|
|
height: props.modal ? '100%' : 'auto',
|
|
|
}"
|
|
|
>
|
|
|
+ <div class="board-header">
|
|
|
+ <div class="board-header-info">
|
|
|
+ <img src="@/assets/icons/icon-star.svg" /><span>总分</span>
|
|
|
+ </div>
|
|
|
+ <div class="board-header-score">
|
|
|
+ <transition-group name="score-number-animation" tag="span">
|
|
|
+ <span :key="store.currentTask.markResult?.markerScore || 0">{{
|
|
|
+ store.currentTask.markResult?.markerScore
|
|
|
+ }}</span>
|
|
|
+ </transition-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <qm-button
|
|
|
+ class="board-submit"
|
|
|
+ size="medium"
|
|
|
+ type="primary"
|
|
|
+ @click="submit"
|
|
|
+ >
|
|
|
+ 提交
|
|
|
+ </qm-button>
|
|
|
+ <!-- 暂时隐藏
|
|
|
<div
|
|
|
class="tw-flex tw-rounded tw-justify-between tw-p-2 tw-pl-5 top-container tw-mb-4"
|
|
|
>
|
|
|
- <div class="tw-flex tw-flex-col">
|
|
|
- <div class="tw-flex tw-items-center tw-gap-2">
|
|
|
- <img
|
|
|
- src="./images/totalscore.png"
|
|
|
- style="width: 13px; height: 16px"
|
|
|
- />
|
|
|
- 总分
|
|
|
- </div>
|
|
|
- <div class="total-score tw-ml-5 tw-font-bold" style="height: 50px">
|
|
|
- <transition-group name="score-number-animation" tag="span">
|
|
|
- <span
|
|
|
- :key="store.currentTask.markResult?.markerScore || 0"
|
|
|
- class="tw-inline-block"
|
|
|
- >{{ store.currentTask.markResult?.markerScore }}</span
|
|
|
- >
|
|
|
- </transition-group>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
<div class="tw-flex tw-place-content-center tw-items-center tw-gap-2">
|
|
|
<div class="tw-flex tw-flex-col tw-gap-1">
|
|
|
<a-popconfirm
|
|
@@ -67,57 +68,20 @@
|
|
|
</a-button>
|
|
|
</a-popconfirm>
|
|
|
</div>
|
|
|
-
|
|
|
- <qm-button
|
|
|
- type="primary"
|
|
|
- shape="round"
|
|
|
- size="middle"
|
|
|
- style="height: 76px; border-radius: 10px; padding: 12px"
|
|
|
- @click="submit"
|
|
|
- >
|
|
|
- 提交
|
|
|
- </qm-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ -->
|
|
|
|
|
|
<div
|
|
|
- style="
|
|
|
- height: calc(100% - 56px);
|
|
|
- overflow: hidden;
|
|
|
- user-select: none;
|
|
|
- position: relative;
|
|
|
- "
|
|
|
+ v-if="store.currentTask && store.currentTask.questionList"
|
|
|
+ class="board-questions"
|
|
|
+ :style="{ height: `${topPercent}%` }"
|
|
|
>
|
|
|
- <div
|
|
|
- v-if="store.currentTask && store.currentTask.questionList"
|
|
|
- class="tw-flex tw-gap-2 tw-flex-wrap tw-justify-between tw-overflow-auto tw-content-start"
|
|
|
- :style="{ height: `${topPercent}%` }"
|
|
|
+ <template
|
|
|
+ v-for="(question, index) in store.currentTask.questionList"
|
|
|
+ :key="index"
|
|
|
>
|
|
|
- <template
|
|
|
- v-for="(question, index) in store.currentTask.questionList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <!-- <div
|
|
|
- :id="
|
|
|
- store.isScoreBoardCollapsed
|
|
|
- ? props.modal
|
|
|
- ? ['bq', question.mainNumber, question.subNumber].join('-')
|
|
|
- : ''
|
|
|
- : ['bq', question.mainNumber, question.subNumber].join('-')
|
|
|
- "
|
|
|
- class="question tw-rounded tw-cursor-pointer tw-relative tw-mb-2"
|
|
|
- :class="isCurrentQuestion(question) && 'current-question'"
|
|
|
- @click="chooseQuestion(question)"
|
|
|
- @mouseover="
|
|
|
- addFocusTrack(
|
|
|
- undefined,
|
|
|
- question.mainNumber,
|
|
|
- question.subNumber,
|
|
|
- true
|
|
|
- )
|
|
|
- "
|
|
|
- @mouseleave="removeFocusTrack"
|
|
|
- > -->
|
|
|
+ <div class="board-quesion-box">
|
|
|
<div
|
|
|
:id="
|
|
|
store.isScoreBoardCollapsed
|
|
@@ -126,8 +90,10 @@
|
|
|
: ''
|
|
|
: ['bq', question.mainNumber, question.subNumber].join('-')
|
|
|
"
|
|
|
- class="question tw-rounded tw-cursor-pointer tw-relative tw-mb-2"
|
|
|
- :class="isCurrentQuestion(question) && 'current-question'"
|
|
|
+ :class="[
|
|
|
+ 'board-quesion',
|
|
|
+ { 'is-current': isCurrentQuestion(question) },
|
|
|
+ ]"
|
|
|
tabindex="0"
|
|
|
outline="0"
|
|
|
hidefocus="true"
|
|
@@ -151,20 +117,19 @@
|
|
|
定位
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="!!question.questionName" class="tihao">
|
|
|
+ <div v-if="!!question.questionName" class="quesion-title">
|
|
|
{{ question.questionName }}
|
|
|
</div>
|
|
|
- <div v-else class="tihao">
|
|
|
+ <div v-else class="quesion-title">
|
|
|
{{ question.title }} {{ question.mainNumber }}-{{
|
|
|
question.subNumber
|
|
|
}}
|
|
|
</div>
|
|
|
<!-- 设置高度 避免动画跳动 -->
|
|
|
- <div style="height: 32px">
|
|
|
+ <div class="quesion-score">
|
|
|
<transition-group name="score-number-animation" tag="span">
|
|
|
<span
|
|
|
:key="store.currentTask?.markResult?.scoreList[index] || 0"
|
|
|
- class="tw-font-medium tw-text-2xl score tw-inline-block"
|
|
|
>
|
|
|
<!-- 特殊的空格符号 -->
|
|
|
<!-- eslint-disable-next-line no-irregular-whitespace -->
|
|
@@ -173,103 +138,103 @@
|
|
|
</transition-group>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div ref="dragSpliter" class="board-spliter">
|
|
|
+ <div class="board-spliter-up" @click="topPercent = 20">
|
|
|
+ <img src="@/assets/icons/icon-up.svg" />
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="board-spliter-bar">
|
|
|
+ <img src="@/assets/icons/icon-drag.svg" />
|
|
|
+ </div>
|
|
|
+ <div class="board-spliter-down" @click="topPercent = 90">
|
|
|
+ <img src="@/assets/icons/icon-down.svg" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="board-scores">
|
|
|
<div
|
|
|
- ref="dragSpliter"
|
|
|
- style="
|
|
|
- width: 100%;
|
|
|
- height: 4px;
|
|
|
- border: 2px solid grey;
|
|
|
- background-color: grey;
|
|
|
- cursor: row-resize;
|
|
|
- "
|
|
|
- class="split-pane tw-flex tw-justify-evenly"
|
|
|
+ :class="[
|
|
|
+ 'board-score',
|
|
|
+ 'score-icon',
|
|
|
+ { 'is-current': Object.is(store.currentScore, -0) },
|
|
|
+ ]"
|
|
|
+ @click="chooseScore(-0)"
|
|
|
>
|
|
|
- <div
|
|
|
- style="
|
|
|
- margin-top: -14px;
|
|
|
- width: 20px;
|
|
|
- height: 16px;
|
|
|
- text-align: center;
|
|
|
- clip-path: polygon(0 100%, 100% 100%, 50% 0);
|
|
|
- background-color: lightskyblue;
|
|
|
- cursor: pointer;
|
|
|
- "
|
|
|
- @click="topPercent = 20"
|
|
|
- ></div>
|
|
|
- <div
|
|
|
- style="
|
|
|
- margin-top: -3px;
|
|
|
- width: 20px;
|
|
|
- height: 16px;
|
|
|
- text-align: center;
|
|
|
- clip-path: polygon(0 0, 100% 0, 50% 100%);
|
|
|
- background-color: lightskyblue;
|
|
|
- cursor: pointer;
|
|
|
- "
|
|
|
- @click="topPercent = 90"
|
|
|
- ></div>
|
|
|
+ <img src="@/assets/icons/icon-right.svg" />
|
|
|
</div>
|
|
|
<div
|
|
|
- class="tw-flex tw-flex-wrap tw-mt-5 tw-overflow-auto tw-content-start"
|
|
|
- style="padding-bottom: 40px; gap: 8px"
|
|
|
- :style="{ height: `${100 - topPercent}%` }"
|
|
|
+ :class="[
|
|
|
+ 'board-score',
|
|
|
+ 'score-icon',
|
|
|
+ { 'is-current': Object.is(store.currentScore, -0) },
|
|
|
+ ]"
|
|
|
+ @click="chooseScore(-0)"
|
|
|
>
|
|
|
- <div
|
|
|
- v-for="(s, i) in questionScoreSteps.slice(1)"
|
|
|
- :key="i"
|
|
|
- class="single-score tw-cursor-pointer tw-font-bold"
|
|
|
- :class="isCurrentScore(s) && 'current-score'"
|
|
|
- @click="chooseScore(s)"
|
|
|
- >
|
|
|
- {{ s }}
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="single-score tw-cursor-pointer tw-font-bold"
|
|
|
- :class="Object.is(store.currentScore, 0) && 'current-score'"
|
|
|
- @click="chooseScore(0)"
|
|
|
- >
|
|
|
- 0
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="single-score tw-cursor-pointer tw-font-bold"
|
|
|
- :class="Object.is(store.currentScore, -0) && 'current-score'"
|
|
|
- title="按 # 可以选中"
|
|
|
- @click="chooseScore(-0)"
|
|
|
- >
|
|
|
- 空
|
|
|
- </div>
|
|
|
+ <img src="@/assets/icons/icon-wrong.svg" />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'board-score',
|
|
|
+ 'score-icon',
|
|
|
+ { 'is-current': Object.is(store.currentScore, -0) },
|
|
|
+ ]"
|
|
|
+ title="标记圆圈"
|
|
|
+ @click="chooseScore(-0)"
|
|
|
+ >
|
|
|
+ <img src="@/assets/icons/icon-circle.svg" />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'board-score',
|
|
|
+ 'score-icon',
|
|
|
+ { 'is-current': Object.is(store.currentScore, -0) },
|
|
|
+ ]"
|
|
|
+ title="标记文本"
|
|
|
+ @click="chooseScore(-0)"
|
|
|
+ >
|
|
|
+ <img class="icon-text" src="@/assets/icons/icon-text.svg" />
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ <div
|
|
|
+ v-for="(s, i) in questionScoreSteps.slice(1)"
|
|
|
+ :key="i"
|
|
|
+ :class="['board-score', { 'is-current': isCurrentScore(s) }]"
|
|
|
+ @click="chooseScore(s)"
|
|
|
+ >
|
|
|
+ {{ s }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="board-score"
|
|
|
+ :class="Object.is(store.currentScore, 0) && 'is-current'"
|
|
|
+ @click="chooseScore(0)"
|
|
|
+ >
|
|
|
+ 0
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="tw-flex tw-justify-between tw-mt-4"
|
|
|
- style="position: relative; bottom: 0px; right: 0px; width: 230px"
|
|
|
- >
|
|
|
+ <div class="board-footer">
|
|
|
<qm-button
|
|
|
- type="primary"
|
|
|
- shape="round"
|
|
|
- size="large"
|
|
|
- style="
|
|
|
- background-color: var(--app-undo-button-bg-color);
|
|
|
- border-color: var(--app-undo-button-bg-color);
|
|
|
- "
|
|
|
+ class="board-goback"
|
|
|
:clickTimeout="300"
|
|
|
@click="clearLatestMarkOfCurrentQuetion"
|
|
|
>
|
|
|
+ <template #icon>
|
|
|
+ <img src="@/assets/icons/icon-goback.svg" />
|
|
|
+ </template>
|
|
|
回退
|
|
|
</qm-button>
|
|
|
|
|
|
<qm-button
|
|
|
- type="primary"
|
|
|
- shape="round"
|
|
|
- size="large"
|
|
|
+ class="board-clear"
|
|
|
:clickTimeout="300"
|
|
|
data-test="clear-score"
|
|
|
@click="clearAllMarksOfCurrentQuetion"
|
|
|
>
|
|
|
- 清除本题
|
|
|
+ <template #icon>
|
|
|
+ <img class="icon-common" src="@/assets/icons/icon-clear.svg" />
|
|
|
+ <img class="icon-active" src="@/assets/icons/icon-clear-white.svg" />
|
|
|
+ </template>
|
|
|
+ 清空
|
|
|
</qm-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -285,8 +250,9 @@ import { dragSplitPane } from "./use/splitPane";
|
|
|
import { addFocusTrack, removeFocusTrack } from "./use/focusTracks";
|
|
|
import EventBus from "@/plugins/eventBus";
|
|
|
import { cloneDeep } from "lodash-es";
|
|
|
+
|
|
|
const props = defineProps<{ modal?: boolean }>();
|
|
|
-const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
|
|
|
+const emit = defineEmits(["submit", "unselectiveSubmit"]);
|
|
|
const { dragSpliter, topPercent } = dragSplitPane();
|
|
|
const activeRightMenuItem = ref<any>(null);
|
|
|
const tmpStyle = reactive<any>({
|
|
@@ -355,11 +321,7 @@ watch(topPercent, () => {
|
|
|
const { chooseQuestion } = autoChooseFirstQuestion();
|
|
|
let sliceImagesWithTrackListCopy = ref([]);
|
|
|
EventBus.on("draw-change", (list: any) => {
|
|
|
- // if (store.getMarkStatus === "正评" || store.getMarkStatus === "试评") {
|
|
|
sliceImagesWithTrackListCopy.value = cloneDeep(list);
|
|
|
- // } else {
|
|
|
- // sliceImagesWithTrackListCopy.value = [];
|
|
|
- // }
|
|
|
});
|
|
|
|
|
|
// 切换题目是清空上一题的分数
|
|
@@ -375,34 +337,6 @@ const questionScore = $computed(
|
|
|
store.currentTask.markResult?.scoreList[store.currentQuestion.__index]
|
|
|
);
|
|
|
|
|
|
-// const questionScoreSteps = $computed(() => {
|
|
|
-// const question = store.currentQuestion;
|
|
|
-// if (!question) return [];
|
|
|
-
|
|
|
-// const remainScore =
|
|
|
-// Math.round(question.maxScore * 100 - (questionScore || 0) * 100) / 100;
|
|
|
-
|
|
|
-// const steps = [];
|
|
|
-// if (question.intervalScore <= 0) {
|
|
|
-// console.warn(`question.intervalScore got: ${question.intervalScore}`);
|
|
|
-// }
|
|
|
-// for (
|
|
|
-// let i = 0;
|
|
|
-// i <= remainScore && question.intervalScore > 0;
|
|
|
-// i = Math.round(i * 100 + question.intervalScore * 100) / 100
|
|
|
-// ) {
|
|
|
-// steps.push(i);
|
|
|
-// }
|
|
|
-// if (
|
|
|
-// Math.round(remainScore * 100) % Math.round(question.intervalScore * 100) !==
|
|
|
-// 0
|
|
|
-// ) {
|
|
|
-// steps.push(remainScore);
|
|
|
-// }
|
|
|
-
|
|
|
-// return steps;
|
|
|
-// });
|
|
|
-
|
|
|
const questionScoreSteps = $computed(() => {
|
|
|
const question = store.currentQuestion;
|
|
|
if (!question) return [];
|
|
@@ -577,14 +511,6 @@ function clearAllMarksOfCurrentQuetion() {
|
|
|
function submit() {
|
|
|
emit("submit");
|
|
|
}
|
|
|
-
|
|
|
-const buttonHeightForSelective = $computed(() =>
|
|
|
- store.setting.selective &&
|
|
|
- store.setting.enableAllZero &&
|
|
|
- !store.setting.forceSpecialTag
|
|
|
- ? "36px"
|
|
|
- : "76px"
|
|
|
-);
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -607,82 +533,4 @@ const buttonHeightForSelective = $computed(() =>
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-.mark-board-track-container {
|
|
|
- max-width: 290px;
|
|
|
- min-width: 290px;
|
|
|
- padding: 20px;
|
|
|
- max-height: calc(100vh - 56px - 57px);
|
|
|
- overflow: auto;
|
|
|
- z-index: 1001;
|
|
|
- transition: margin-right 0.5s;
|
|
|
- color: var(--app-small-header-text-color);
|
|
|
- background-color: var(--app-main-bg-color);
|
|
|
-}
|
|
|
-
|
|
|
-.mark-board-track-container-in-dialog {
|
|
|
- max-width: 100%;
|
|
|
- min-width: 100%;
|
|
|
- height: 100%;
|
|
|
-}
|
|
|
-
|
|
|
-.mark-board-track-container.show {
|
|
|
- margin-right: 0;
|
|
|
-}
|
|
|
-
|
|
|
-.mark-board-track-container.hide {
|
|
|
- margin-right: -100%;
|
|
|
-}
|
|
|
-
|
|
|
-.top-container {
|
|
|
- background-color: var(--app-container-bg-color);
|
|
|
-}
|
|
|
-
|
|
|
-.total-score {
|
|
|
- color: var(--app-main-text-color);
|
|
|
- font-size: 32px;
|
|
|
-}
|
|
|
-
|
|
|
-.question {
|
|
|
- min-width: 110px;
|
|
|
- max-width: 110px;
|
|
|
- min-height: 72px;
|
|
|
- padding: 10px;
|
|
|
- background-color: var(--app-container-bg-color);
|
|
|
- position: relative;
|
|
|
- .tihao {
|
|
|
- &:hover {
|
|
|
- // font-weight: bold;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.current-question {
|
|
|
- color: white;
|
|
|
- background-color: var(--app-score-color);
|
|
|
-}
|
|
|
-
|
|
|
-.single-score {
|
|
|
- position: relative;
|
|
|
- width: 32px;
|
|
|
- height: 32px;
|
|
|
- font-size: var(--app-secondary-font-size);
|
|
|
- display: grid;
|
|
|
- place-content: center;
|
|
|
- background-color: var(--app-container-bg-color);
|
|
|
-
|
|
|
- border-radius: 30px;
|
|
|
-}
|
|
|
-
|
|
|
-.current-score {
|
|
|
- background-color: var(--app-score-color);
|
|
|
- color: white;
|
|
|
-}
|
|
|
-
|
|
|
-.all-zero-unselective-button {
|
|
|
- height: v-bind(buttonHeightForSelective);
|
|
|
- border-radius: 10px;
|
|
|
- padding: 7px;
|
|
|
- background-color: #4db9ff;
|
|
|
- border: none;
|
|
|
-}
|
|
|
</style>
|