ZhangXianQiang
2024-06-28 b21e0d75f513ef9a87a99f059ca0aa85e3670955
src/views/exam/components/answer-main/answer-single/index.vue
@@ -35,7 +35,11 @@
      item.isActive = true;
    }
    const answerList = filterAnswer();
    examStore.setQuestionAnswer(currentType.value, currentIndex.value, answerList.join(','));
    let temp = '';
    if(answerList) {
      temp = answerList.prefix;
    }
    examStore.setQuestionAnswer(currentType.value, currentIndex.value, temp);
  }
};
@@ -46,11 +50,11 @@
};
const resetAnswer = () => {
  activeQuestion.value.items.forEach(item => item.isActive = false);
  activeQuestion.value.questionItemList.forEach(item => item.isActive = false);
};
const filterAnswer = () => {
  return activeQuestion.value.items.filter(item => item.isActive);
  return activeQuestion.value.questionItemList.find(item => item.isActive);
}