feat:更新考试模块
This commit is contained in:
@@ -1,11 +1,37 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2>考试中心</h2>
|
||||
<p style="color:#94a3b8;margin-top:8px;">按学科进行综合检验,模拟真实考试环境</p>
|
||||
<el-divider />
|
||||
<el-empty description="考试页面 - 待开发" />
|
||||
<div class="exam-view common-view">
|
||||
<div class="view-header">
|
||||
<div class="view-content">
|
||||
<h2 class="view-title">考试中心</h2>
|
||||
<p class="view-subtitle">按学科进行综合检验,模拟真实考试环境</p>
|
||||
</div>
|
||||
<el-button type="primary" :icon="Aim" @click="examClick">开始考试</el-button>
|
||||
</div>
|
||||
|
||||
<question-list v-if="questionStore.questionList.length > 0"/>
|
||||
|
||||
<exam-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
import QuestionList from '@/components/question/QuestionList.vue'
|
||||
import ExamDialog from '@/components/exam/ExamDialog.vue'
|
||||
import { Aim } from '@element-plus/icons-vue'
|
||||
import { useExamStore } from '@/stores/exam.ts'
|
||||
import { useQuestionStore } from '@/stores/question.ts'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const examStore = useExamStore()
|
||||
const questionStore = useQuestionStore()
|
||||
|
||||
onMounted(() => {
|
||||
questionStore.questionList = []
|
||||
})
|
||||
|
||||
const examClick = () => {
|
||||
questionStore.questionList = []
|
||||
examStore.config = examStore.getEmptyConfig()
|
||||
examStore.dialogVisible = true
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user