| | |
| | | const currentIndex = ref(0); |
| | | |
| | | const getActiveQuestion = computed(() => { |
| | | console.log("sb", currentType.value) |
| | | const temp = examDetail.value.find(item => item.questionType === currentType.value); |
| | | if (temp) { |
| | | return temp.questionList[currentIndex.value]; |
| | |
| | | const setExamDetail = (detail) => { |
| | | examDetail.value = detail; |
| | | }; |
| | | const initExam = () => { |
| | | const initExam = (questionType) => { |
| | | currentIndex.value = 0; |
| | | currentType.value = 1; |
| | | currentType.value = questionType; |
| | | } |
| | | return { |
| | | examInfo, |
| | |
| | | navbar |
| | | }); |
| | | gradeStore.setExamDetail(titleItems); |
| | | gradeStore.initExam(); |
| | | gradeStore.initExam(res.data.titleItems[0].questionType); |
| | | router.push('/grade'); |
| | | }).catch(err => { |
| | | |
| | |
| | | loading.value = true; |
| | | getGradeList({examName: searchText.value, pageIndex: currentIndex.value, pageSize: currentSize.value}).then(res => { |
| | | dataList.value = res.data.list; |
| | | console.log(dataList.value, "wwww") |
| | | loading.value = false; |
| | | }).catch(err => { |
| | | loading.value = false; |
| | |
| | | |
| | | const gradeStore = useGradeStore(); |
| | | const { currentType, currentIndex, examDetail, examType, examInfo } = storeToRefs(gradeStore); |
| | | |
| | | console.log("我草泥马:", storeToRefs(gradeStore)) |
| | | const typeComponent = { |
| | | 1: AnswerSingle, |
| | | 2: AnswerMultiple, |