谢杰标 2 rokov pred
rodič
commit
af65ecfd20

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 559 - 278
src/pages/bank-exam/index.vue


+ 70 - 41
src/pages/bank-report/index.vue

@@ -14,30 +14,38 @@
         >
       </div> -->
       <div class="container">
-        <div class="section__header section__header--warm"
-          v-if="examData.doType == 2 && reportdata.reportStatus === null">
+        <div
+          class="section__header section__header--warm"
+          v-if="examData.doType == 2 && reportdata.reportStatus === null"
+        >
           <div class="title">
             <span class="icon">X</span>
             测试未通过
           </div>
           <div class="desc" v-if="reportdata.doTime">
             总时间:{{ $tools.secondToTime(reportdata.examTime) }}
-            <span class="note">答题时长:{{
+            <span class="note"
+              >答题时长:{{
                 $tools.secondToTime(reportdata.doTime, false)
-            }}</span>
+              }}</span
+            >
           </div>
         </div>
-        <div class="section__header section__header--success"
-          v-if="examData.doType == 2 && reportdata.reportStatus === 1">
+        <div
+          class="section__header section__header--success"
+          v-if="examData.doType == 2 && reportdata.reportStatus === 1"
+        >
           <div class="title">
             <span class="icon">✔</span>
             测试通过
           </div>
           <div class="desc" v-if="reportdata.doTime">
             总时间:{{ $tools.secondToTime(reportdata.examTime) }}
-            <span class="note">答题时长:{{
+            <span class="note"
+              >答题时长:{{
                 $tools.secondToTime(reportdata.doTime, false)
-            }}</span>
+              }}</span
+            >
           </div>
         </div>
 
@@ -45,9 +53,11 @@
           <div class="section__header" v-if="reportdata.doTime">
             <div class="desc">
               总时间:{{ $tools.secondToTime(reportdata.examTime) }}
-              <span class="note">答题时长:{{
+              <span class="note"
+                >答题时长:{{
                   $tools.secondToTime(reportdata.doTime, false)
-              }}</span>
+                }}</span
+              >
             </div>
           </div>
         </template>
@@ -86,18 +96,18 @@
                   <!-- 练习 -->
                   <template v-if="examData.doType == 1">
                     {{
-                        ((reportdata.rightQuestionNum /
-                          reportdata.doQuestionNum || 0) *
-                          100)
+                      ((reportdata.rightQuestionNum /
+                        reportdata.doQuestionNum || 0) *
+                        100)
                         | toFixed(0)
                     }}%
                   </template>
                   <!-- 考试 -->
                   <template v-if="examData.doType == 2">
                     {{
-                        ((reportdata.rightQuestionNum /
-                          reportdata.totalQuestionNum || 0) *
-                          100)
+                      ((reportdata.rightQuestionNum /
+                        reportdata.totalQuestionNum || 0) *
+                        100)
                         | toFixed(0)
                     }}%
                   </template>
@@ -130,16 +140,35 @@
 
         <div class="section__footer">
           <template v-if="!examType">
-            <el-button type="primary" @click="back" class="btn">返回列表</el-button>
-            <el-button type="primary" class="btn" v-if="nextExamId" @click="backBank">练习下一节</el-button>
-            <el-button type="primary" class="btn" @click="doRepeat(reportdata)">重新做题</el-button>
+            <el-button type="primary" @click="back" class="btn"
+              >返回列表</el-button
+            >
+            <el-button
+              type="primary"
+              class="btn"
+              v-if="nextExamId"
+              @click="backBank"
+              >练习下一节</el-button
+            >
+            <el-button type="primary" class="btn" @click="doRepeat(reportdata)"
+              >重新做题</el-button
+            >
           </template>
           <template v-else>
             <el-button type="primary" @click="back" class="btn">返回</el-button>
-            <el-button type="primary" @click="back" class="btn">继续练习</el-button>
+            <el-button type="primary" @click="back" class="btn"
+              >继续练习</el-button
+            >
           </template>
-          <el-button type="primary" class="btn" @click="wrongExplain(reportdata)">错题解析</el-button>
-          <el-button type="primary" class="btn" @click="allExplain(reportdata)">全部解析</el-button>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="wrongExplain(reportdata)"
+            >错题解析</el-button
+          >
+          <el-button type="primary" class="btn" @click="allExplain(reportdata)"
+            >全部解析</el-button
+          >
         </div>
 
         <div v-if="courseList.length" class="course_list">
@@ -165,8 +194,13 @@
           </div>
 
           <div class="pagination">
-            <el-pagination @current-change="currentChangeCou" background layout="prev, pager, next" :total="total"
-              :page-size="pageSize">
+            <el-pagination
+              @current-change="currentChangeCou"
+              background
+              layout="prev, pager, next"
+              :total="total"
+              :page-size="pageSize"
+            >
             </el-pagination>
           </div>
         </div>
@@ -207,7 +241,7 @@ export default {
       pageNum: 1,
       pageSize: 10,
       total: 0,
-      examType: 0
+      examType: 0,
     };
   },
   computed: {
@@ -220,8 +254,8 @@ export default {
     this.recordId = this.$route.query.recordId;
     this.orderGoodsId = this.$route.query.orderGoodsId || "";
     this.goodsId = this.$route.params.goodsId;
-    this.examType = this.$route.query.examType
-    this.getcourList()
+    this.examType = this.$route.query.examType;
+    this.getcourList();
     this.examWrongRecordWrongNum();
     this.bankExamNextExam();
     await this.bankExam();
@@ -230,24 +264,24 @@ export default {
   methods: {
     getcourList() {
       this.$axios({
-        url: '/apply/recommend/goodsList',
-        method: 'post',
+        url: "/apply/recommend/goodsList",
+        method: "post",
         data: {
           examId: this.examId,
           pageNum: this.pageNum,
           pageSize: this.pageSize,
           platform: 2,
-        }
+        },
       }).then((res) => {
         if (res.code == 200) {
-          this.courseList = res.rows || []
-          this.total = res.total
+          this.courseList = res.rows || [];
+          this.total = res.total;
         }
-      })
+      });
     },
     currentChangeCou(val) {
-      this.pageNum = val
-      this.getcourList()
+      this.pageNum = val;
+      this.getcourList();
     },
     back() {
       // this.$router.replace({
@@ -259,7 +293,7 @@ export default {
       this.$router.replace({
         path: "/person-center/my-bank/index",
         query: {
-          examType: this.examType || undefined
+          examType: this.examType * 1 || undefined,
         },
       });
     },
@@ -708,12 +742,8 @@ export default {
           color: #333333;
           text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
         }
-
-
       }
 
-
-
       &__body {
         .list {
           width: 100%;
@@ -723,7 +753,6 @@ export default {
           }
         }
       }
-
     }
 
     .pagination {

+ 2 - 5
src/pages/person-center/my-bank/bank-detailCopy/index.vue

@@ -533,7 +533,6 @@ export default {
       this.recordItem = recordItem;
       this.orderGoodsId = data.orderGoodsId;
       this.goodsId = data.goodsId;
-      this.activeName = "0";
       this.getExamType(data.goodsId);
       // if (this.recordItem) {
       //   this.getRecordItem();
@@ -706,10 +705,8 @@ export default {
             let item = this.newList.find(
               (e) => e.paperName == ["每日一练", "随机练习"][examType - 1]
             );
-            if (item) {
-              this.activeName = item.paperId + "";
-              this.handelTab();
-            }
+            this.activeName =
+              (item ? item.paperId : this.newList[0].paperId) + "";
           } else {
             this.activeName = this.newList[0].paperId + "";
           }

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov