|
@@ -16,44 +16,71 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div
|
|
<div
|
|
- v-if="store.currentTask && store.currentTask.questionList"
|
|
|
|
- class="tw-flex tw-gap-1 tw-flex-wrap tw-justify-between"
|
|
|
|
|
|
+ style="
|
|
|
|
+ height: calc(100vh - 41px - 160px);
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ user-select: none;
|
|
|
|
+ "
|
|
>
|
|
>
|
|
- <template
|
|
|
|
- v-for="(question, index) in store.currentTask?.questionList"
|
|
|
|
- :key="index"
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-if="store.currentTask && store.currentTask.questionList"
|
|
|
|
+ class="tw-flex tw-gap-1 tw-flex-wrap tw-justify-between tw-overflow-scroll tw-content-start"
|
|
|
|
+ style="min-height: 20% !important"
|
|
|
|
+ :style="{ height: `${topPercent}%` }"
|
|
>
|
|
>
|
|
- <div
|
|
|
|
- @click="chooseQuestion(question)"
|
|
|
|
- class="question tw-rounded tw-p-1"
|
|
|
|
- :class="isCurrentQuestion(question) && 'current-question'"
|
|
|
|
|
|
+ <template
|
|
|
|
+ v-for="(question, index) in store.currentTask?.questionList"
|
|
|
|
+ :key="index"
|
|
>
|
|
>
|
|
- <div style="border-bottom: 1px solid grey">
|
|
|
|
- {{ question.title }} {{ question.mainNumber }}-{{
|
|
|
|
- question.subNumber
|
|
|
|
- }}
|
|
|
|
|
|
+ <div
|
|
|
|
+ @click="chooseQuestion(question)"
|
|
|
|
+ class="question tw-rounded tw-p-1"
|
|
|
|
+ style="height: 70px"
|
|
|
|
+ :class="isCurrentQuestion(question) && 'current-question'"
|
|
|
|
+ >
|
|
|
|
+ <div style="border-bottom: 1px solid grey">
|
|
|
|
+ {{ question.title }} {{ question.mainNumber }}-{{
|
|
|
|
+ question.subNumber
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="tw-text-center tw-font-medium tw-text-3xl">
|
|
|
|
+ <!-- 特殊的空格符号 -->
|
|
|
|
+ {{ question.score ?? " " }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="tw-text-center tw-font-medium tw-text-2xl">
|
|
|
|
- <!-- 特殊的空格符号 -->
|
|
|
|
- {{ question.score ?? " " }}
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="tw-flex tw-gap-1 tw-flex-wrap tw-mt-5">
|
|
|
|
<div
|
|
<div
|
|
- v-for="(s, i) in questionScoreSteps"
|
|
|
|
- :key="i"
|
|
|
|
- @click="chooseScore(s)"
|
|
|
|
- class="single-score"
|
|
|
|
- :class="isCurrentScore(s) && 'current-score'"
|
|
|
|
|
|
+ style="
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 4px;
|
|
|
|
+ border: 2px solid grey;
|
|
|
|
+ cursor: row-resize;
|
|
|
|
+ "
|
|
|
|
+ ref="dragSpliter"
|
|
|
|
+ ></div>
|
|
|
|
+ <div
|
|
|
|
+ class="tw-flex tw-gap-1 tw-flex-wrap tw-mt-5 tw-overflow-scroll tw-content-start"
|
|
|
|
+ style="padding-bottom: 40px"
|
|
|
|
+ :style="{ height: `${100 - topPercent}%` }"
|
|
>
|
|
>
|
|
- {{ s }}
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-for="(s, i) in questionScoreSteps"
|
|
|
|
+ :key="i"
|
|
|
|
+ @click="chooseScore(s)"
|
|
|
|
+ class="single-score"
|
|
|
|
+ :class="isCurrentScore(s) && 'current-score'"
|
|
|
|
+ >
|
|
|
|
+ {{ s }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <div class="tw-flex tw-justify-between tw-mt-4">
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="tw-flex tw-justify-between tw-mt-4"
|
|
|
|
+ draggable
|
|
|
|
+ style="position: absolute; bottom: 10px; right: 10px; width: 230px"
|
|
|
|
+ >
|
|
<qm-button
|
|
<qm-button
|
|
type="primary"
|
|
type="primary"
|
|
shape="round"
|
|
shape="round"
|
|
@@ -63,6 +90,7 @@
|
|
>
|
|
>
|
|
回退
|
|
回退
|
|
</qm-button>
|
|
</qm-button>
|
|
|
|
+
|
|
<qm-button
|
|
<qm-button
|
|
type="primary"
|
|
type="primary"
|
|
shape="round"
|
|
shape="round"
|
|
@@ -83,11 +111,14 @@ import { computed, defineComponent, onMounted, onUnmounted, watch } from "vue";
|
|
import { store } from "./store";
|
|
import { store } from "./store";
|
|
import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
|
|
import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
|
|
import { message } from "ant-design-vue";
|
|
import { message } from "ant-design-vue";
|
|
|
|
+import { dragSplitPane } from "./use/splitPane";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "MarkBoardTrack",
|
|
name: "MarkBoardTrack",
|
|
emits: ["submit"],
|
|
emits: ["submit"],
|
|
setup(props, { emit }) {
|
|
setup(props, { emit }) {
|
|
|
|
+ const { dragSpliter, topPercent } = dragSplitPane();
|
|
|
|
+
|
|
const { chooseQuestion } = autoChooseFirstQuestion();
|
|
const { chooseQuestion } = autoChooseFirstQuestion();
|
|
|
|
|
|
const questionScoreSteps = computed(() => {
|
|
const questionScoreSteps = computed(() => {
|
|
@@ -255,6 +286,8 @@ export default defineComponent({
|
|
questionScoreSteps,
|
|
questionScoreSteps,
|
|
clearLatestMarkOfCurrentQuetion,
|
|
clearLatestMarkOfCurrentQuetion,
|
|
clearAllMarksOfCurrentQuetion,
|
|
clearAllMarksOfCurrentQuetion,
|
|
|
|
+ dragSpliter,
|
|
|
|
+ topPercent,
|
|
submit,
|
|
submit,
|
|
};
|
|
};
|
|
},
|
|
},
|