|
@@ -65,7 +65,14 @@
|
|
<div class="board-question-full-box">
|
|
<div class="board-question-full-box">
|
|
<div
|
|
<div
|
|
:id="'bq-' + question.mainNumber + '-' + question.subNumber"
|
|
:id="'bq-' + question.mainNumber + '-' + question.subNumber"
|
|
- :class="['board-question', { 'is-disabled': !question.selfMark }]"
|
|
|
|
|
|
+ :class="[
|
|
|
|
+ 'board-question',
|
|
|
|
+ {
|
|
|
|
+ 'is-current': isCurrentQuestion(question),
|
|
|
|
+ 'is-disabled': isDisabledQuestion(question),
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ @click="chooseQuestion(question)"
|
|
>
|
|
>
|
|
<div class="question-info">
|
|
<div class="question-info">
|
|
<div class="question-title" :title="question.title">
|
|
<div class="question-title" :title="question.title">
|
|
@@ -75,7 +82,18 @@
|
|
{{ question.mainNumber }}-{{ question.subNumber }}
|
|
{{ question.mainNumber }}-{{ question.subNumber }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="board-scores">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-if="question.problem"
|
|
|
|
+ :class="[
|
|
|
|
+ 'question-score',
|
|
|
|
+ {
|
|
|
|
+ 'is-problem': question.problem,
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ >
|
|
|
|
+ 问题卷
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="!isDisabledQuestion(question)" class="board-scores">
|
|
<div
|
|
<div
|
|
v-for="(s, i) in questionScoreSteps(question)"
|
|
v-for="(s, i) in questionScoreSteps(question)"
|
|
:key="i"
|
|
:key="i"
|
|
@@ -87,6 +105,13 @@
|
|
>
|
|
>
|
|
{{ s }}
|
|
{{ s }}
|
|
</div>
|
|
</div>
|
|
|
|
+ <qm-button
|
|
|
|
+ v-if="question.problem"
|
|
|
|
+ class="board-clear"
|
|
|
|
+ @click="cancelProblem"
|
|
|
|
+ >
|
|
|
|
+ 取消问题卷
|
|
|
|
+ </qm-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -96,11 +121,13 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
+import { ref } from "vue";
|
|
import type { Question } from "@/types";
|
|
import type { Question } from "@/types";
|
|
import { useMarkStore } from "@/store";
|
|
import { useMarkStore } from "@/store";
|
|
-import { ref } from "vue";
|
|
|
|
|
|
+import useAutoChooseFirstQuestion from "../composables/useAutoChooseFirstQuestion";
|
|
|
|
|
|
const markStore = useMarkStore();
|
|
const markStore = useMarkStore();
|
|
|
|
+const { chooseQuestion, isDisabledQuestion } = useAutoChooseFirstQuestion();
|
|
|
|
|
|
const emit = defineEmits([
|
|
const emit = defineEmits([
|
|
"submit",
|
|
"submit",
|
|
@@ -119,7 +146,14 @@ const normalMode = ref(
|
|
function normalModeChange(value: string) {
|
|
function normalModeChange(value: string) {
|
|
markStore.setting.uiSetting["normal.mode"] = value;
|
|
markStore.setting.uiSetting["normal.mode"] = value;
|
|
}
|
|
}
|
|
|
|
+function isCurrentQuestion(question: Question) {
|
|
|
|
+ return (
|
|
|
|
+ markStore.currentQuestion?.mainNumber === question.mainNumber &&
|
|
|
|
+ markStore.currentQuestion?.subNumber === question.subNumber
|
|
|
|
+ );
|
|
|
|
+}
|
|
function chooseScore(question: Question, score: number) {
|
|
function chooseScore(question: Question, score: number) {
|
|
|
|
+ if (isDisabledQuestion(question)) return;
|
|
// 只要修改了分值,就当做已修改
|
|
// 只要修改了分值,就当做已修改
|
|
hasModifyScore.value = true;
|
|
hasModifyScore.value = true;
|
|
|
|
|