| | |
| | | </div> |
| | | <div class="right-container"> |
| | | <div class="button-container"> |
| | | <el-button type="primary" size="large" @click="examClick" :disabled="stateList[item.status].disabled">开始考试</el-button> |
| | | <el-button type="primary" size="large" @click="examClick" |
| | | :disabled="stateList[item.status].disabled">开始考试</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | import { ref } from 'vue'; |
| | | import { Timer } from '@element-plus/icons-vue'; |
| | | import { useRouter } from 'vue-router'; |
| | | import { useExamStore } from '@/store/index.js'; |
| | | import { getExamInfo } from '@/api/modules/exam.js'; |
| | | const examStore = useExamStore(); |
| | | |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const props = defineProps({ |
| | |
| | | }; |
| | | |
| | | const examClick = () => { |
| | | router.push('/exam'); |
| | | getExamInfo().then((res) => { |
| | | examStore.setExamInfo(res.data.examInfo); |
| | | examStore.setExamDetail(res.data.examQuestionList); |
| | | examStore.initExam(); |
| | | router.push('/exam'); |
| | | }).catch(err => { |
| | | |
| | | }); |
| | | } |
| | | |
| | | </script> |