luohairen
2024-11-12 5165ee09de8555e12fb44c458a3d04e41f58e28f
完成错题详情查看
2个文件已修改
31 ■■■■ 已修改文件
src/api/modules/grade.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wrong-list/data-list/index.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/modules/grade.js
@@ -7,4 +7,8 @@
export const getGradeInfo = (id) => {
  return service.post('/api/student/exampaper/answer/read/' + id);
}
export const checkWrongInfo = (id,row) => {
  return service.post('/api/student/exampaper/answer/checkWrong',row);
}
src/views/wrong-list/data-list/index.vue
@@ -25,7 +25,7 @@
            align="center"
            width="100px"
            label="分数"
            prop="score"
            prop="questionScore"
        ></el-table-column>
        <el-table-column
            align="center"
@@ -64,7 +64,7 @@
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { useGradeStore } from '@/store/index.js';
import { getGradeInfo } from '@/api/modules/grade.js';
import { checkWrongInfo } from '@/api/modules/grade.js';
// dataList
const props = defineProps({
@@ -78,8 +78,8 @@
const router = useRouter();
const checkWrong = (row) => {
  getGradeInfo(row.id).then((res) => {
    const {id,examName, score,navbar,titleItems} = res.data;
  checkWrongInfo(row.id, row).then((res) => {
    const {id, examName, score, navbar, titleItems} = res.data;
    gradeStore.setExamInfo({
      id,
      examName,
@@ -91,8 +91,23 @@
    router.push('/grade');
  }).catch(err => {
  });
};
  })
}
  // getGradeInfo(row.id).then((res) => {
  //   const {id,examName, score,navbar,titleItems} = res.data;
  //   gradeStore.setExamInfo({
  //     id,
  //     examName,
  //     score,
  //     navbar
  //   });
  //   gradeStore.setExamDetail(titleItems);
  //   gradeStore.initExam(res.data.titleItems[0].questionType);
  //   router.push('/grade');
  // }).catch(err => {
  //
  // });
// 题目类型格式化
const questionTypeFormatter = (row,column,cellValue) => {