fuliqi
2024-07-08 d22a02992d557859a8c610fb74e0d070ce936d05
src/views/exam-list/data-list/index.vue
@@ -35,7 +35,7 @@
          <div class="right-container">
            <div class="button-container">
              <el-button type="primary" size="large" @click="examClick(item)"
                :disabled="stateList[item.status].disabled">开始考试</el-button>
                :disabled="stateList[item.status].disabled || item.submitStatus ==='finish'">开始考试</el-button>
            </div>
          </div>
        </div>
@@ -51,7 +51,6 @@
import { useExamStore } from '@/store/index.js';
import { getExamInfo } from '@/api/modules/exam.js';
const examStore = useExamStore();
const router = useRouter();
@@ -73,7 +72,7 @@
    type: 'success',
    disabled: false
  },
  3: {
  'finished': {
    text: '已结束',
    type: 'info',
    disabled: true
@@ -84,13 +83,12 @@
  console.log(exam);
  getExamInfo(exam.id).then((res) => {
    examStore.setExamInfo({
      id: res.data.id,
      examName: res.data.examName,
      examTime: res.data.suggestTime,
      suggestTime: res.data.suggestTime,
    });
    examStore.setExamDetail(res.data.titleList);
    // examStore.setExamInfo(res.data.examInfo);
    // examStore.setExamDetail(res.data.examQuestionList);
    // examStore.initExam();
    examStore.initExam(res.data.titleList[0].questionType);
    router.push('/exam');
  }).catch(err => {
@@ -108,4 +106,4 @@
.bottom-item {
  margin-right: 30px;
}
</style>
</style>