|
@@ -111,7 +111,7 @@ export default defineComponent({
|
|
|
// 时间到了考试结束
|
|
|
if (minu <= 0) {
|
|
|
eventUnit.emit('unitAudioStop')
|
|
|
- await onConfirmExam(false)
|
|
|
+ await afterQuestion()
|
|
|
state.visiableExam = true
|
|
|
} else {
|
|
|
// pause()
|
|
@@ -219,7 +219,19 @@ export default defineComponent({
|
|
|
/**
|
|
|
* @description 提交最终答案
|
|
|
*/
|
|
|
- const onConfirmExam = async (status = true) => {
|
|
|
+ const onConfirmExam = async () => {
|
|
|
+ try {
|
|
|
+ await afterQuestion()
|
|
|
+ onAfter()
|
|
|
+ // if (status) {
|
|
|
+ state.visiableResult = true
|
|
|
+ // }
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const afterQuestion = async () => {
|
|
|
try {
|
|
|
const questionList = state.questionList || []
|
|
|
const userAnswerList: any = [] // 所有题目的答案
|
|
@@ -257,10 +269,6 @@ export default defineComponent({
|
|
|
examName: state.examDetail.unitExaminationName
|
|
|
}
|
|
|
}
|
|
|
- onAfter()
|
|
|
- if (status) {
|
|
|
- state.visiableResult = true
|
|
|
- }
|
|
|
} catch {
|
|
|
//
|
|
|
}
|
|
@@ -325,7 +333,7 @@ export default defineComponent({
|
|
|
autoStart={false}
|
|
|
onFinish={async () => {
|
|
|
eventUnit.emit('unitAudioStop')
|
|
|
- await onConfirmExam(false)
|
|
|
+ await afterQuestion()
|
|
|
state.visiableExam = true
|
|
|
}}
|
|
|
/>
|