| | |
| | | import service from "@/api"; |
| | | |
| | | |
| | | export const getExamList = () => { |
| | | return service.get('/api/v1/getExamList'); |
| | | } |
| | | |
| | | export const getExamInfo = () => { |
| | | return service.get('/api/v1/getExamInfo'); |
| | | } |
| | | |
| | | export const getExamListV2 = (postData = {examName: ''}) => { |
| | | export const getExamList = (postData = {examName: ''}) => { |
| | | return service.post('/api/student/exam/page',postData); |
| | | } |
| | | |
| | | export const getExamInfo = (id) => { |
| | | return service.post('/api/student/exam/start/' + id); |
| | | } |
| | |
| | | const examType = ref({ |
| | | 1: '单选题', |
| | | 2: '多选题', |
| | | 3: '音频题' |
| | | 3: '判断题', |
| | | 4: '填空题', |
| | | 5: '简答题', |
| | | 6: '语音题', |
| | | 7: '计算题', |
| | | 8: '分析题', |
| | | }); |
| | | |
| | | const currentType = ref(1); |
| | |
| | | <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 => { |
| | | |
| | |
| | | |
| | | import { Search } from '@element-plus/icons-vue'; |
| | | |
| | | import { getExamList,getExamListV2 } from '@/api/modules/exam.js'; |
| | | import { getExamList } from '@/api/modules/exam.js'; |
| | | |
| | | |
| | | const activeName = ref('1'); |
| | |
| | | |
| | | const getData = () => { |
| | | loading.value = true; |
| | | getExamListV2().then(res => { |
| | | // dataList.value = res.data; |
| | | getExamList().then(res => { |
| | | dataList.value = res.data; |
| | | loading.value = false; |
| | | }).catch(err => { |
| | | loading.value = false; |
| | |
| | | <ExamInfo class="mb-5" :questionIndex="currentIndex" :activeQuestion="activeQuestion"></ExamInfo> |
| | | |
| | | <div class="answer-content"> |
| | | <div class="answer-item flex" v-for="item, index in activeQuestion.items" @click="answerClick(item)" |
| | | <div class="answer-item flex" v-for="item, index in activeQuestion.questionItemList" @click="answerClick(item)" |
| | | :class="answerState(item)"> |
| | | <div class="answer-icon flex flex-col justify-center items-center flex-shrink-0">{{ item.prefix }}</div> |
| | | <div class="answer-text text-gray-700">{{ item.content }}</div> |
| | |
| | | <ExamInfo class="mb-5" :questionIndex="currentIndex" :activeQuestion="activeQuestion"></ExamInfo> |
| | | |
| | | <div class="answer-content"> |
| | | <div class="answer-item flex" v-for="item, index in activeQuestion.items" @click="answerClick(item)" |
| | | <div class="answer-item flex" v-for="item, index in activeQuestion.questionItemList" @click="answerClick(item)" |
| | | :class="answerState(item)"> |
| | | <div class="answer-icon flex flex-col justify-center items-center flex-shrink-0">{{ item.prefix }}</div> |
| | | <div class="answer-text text-gray-700">{{ item.content }}</div> |
| | |
| | | const typeComponent = { |
| | | 1: AnswerSingle, |
| | | 2: AnswerMultiple, |
| | | 3: AnswerAudio, |
| | | 6: AnswerAudio, |
| | | }; |
| | | |
| | | const quitDialog = ref(false); |
| | |
| | | port: 3000, |
| | | proxy: { |
| | | '/api': { |
| | | // target: 'http://192.168.3.88:8000', |
| | | target: 'http://192.168.3.64:8000', |
| | | target: 'http://192.168.3.88:8000', |
| | | // target: 'http://192.168.3.64:8000', |
| | | changeOrigin: true, |
| | | } |
| | | } |