ZhangXianQiang
2024-06-20 b55d02114b2f4b148fdc2311b13850236c163628
fix:修改试卷数据问题
3个文件已修改
10 ■■■■ 已修改文件
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/grade.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/grade/components/answer-sheet/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -5,7 +5,7 @@
const routes = [
  {
    path: '/',
    redirect: '/index'
    redirect: '/login'
  },
  {
src/store/modules/grade.js
@@ -1,6 +1,6 @@
import { ref, computed } from 'vue';
import { defineStore } from 'pinia';
export const useGradeStore = defineStore('exam', () => {
export const useGradeStore = defineStore('grade', () => {
  const examInfo = ref({
    examId: 1,
    examName: '考试名称',
@@ -32,6 +32,7 @@
          "gradeLevel": null,
          "subjectId": 2,
          "title": "1+1=?",
          "img": '/test_question.png',
          "items": [
            {
              "prefix": "A",
@@ -99,6 +100,7 @@
          "gradeLevel": null,
          "subjectId": 2,
          "title": "1+1=?",
          "img": '/test_question.png',
          "items": [
            {
              "prefix": "A",
@@ -192,6 +194,7 @@
          "gradeLevel": null,
          "subjectId": 2,
          "title": "1+1=?",
          "img": '/test_question.png',
          "items": [
            {
              "prefix": "A",
@@ -260,6 +263,7 @@
          "subjectId": 2,
          "title": "测试音频1",
          "audioFile": '/test.mp3',
          "img": '/test_question.png',
          "items": [
            {
              "prefix": "A",
src/views/grade/components/answer-sheet/index.vue
@@ -27,6 +27,8 @@
const activeNames = ref(examDetail.value.map(item => item.questionType));
const itemClass = (question,type,index) => {
  console.log(question);
  console.log(question.isRight);
  return {
    right: question.isRight,
    wrong: !question.isRight,