Browse Source

练习的考后说明直接转到成绩报告

Michael Wang 6 years ago
parent
commit
1d2a945746

+ 11 - 4
src/features/OnlineExam/Examing/ExamingEnd.vue

@@ -47,6 +47,7 @@ export default {
   },
   },
   async mounted() {
   async mounted() {
     const examRecordDataId = this.$route.params.examRecordDataId;
     const examRecordDataId = this.$route.params.examRecordDataId;
+    const examId = this.$route.params.examId;
     const f = async () => {
     const f = async () => {
       try {
       try {
         this.getResultTimes = this.getResultTimes + 1;
         this.getResultTimes = this.getResultTimes + 1;
@@ -69,19 +70,25 @@ export default {
     try {
     try {
       if (!this.exam) {
       if (!this.exam) {
         this.exam = (await this.$http.get(
         this.exam = (await this.$http.get(
-          "/api/ecs_exam_work/exam/" + this.$route.params.examId
+          "/api/ecs_exam_work/exam/" + examId
         )).data;
         )).data;
       }
       }
 
 
+      if (this.exam.examType === "PRACTICE") {
+        this.$router.replace(
+          `/online-practice/exam/${examId}/detail?examRecordDataId=${examRecordDataId}`
+        );
+        return;
+      }
       const afterExamRemark = await this.$http.get(
       const afterExamRemark = await this.$http.get(
         "/api/ecs_exam_work/exam/examOrgProperty/" +
         "/api/ecs_exam_work/exam/examOrgProperty/" +
-          this.$route.params.examId +
+          examId +
           `/AFTER_EXAM_REMARK`
           `/AFTER_EXAM_REMARK`
       );
       );
       this.afterExamRemark = afterExamRemark.data || "";
       this.afterExamRemark = afterExamRemark.data || "";
       const showObjectScore = await this.$http.get(
       const showObjectScore = await this.$http.get(
         "/api/ecs_exam_work/exam/examOrgProperty/" +
         "/api/ecs_exam_work/exam/examOrgProperty/" +
-          this.$route.params.examId +
+          examId +
           `/IS_OBJ_SCORE_VIEW`
           `/IS_OBJ_SCORE_VIEW`
       );
       );
       this.showObjectScore = showObjectScore.data || false;
       this.showObjectScore = showObjectScore.data || false;
@@ -89,7 +96,7 @@ export default {
       if (this.examResult.isWarn) {
       if (this.examResult.isWarn) {
         const cheatingRemark = await this.$http.get(
         const cheatingRemark = await this.$http.get(
           "/api/ecs_exam_work/exam/examOrgProperty/" +
           "/api/ecs_exam_work/exam/examOrgProperty/" +
-            this.$route.params.examId +
+            examId +
             `/CHEATING_REMARK`
             `/CHEATING_REMARK`
         );
         );
         this.cheatingRemark = cheatingRemark.data || "";
         this.cheatingRemark = cheatingRemark.data || "";

+ 2 - 1
src/features/OnlinePractice/OnlinePracticeRecordDetail.vue

@@ -3,7 +3,8 @@
     <Breadcrumb style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px; background-color: #fafafa;">
     <Breadcrumb style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px; background-color: #fafafa;">
       当前所在位置:
       当前所在位置:
       <BreadcrumbItem :to="{name: 'OnlinePracticeHome'}">在线练习</BreadcrumbItem>
       <BreadcrumbItem :to="{name: 'OnlinePracticeHome'}">在线练习</BreadcrumbItem>
-      <BreadcrumbItem :to="{name: 'OnlinePracticeRecordList'}">练习详情</BreadcrumbItem>
+      <!-- 不是很容易返回练习详情,需要examStudentId, courseName等等 -->
+      <BreadcrumbItem>练习详情</BreadcrumbItem>
       <BreadcrumbItem>成绩报告</BreadcrumbItem>
       <BreadcrumbItem>成绩报告</BreadcrumbItem>
     </Breadcrumb>
     </Breadcrumb>