| | |
| | | const currentIndex = ref(0); |
| | | |
| | | const getActiveQuestion = computed(() => { |
| | | console.log("sb", currentType.value) |
| | | // console.log("sb", currentType.value) |
| | | const temp = examDetail.value.find(item => item.questionType === currentType.value); |
| | | // console.log(temp, "dssss") |
| | | if (temp) { |
| | | return temp.questionList[currentIndex.value]; |
| | | } |
| | |
| | | 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 { currentIndex } = storeToRefs(gradeStore); |
| | | |
| | | const activeQuestion = ref(gradeStore.getActiveQuestion); |
| | | |
| | | const formatAnswer = (answer) => { |
| | | if(Array.isArray(answer)) { |
| | | return answer; |
| | | if (answer) { |
| | | if(Array.isArray(answer)) { |
| | | return answer; |
| | | } else { |
| | | return answer.split(','); |
| | | } |
| | | } |
| | | return answer.split(','); |
| | | }; |
| | | |
| | | |
| | | }; |
| | | const currentAnswer = formatAnswer(activeQuestion.value.answerList); |
| | | const rightAnswer = formatAnswer(activeQuestion.value.questionAnswer); |
| | | |
| | | const answerState = (item) => { |
| | | const flag1 = currentAnswer.includes(item.prefix); |
| | | const flag1 = currentAnswer ? currentAnswer.includes(item.prefix) : false; |
| | | const flag2 = rightAnswer.includes(item.prefix); |
| | | |
| | | if (flag1 && flag2) { |
| | | return { |
| | | right: true |
| | | }; |
| | | } else { |
| | | } else if (currentAnswer) { |
| | | if (currentAnswer.length < rightAnswer.length) { |
| | | if (!flag1 && flag2) { |
| | | return { |
| | |
| | | .analysis-wrong { |
| | | color: var(--wrong-color); |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | background-color: #F56C6C !important; |
| | | color: #fff !important; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | |
| | | const gradeStore = useGradeStore(); |
| | | const { currentType, currentIndex, examDetail, examType, examInfo } = storeToRefs(gradeStore); |
| | | console.log("我草泥马:", storeToRefs(gradeStore)) |
| | | const typeComponent = { |
| | | 1: AnswerSingle, |
| | | 2: AnswerMultiple, |
| | |
| | | port: 3000, |
| | | proxy: { |
| | | '/api': { |
| | | // target: 'http://192.168.3.88:8000', |
| | | target: 'http://localhost:8000', |
| | | // target: 'http://42.193.1.25:8000', |
| | | changeOrigin: true, |
| | | } |
| | | } |