浏览代码

考试结束

Michael Wang 6 年之前
父节点
当前提交
ab735b7e27

+ 89 - 0
src/features/OnlineExam/Examing/ExamingEnd.vue

@@ -0,0 +1,89 @@
+<template>
+
+  <div class="container" v-if="afterExamRemark">
+    <div class="instructions">
+      <h1 class="">考试说明</h1>
+      <div class="" style="text-align: left;  padding-bottom: 20px">
+        <p v-html="afterExamRemark"></p>
+      </div>
+
+      <router-link class="qm-primary-button" to="/online-exam" style="display: inline-block; width: 100%;">
+        返回主页</router-link>
+
+    </div>
+
+    <div class="exam-detail">
+      <h3 class="">科目:</h3>
+      <br>
+      <h4 class="">试卷概览(总分:)</h4>
+      <br>
+      <div>
+        <img style="width:100%; padding-top: 40px;" src="../good-wish.png" />
+      </div>
+    </div>
+
+  </div>
+
+  <div v-else>
+    正在等待数据返回...
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      afterExamRemark: null,
+      startInfo: null,
+      paperStruct: null,
+      remainTime: 120
+    };
+  },
+  async mounted() {
+    const exam = await this.$http.get(
+      "/api/ecs_exam_work/exam/examOrgProperty/" +
+        this.$route.params.examId +
+        `/AFTER_EXAM_REMARK`
+    );
+    this.afterExamRemark = exam.data || "";
+  },
+  beforeDestroy() {},
+  computed: {},
+  methods: {}
+};
+</script>
+
+<style scoped>
+.container {
+  display: grid;
+  grid-template-columns: 1fr 300px;
+  width: 100wh;
+  height: 100vh;
+}
+
+.instructions {
+  display: grid;
+  grid-template-rows: 40px minmax(200px, auto) 1fr;
+  padding: 40px 20px;
+}
+
+.exam-detail {
+  padding: 40px 20px;
+  background-color: #f5f5f5;
+
+  text-align: left;
+}
+
+.list-group {
+  list-style: none;
+}
+
+.list-group li {
+  border-bottom: 1px solid #eeeeee;
+  padding-top: 10px;
+}
+.pull-right {
+  text-align: right;
+  float: right;
+}
+</style>

+ 5 - 1
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -87,7 +87,11 @@ export default {
     async submitPaper() {
       //FIXME: submit precondition
       await this.$http.get("/api/ecs_oe_student/examControl/endExam");
-      this.$router.push("/");
+      this.$router.push({
+        path: `/online-exam/exam/${this.$route.params.examId}/examRecordData/${
+          this.$route.params.examRecordDataId
+        }/end`
+      });
     },
     examQuestion() {
       return (

+ 1 - 0
src/features/OnlineExam/OnlineExamFaceCheckModal.vue

@@ -85,6 +85,7 @@ export default {
         this.$Message.error(error);
         return;
       }
+      this.toggleFaceCheckModal(false);
       if (!pass && this.course.faceCheck) {
         this.$Modal.confirm({
           title: "郑重承诺",

+ 6 - 0
src/router.js

@@ -5,6 +5,7 @@ import NotFoundComponent from "./views/NotFoundComponent.vue";
 import OnlineExamHome from "./features/OnlineExam/OnlineExamHome.vue";
 import OnlineExamOverview from "./features/OnlineExam/OnlineExamOverview.vue";
 import ExamingHome from "./features/OnlineExam/Examing/ExamingHome.vue";
+import ExamingEnd from "./features/OnlineExam/Examing/ExamingEnd.vue";
 import OfflineExamHome from "./features/OfflineExam/OfflineExamHome.vue";
 import OnlinePracticeHome from "./features/OnlinePractice/OnlinePracticeHome.vue";
 import Login from "./features/Login/Login.vue";
@@ -40,6 +41,11 @@ let router = new Router({
       name: "OnlineExamingHome",
       component: ExamingHome
     },
+    {
+      path: "/online-exam/exam/:examId/examRecordData/:examRecordDataId/end",
+      name: "ExamingEnd",
+      component: ExamingEnd
+    },
     {
       path: "/online-practice",
       name: "OnlinePracticeHome",