xiangpei
2024-10-31 8c739c86e6c6142881ebb2b1615f6b5ccf9aca55
查看试卷bug
4个文件已修改
22 ■■■■ 已修改文件
src/store/modules/grade.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/grade-list/data-list/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/grade-list/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/grade/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/grade.js
@@ -19,6 +19,7 @@
  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];
@@ -32,9 +33,9 @@
  const setExamDetail = (detail) => {
    examDetail.value = detail;
  };
  const initExam = () => {
  const initExam = (questionType) => {
    currentIndex.value = 0;
    currentType.value = 1;
    currentType.value = questionType;
  }
  return {
    examInfo,
src/views/grade-list/data-list/index.vue
@@ -100,7 +100,7 @@
      navbar
    });
    gradeStore.setExamDetail(titleItems);
    gradeStore.initExam();
    gradeStore.initExam(res.data.titleItems[0].questionType);
    router.push('/grade');
  }).catch(err => {
@@ -118,4 +118,4 @@
.bottom-item {
  margin-right: 30px;
}
</style>
</style>
src/views/grade-list/index.vue
@@ -30,8 +30,8 @@
              </div>
              <div class="card-footer flex justify-center mb-7 shrink-0">
                <el-pagination background layout="prev, pager, next"
                :total="dataList.length"
                <el-pagination background layout="prev, pager, next"
                :total="dataList.length"
                :default-page-size="currentSize"
                :currentPage="currentIndex"
                :hide-on-single-page="true"
@@ -65,6 +65,7 @@
  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;
@@ -89,4 +90,4 @@
:deep(.el-tabs__nav-wrap:after) {
  display: none;
}
</style>
</style>
src/views/grade/index.vue
@@ -8,7 +8,7 @@
            {{ examInfo.examName }}
          </div>
          <AnswerGrade></AnswerGrade>
          <div class="return-container grow flex justify-end">
            <el-button type="danger" size="large" circle @click="closeClick">
              <template #icon>
@@ -97,7 +97,7 @@
const gradeStore = useGradeStore();
const { currentType, currentIndex, examDetail, examType, examInfo } = storeToRefs(gradeStore);
console.log("我草泥马:", storeToRefs(gradeStore))
const typeComponent = {
  1: AnswerSingle,
  2: AnswerMultiple,
@@ -222,4 +222,4 @@
  background-color: rgba($color: #3680fa, $alpha: 0.2);
  margin-bottom: 20px;
}
</style>
</style>