ZhangXianQiang
2024-06-28 b21e0d75f513ef9a87a99f059ca0aa85e3670955
src/views/exam/index.vue
@@ -40,7 +40,7 @@
              </div>
              <div class="submit-wrapper">
                <el-button type="primary" class="submit-button" @click="submitExam">提交试卷</el-button>
                <el-button type="primary" class="submit-button" @click="submitExamHandle">提交试卷</el-button>
              </div>
            </div>
@@ -148,6 +148,9 @@
import { useExamStore } from '@/store/index.js';
import { useRouter } from 'vue-router';
import { submitExam } from '@/api/modules/exam.js';
const router = useRouter();
const examStore = useExamStore();
@@ -220,7 +223,7 @@
};
// 交卷
const submitExam = () => {
const submitExamHandle = () => {
  submitDialog.value = true;
};
@@ -237,9 +240,16 @@
const timeOut = () => {
  resetAllDialog();
  timeDialog.value = true;
  setTimeout(() => {
  const temp = {
    ...examInfo.value,
    titleList: examDetail.value
  }
  submitExam(temp).then(res => {
    router.back();
  },2000);
  })
  // setTimeout(() => {
  //   router.back();
  // },2000);
};
watchEffect(() => {