| | |
| | | <div class="item flex justify-between items-center"> |
| | | <div class="left-container flex flex-col justify-between"> |
| | | <div class="top-container flex items-center"> |
| | | <div class="title mr-5 text-xl font-bold">{{ item.name }}</div> |
| | | <div class="title mr-5 text-xl font-bold">{{ item.examName }}</div> |
| | | <div class="tag"> |
| | | <el-tag :type="stateList[item.status].type" effect="light" round> |
| | | {{ stateList[item.status].text }} |
| | |
| | | 考试时间: {{ item.startTime }} ~ {{ item.endTime }} |
| | | </div> |
| | | </div> |
| | | <div class="bottom-container flex text-sm text-gray-400"> |
| | | <!-- <div class="bottom-container flex text-sm text-gray-400"> |
| | | <div class="bottom-item"> |
| | | 总分: {{ item.examScore }} |
| | | </div> |
| | |
| | | <div class="bottom-item"> |
| | | 答题时间: {{ item.examTime }}分钟 |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="right-container"> |
| | | <div class="button-container"> |
| | | <el-button type="primary" size="large" @click="examClick" |
| | | <el-button type="primary" size="large" @click="examClick(item)" |
| | | :disabled="stateList[item.status].disabled">开始考试</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | type: 'primary', |
| | | disabled: true |
| | | }, |
| | | 2: { |
| | | 'ing': { |
| | | text: '进行中', |
| | | type: 'success', |
| | | disabled: false |
| | |
| | | } |
| | | }; |
| | | |
| | | const examClick = () => { |
| | | getExamInfo().then((res) => { |
| | | examStore.setExamInfo(res.data.examInfo); |
| | | examStore.setExamDetail(res.data.examQuestionList); |
| | | examStore.initExam(); |
| | | const examClick = (exam) => { |
| | | console.log(exam); |
| | | getExamInfo(exam.id).then((res) => { |
| | | examStore.setExamInfo({ |
| | | examName: exam.examName |
| | | }); |
| | | examStore.setExamDetail(res.data); |
| | | // examStore.setExamInfo(res.data.examInfo); |
| | | // examStore.setExamDetail(res.data.examQuestionList); |
| | | // examStore.initExam(); |
| | | router.push('/exam'); |
| | | }).catch(err => { |
| | | |