|
@@ -34,6 +34,16 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<qm-button
|
|
<qm-button
|
|
|
|
+ v-if="props.isCheckAnswer && !hasModifyScore"
|
|
|
|
+ class="board-header-submit"
|
|
|
|
+ size="medium"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="checkSubmit"
|
|
|
|
+ >
|
|
|
|
+ 复核
|
|
|
|
+ </qm-button>
|
|
|
|
+ <qm-button
|
|
|
|
+ v-else
|
|
class="board-header-submit"
|
|
class="board-header-submit"
|
|
size="medium"
|
|
size="medium"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -105,17 +115,24 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import type { Question } from "@/types";
|
|
import type { Question } from "@/types";
|
|
import { isNumber } from "lodash-es";
|
|
import { isNumber } from "lodash-es";
|
|
-import { onMounted, onUnmounted, watch } from "vue";
|
|
|
|
|
|
+import { ref, onMounted, onUnmounted, watch } from "vue";
|
|
import { store } from "@/store/store";
|
|
import { store } from "@/store/store";
|
|
import { keyMouse } from "./use/keyboardAndMouse";
|
|
import { keyMouse } from "./use/keyboardAndMouse";
|
|
import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
|
|
import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
|
|
import { message } from "ant-design-vue";
|
|
import { message } from "ant-design-vue";
|
|
import { DownOutlined } from "@ant-design/icons-vue";
|
|
import { DownOutlined } from "@ant-design/icons-vue";
|
|
|
|
|
|
-const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
|
|
|
|
|
|
+const emit = defineEmits([
|
|
|
|
+ "submit",
|
|
|
|
+ "allZeroSubmit",
|
|
|
|
+ "unselectiveSubmit",
|
|
|
|
+ "checkSubmit",
|
|
|
|
+]);
|
|
|
|
+const props = defineProps<{ isCheckAnswer?: boolean }>();
|
|
|
|
|
|
const { toggleKeyMouse } = keyMouse();
|
|
const { toggleKeyMouse } = keyMouse();
|
|
const { chooseQuestion } = autoChooseFirstQuestion();
|
|
const { chooseQuestion } = autoChooseFirstQuestion();
|
|
|
|
+const hasModifyScore = ref(false);
|
|
|
|
|
|
/**
|
|
/**
|
|
* 当前题的输入串,初次是markResult.scoreList中score,然后接收输入字符,回车时判断是否合法,合法则赋值给markResult.scoreList
|
|
* 当前题的输入串,初次是markResult.scoreList中score,然后接收输入字符,回车时判断是否合法,合法则赋值给markResult.scoreList
|
|
@@ -180,6 +197,9 @@ const questionScore = $computed(
|
|
);
|
|
);
|
|
|
|
|
|
function numberKeyListener(event: KeyboardEvent) {
|
|
function numberKeyListener(event: KeyboardEvent) {
|
|
|
|
+ // 只要修改了分值,就当做已修改
|
|
|
|
+ hasModifyScore.value = true;
|
|
|
|
+
|
|
// console.log(event);
|
|
// console.log(event);
|
|
// if (event.target.tagName !== "BODY") return;
|
|
// if (event.target.tagName !== "BODY") return;
|
|
if (!store.currentQuestion || !store.currentTask) return;
|
|
if (!store.currentQuestion || !store.currentTask) return;
|
|
@@ -305,6 +325,10 @@ function submit() {
|
|
emit("submit");
|
|
emit("submit");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function checkSubmit() {
|
|
|
|
+ emit("checkSubmit");
|
|
|
|
+}
|
|
|
|
+
|
|
const buttonHeightForSelective = $computed(() =>
|
|
const buttonHeightForSelective = $computed(() =>
|
|
store.setting.selective && store.setting.enableAllZero ? "36px" : "76px"
|
|
store.setting.selective && store.setting.enableAllZero ? "36px" : "76px"
|
|
);
|
|
);
|