ソースを参照

fix:1、收藏集和错题集 点进去隐藏掉交卷按钮 2、做题记录-视频试卷做题报告页面更换1路由

xuqiaoying 3 年 前
コミット
d274cc4e72

+ 1 - 5
src/pages/course-exam/index.vue

@@ -1281,13 +1281,10 @@ export default {
       type: 0, //type:1章卷,2节卷,3模块卷
       bankType: 0,
       compareFaceData: 0, // 拍照匹配相似度
-      answerNum: 0, // 总次数
       collectList: [],
     };
   },
   async mounted() {
-    const {answerNum, num} = this.$route.query
-    this.answerNum = answerNum
     this.goodsId = this.$route.params.goodsId;
     this.examId = this.$route.query.examId;
     this.type = this.$route.query.type;
@@ -2567,8 +2564,7 @@ export default {
                 // moduleId: this.moduleId,
                 examId: this.examId,
                 recordId: this.recordId,
-                type: this.type,
-                answerNum: this.answerNum,
+                type: this.type, //type:1章卷,2节卷,3模块卷
               },
             });
           }, 1000);

+ 1 - 2
src/pages/course-report/index.vue

@@ -182,7 +182,6 @@ export default {
     if (JSON.stringify(this.examResult) == "{}") {
       this.$router.back(-1);
     }
-    console.log('examResult:', this.examResult)
   },
   methods: {
     getcourList() {
@@ -205,7 +204,7 @@ export default {
     bankReport() {
       this.$request.bankReportData(this.recordId).then((res) => {
         this.reportdata = res.data
-        console.log('reportdata:', this.reportdata)
+        // console.log('reportdata:', this.reportdata)
       });
     },
     currentChangeCou(val) {

+ 32 - 9
src/pages/person-center/bank-record/index.vue

@@ -97,15 +97,7 @@
                       <div
                         class="btn-line__in"
                         v-if="record.status == 1"
-                        @click="
-                          go('/bank-report/' + record.goodsId, {
-                            chapterId: record.chapterExamId,
-                            moduleId: record.moduleExamId,
-                            examId: record.examId,
-                            recordId: record.recordId,
-                            orderGoodsId: record.orderGoodsId,
-                          })
-                        "
+                        @click="doReport(record)"
                       >
                         <div>做题报告</div>
                       </div>
@@ -349,6 +341,37 @@ export default {
         });
       });
     },
+    doReport(record) {
+      console.log('做题报告', record, record.courseType)
+      if (record.courseType == 2) {
+        this.$router.push({
+          path: "/course-report",
+          query: {
+            examId: record.examId,
+            recordId: record.recordId,
+            type: record.type, //type:1章卷,2节卷,3模块卷
+          },
+        })
+      } else {
+        this.$router.push({
+            path: '/bank-report/' + record.goodsId,
+            query: {
+              chapterId: record.chapterExamId,
+              moduleId: record.moduleExamId,
+              examId: record.examId,
+              recordId: record.recordId,
+              orderGoodsId: record.orderGoodsId,
+            },
+          })
+      }
+      // go('/bank-report/' + record.goodsId, {
+      //   chapterId: record.chapterExamId,
+      //   moduleId: record.moduleExamId,
+      //   examId: record.examId,
+      //   recordId: record.recordId,
+      //   orderGoodsId: record.orderGoodsId,
+      // })
+    },
   },
 };
 </script>

+ 38 - 13
src/pages/person-center/bank-record/record-list/index.vue

@@ -64,14 +64,7 @@
                       <div
                         class="btn-line__in"
                         v-if="record.status == 1"
-                        @click="
-                          go('/bank-report/' + record.goodsId, {
-                            chapterId: record.chapterExamId,
-                            moduleId: record.moduleExamId,
-                            examId: record.examId,
-                            recordId: record.recordId,
-                            orderGoodsId: record.orderGoodsId,
-                          })
+                        @click="doReport(record)
                         "
                       >
                         <div>做题报告</div>
@@ -125,6 +118,7 @@ export default {
       },
       recordList: [],
       total: 0,
+      courseType: 1, // 2视频试卷
     };
   },
   mounted() {
@@ -132,7 +126,8 @@ export default {
     this.param.chapterExamId = this.$route.query.chapterId;
     this.param.examId = this.$route.query.examId;
     this.param.goodsId = this.$route.params.goodsId;
-    if (this.$route.query.courseType == 2) {
+    this.courseType = this.$route.query.courseType
+    if (this.courseType == 2) {
       const { examId, gradeId, chapterId, moduleId, courseId, sectionId} = this.$route.query
       this.record = {
         examId: +examId,
@@ -160,7 +155,7 @@ export default {
     currentChange(e) {
       this.param.pageNum = e;
       // this.getExamRecordList();
-      if (this.$route.query.courseType == 2) {
+      if (this.courseType == 2) {
         this.recordBankList()
       } else {
         this.examRecordList();
@@ -197,7 +192,7 @@ export default {
     async doRepeat(section) {
       // let count = await this.examRecordCount(section.examId);
       let count = 0
-      if (section.courseType == 2) {
+      if (this.courseType == 2) {
         count = await this.bankRecordDoNum(section)
       } else {
         count = await this.examRecordCount(section.examId)
@@ -222,7 +217,7 @@ export default {
         showClose: false,
       })
         .then((_) => {
-          if (section.courseType == 2){
+          if (this.courseType == 2){
               this.$router.push({
                 path: "/course-exam/" + section.goodsId,
                 query: {
@@ -256,7 +251,7 @@ export default {
               moduleId: section.moduleExamId || 0,
               chapterId: section.chapterExamId || 0,
               goodsId: section.goodsId,
-              courseType: this.$route.query.courseType,
+              courseType: this.courseType,
               orderGoodsId: section.orderGoodsId,
             },
           });
@@ -307,6 +302,36 @@ export default {
         });
       });
     },
+    doReport(record) {
+      if (this.courseType == 2) {
+        this.$router.push({
+          path: "/course-report",
+          query: {
+            examId: record.examId,
+            recordId: record.recordId,
+            type: record.type, //type:1章卷,2节卷,3模块卷
+          },
+        })
+      } else {
+        this.$router.push({
+            path: '/bank-report/' + record.goodsId,
+            query: {
+              chapterId: record.chapterExamId,
+              moduleId: record.moduleExamId,
+              examId: record.examId,
+              recordId: record.recordId,
+              orderGoodsId: record.orderGoodsId,
+            },
+          })
+      }
+      // go('/bank-report/' + record.goodsId, {
+      //   chapterId: record.chapterExamId,
+      //   moduleId: record.moduleExamId,
+      //   examId: record.examId,
+      //   recordId: record.recordId,
+      //   orderGoodsId: record.orderGoodsId,
+      // })
+    },
   },
 };
 </script>

+ 2 - 2
src/pages/subject/collect-bank.vue

@@ -915,9 +915,9 @@
                     >返回</el-button
                   >
                 </div>
-                <div class="right-box__footer">
+                <!-- <div class="right-box__footer">
                   <div class="submit" v-if="!explain" @click="submit">交卷</div>
-                </div>
+                </div> -->
                 <div class="right-box__header">答题卡</div>
                 <div class="right-box__body">
                   <div class="card">

+ 2 - 2
src/pages/subject/wrong-bank.vue

@@ -914,9 +914,9 @@
                     >返回</el-button
                   >
                 </div>
-                <div class="right-box__footer">
+                <!-- <div class="right-box__footer">
                   <div class="submit" v-if="!explain" @click="submit">交卷</div>
-                </div>
+                </div> -->
                 <div class="right-box__header">答题卡</div>
                 <div class="right-box__body">
                   <div class="card">

+ 1 - 1
src/router/index.js

@@ -676,7 +676,7 @@ router.beforeEach((to,from,next) => {
       let isBankLock = bankAdmin.some(item => {
         return to.path.indexOf(item) != -1
       })
-      console.log(isBankLock,'isBankLock')
+      console.log(isBankLock,'isBankLock', canToBank)
       if(isBankLock) {
         
         //没有执行定时器,开启锁定