fuliqi
2024-10-28 4800366c4ae36b4900b34b7f183390fd9cd0d33b
src/views/exam-list/data-list/index.vue
@@ -52,7 +52,6 @@
import { getExamInfo } from '@/api/modules/exam.js';
const examStore = useExamStore();
const router = useRouter();
const props = defineProps({
@@ -63,7 +62,7 @@
});
const stateList = {
  1: {
  'not_start': {
    text: '未开始',
    type: 'primary',
    disabled: true
@@ -73,9 +72,14 @@
    type: 'success',
    disabled: false
  },
  3: {
  'finished': {
    text: '已结束',
    type: 'info',
    disabled: true
  },
  'cancel': {
    text: '已作废',
    type: 'danger',
    disabled: true
  }
};
@@ -84,12 +88,12 @@
  console.log(exam);
  getExamInfo(exam.id).then((res) => {
    examStore.setExamInfo({
      examId: res.data.id,
      id: res.data.id,
      examName: res.data.examName,
      suggestTime: res.data.suggestTime,
    });
    examStore.setExamDetail(res.data.titleList);
    examStore.initExam();
    examStore.initExam(res.data.titleList[0].questionType);
    router.push('/exam');
  }).catch(err => {
@@ -107,4 +111,4 @@
.bottom-item {
  margin-right: 30px;
}
</style>
</style>