From 6a4c9ac686d0a0d3ead45e16e8a4481b7c6406f2 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 28 六月 2024 11:02:15 +0800
Subject: [PATCH] fix:对接提交试卷
---
src/views/exam-list/data-list/index.vue | 2 +-
src/views/exam/index.vue | 32 +++++++++++++++++---------------
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/views/exam-list/data-list/index.vue b/src/views/exam-list/data-list/index.vue
index 16877c7..d18e9d9 100644
--- a/src/views/exam-list/data-list/index.vue
+++ b/src/views/exam-list/data-list/index.vue
@@ -84,7 +84,7 @@
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,
});
diff --git a/src/views/exam/index.vue b/src/views/exam/index.vue
index ae4716e..871b924 100644
--- a/src/views/exam/index.vue
+++ b/src/views/exam/index.vue
@@ -113,16 +113,13 @@
</el-dialog>
<!-- 鑰冭瘯鏃堕棿寮圭獥 -->
- <el-dialog
- v-model="timeDialog"
- align-center width="500"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :show-close="false"
- >
+ <el-dialog v-model="timeDialog" align-center width="500" :close-on-click-modal="false"
+ :close-on-press-escape="false" :show-close="false">
<div class="dialog-container flex flex-col items-center">
<div class="icon-container">
- <el-icon :size="50" color="#3680fa"><Timer /></el-icon>
+ <el-icon :size="50" color="#3680fa">
+ <Timer />
+ </el-icon>
</div>
<div class="dialog-info">
鑰冭瘯缁撴潫锛岀郴缁熻嚜鍔ㄦ敹鍗蜂腑.......
@@ -135,7 +132,7 @@
<script setup>
import { ref, watchEffect } from 'vue';
import { storeToRefs } from 'pinia';
-import { Close,Timer } from '@element-plus/icons-vue';
+import { Close, Timer } from '@element-plus/icons-vue';
import AnswerTag from './components/answer-tag/index.vue';
import AnswerProgress from './components/answer-progress/index.vue';
import AnswerSheet from './components/answer-sheet/index.vue';
@@ -234,7 +231,7 @@
const resetAllDialog = () => {
quitDialog.value = false;
submitDialog.value = false;
-}
+};
// 鏃堕棿缁撴潫
const timeOut = () => {
@@ -243,13 +240,18 @@
const temp = {
...examInfo.value,
titleList: examDetail.value
- }
+ };
submitExam(temp).then(res => {
+ returnBack();
+ }).catch(() => {
+ returnBack();
+ });
+};
+
+const returnBack = () => {
+ setTimeout(() => {
router.back();
- })
- // setTimeout(() => {
- // router.back();
- // },2000);
+ }, 2000);
};
watchEffect(() => {
--
Gitblit v1.8.0