feat:更新考试记录功能
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<el-dialog v-model="examStore.dialogVisible" title="考试配置" width="30%" center destroy-on-close>
|
||||
<el-dialog v-model="examStore.dialogVisible" title="考试配置"
|
||||
:width="appStore.isMobile ? '80%' : '30%'" center destroy-on-close>
|
||||
<el-form ref="examFormRef" :model="examStore.config" :rules="rules" label-width="auto">
|
||||
<el-form-item label="考试学科" prop="subject">
|
||||
<el-select
|
||||
@@ -34,11 +35,13 @@ import { ElInputNumber, ElLoading, ElMessage, ElOption, ElSelect, type FormInsta
|
||||
import { useExamStore } from '@/stores/exam.ts'
|
||||
import { useLibraryStore } from '@/stores/library.ts'
|
||||
import { useQuestionStore } from '@/stores/question.ts'
|
||||
import { useAppStore } from '@/stores/app.ts'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
const examStore = useExamStore()
|
||||
const libraryStore = useLibraryStore()
|
||||
const questionStore = useQuestionStore()
|
||||
const appStore = useAppStore()
|
||||
|
||||
const examFormRef = ref<FormInstance>()
|
||||
|
||||
@@ -59,6 +62,7 @@ const confirmClick = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
questionStore.type = 'Exam'
|
||||
await generateExam()
|
||||
} else {
|
||||
ElMessage.error('请先输入信息')
|
||||
|
||||
Reference in New Issue
Block a user