From 06419b10e17c72e07f1c740836e5abb79df619d0 Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期一, 04 十一月 2024 17:55:38 +0800
Subject: [PATCH] 搭建错题本页面

---
 src/views/exam-list/data-list/index.vue |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/views/exam-list/data-list/index.vue b/src/views/exam-list/data-list/index.vue
index 12feff2..c4d9735 100644
--- a/src/views/exam-list/data-list/index.vue
+++ b/src/views/exam-list/data-list/index.vue
@@ -11,6 +11,7 @@
                   {{ stateList[item.status].text }}
                 </el-tag>
               </div>
+              <div v-if="!item.isContinue" style="margin-left: 15px">鎮ㄥ凡鎻愪氦璇曞嵎</div>
             </div>
             <div class="mid-container flex items-center my-4 text-gray-700">
               <el-icon class="mr-1">
@@ -35,7 +36,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.isContinue">寮�濮嬭�冭瘯</el-button>
             </div>
           </div>
         </div>
@@ -52,7 +53,6 @@
 import { getExamInfo } from '@/api/modules/exam.js';
 const examStore = useExamStore();
 
-
 const router = useRouter();
 
 const props = defineProps({
@@ -63,7 +63,7 @@
 });
 
 const stateList = {
-  1: {
+  'not_start': {
     text: '鏈紑濮�',
     type: 'primary',
     disabled: true
@@ -73,9 +73,14 @@
     type: 'success',
     disabled: false
   },
-  3: {
+  'finished': {
     text: '宸茬粨鏉�',
     type: 'info',
+    disabled: true
+  },
+  'cancel': {
+    text: '宸蹭綔搴�',
+    type: 'danger',
     disabled: true
   }
 };
@@ -84,12 +89,12 @@
   console.log(exam);
   getExamInfo(exam.id).then((res) => {
     examStore.setExamInfo({
-      examName: exam.examName
+      id: res.data.id,
+      examName: res.data.examName,
+      suggestTime: res.data.suggestTime,
     });
-    examStore.setExamDetail(res.data);
-    // examStore.setExamInfo(res.data.examInfo);
-    // examStore.setExamDetail(res.data.examQuestionList);
-    // examStore.initExam();
+    examStore.setExamDetail(res.data.titleList);
+    examStore.initExam(res.data.titleList[0].questionType);
     router.push('/exam');
   }).catch(err => {
 
@@ -107,4 +112,4 @@
 .bottom-item {
   margin-right: 30px;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0