Explorar o código

完整上线版本v2.0

Tang %!s(int64=2) %!d(string=hai) anos
pai
achega
858fd8417c
Modificáronse 29 ficheiros con 2131 adicións e 3994 borrados
  1. 7 0
      src/apis/user.js
  2. 12 1
      src/axios.js
  3. 33 2
      src/common/tools.js
  4. 40 25
      src/components/buyCourseModal/index.vue
  5. 2 0
      src/components/selectClassModal/index.vue
  6. 2 2
      src/main.js
  7. 1 0
      src/mixin/index.js
  8. 116 14
      src/pages/course-detail/components/CourseTree.vue
  9. 46 42
      src/pages/course-detail/index.vue
  10. 10 6
      src/pages/course-exam/index.vue
  11. 267 106
      src/pages/course-report/index.vue
  12. 1 8
      src/pages/login/index.vue
  13. 10 8
      src/pages/mock-exam/index.vue
  14. 1 1
      src/pages/payment-success/index.vue
  15. 2 1
      src/pages/person-center/mock-record/index.vue
  16. 53 14
      src/pages/person-center/my-bank/index/index.vue
  17. 1 1
      src/pages/person-center/my-classhour/index/index.vue
  18. 1 1
      src/pages/person-center/my-course/components/AppointTest.vue
  19. 1 1
      src/pages/person-center/my-course/courseData.vue
  20. 0 2139
      src/pages/person-center/my-course/index copy.vue
  21. 532 734
      src/pages/person-center/my-course/index.vue
  22. 0 0
      src/pages/person-center/my-examination/appointment-add-kp/index.vue
  23. 1 1
      src/pages/person-center/my-examination/appointment-add/index.vue
  24. 26 25
      src/pages/person-center/my-examination/appointment/index.vue
  25. 3 746
      src/pages/person-center/my-examination/index.vue
  26. 759 0
      src/pages/person-center/my-examination/index/index.vue
  27. 104 80
      src/pages/person-center/my-message/index.vue
  28. 11 4
      src/pages/person-center/play-record/index.vue
  29. 89 32
      src/router/index.js

+ 7 - 0
src/apis/user.js

@@ -167,6 +167,13 @@ export default {
       data: data,
     })
   },
+  appuseroffline(data) {
+    return request({
+      url: '/app/user/offline',
+      method: 'post',
+      data: data,
+    })
+  },
 
   lockLockAction(data) {
 		return request({

+ 12 - 1
src/axios.js

@@ -1,7 +1,8 @@
 import axios from 'axios'
 import store from './store'
+import { Notification } from 'element-ui'
 export const BASE_URL = process.env.BASE_URL    //测试-外网
-// export const BASE_URL = "http://192.168.1.24:5055"    //测试-外网
+// export const BASE_URL = "http://192.168.1.7:5055"    //测试-外网
 export const tenantId = process.env.TENANT_ID
 import tools from './common/tools'
 import router from './router'
@@ -72,6 +73,16 @@ request.interceptors.response.use(async (response) => {
         let res = await refreshToken(response.config)
         return res
       }
+    } else if (code == 409) {
+      Notification.error({
+        title: "您已被强制下线"
+      })
+      store.commit('setCurrentRouter', router.currentRoute)
+      localStorage.removeItem('user_account')
+      localStorage.removeItem('token')
+      router.push({
+        path: '/login'
+      })
     } else if (code == 500) {
       // Message({
       //   message: res.msg,

+ 33 - 2
src/common/tools.js

@@ -76,7 +76,7 @@ export default {
 		var m = Math.floor(t / 60 % 60); //分 var m=Math.floor(t/1000/60%60)
 		var s = Math.floor(t % 60); //秒 var s=Math.floor(t/1000%60)
 		if (parseInt(d) < 10) {
-			d = "0" + d;
+			// d = "0" + d;
 		}
 		if (parseInt(h) < 10) {
 			h = "0" + h;
@@ -147,7 +147,7 @@ export default {
 		}
 
 		if (hasChinese) {
-			return Y + '年' + M + '月' + D + '日' + h + m + s;
+			return Y + '年' + M + '月' + D + '日 ' + h + m + s;
 		} else {
 			return Y + M + D + h + m + s;
 		}
@@ -213,6 +213,37 @@ export default {
 
 	},
 
+	//计算两个时间之间的时间差 多少天时分秒
+	intervalTime(startTime, endTime) {
+		// var timestamp=new Date().getTime(); //计算当前时间戳
+		var timestamp = (Date.parse(new Date())) / 1000;//计算当前时间戳 (毫秒级)
+		var date1 = ""; //开始时间
+		if (timestamp < startTime) {
+			date1 = startTime;
+		} else {
+			date1 = timestamp; //开始时间
+		}
+		var date2 = endTime; //结束时间
+		// var date3 = date2.getTime() - date1.getTime(); //时间差的毫秒数
+		var date3 = (date2 - date1) * 1000; //时间差的毫秒数
+		//计算出相差天数
+		var days = Math.floor(date3 / (24 * 3600 * 1000));
+		//计算出小时数
+		//2021-11-15 10:48:07 2021-11-15 17:34:39 406分钟
+		var leave1 = date3 % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
+		var hours = Math.floor(leave1 / (3600 * 1000));
+		//计算相差分钟数
+		var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
+		var minutes = Math.floor(leave2 / (60 * 1000));
+
+		//计算相差秒数
+
+		var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
+		var seconds = Math.round(leave3 / 1000);
+		console.log(days + "天 " + hours + "小时 ")
+		// return   days + "天 " + hours + "小时 " + minutes + " 分钟" + seconds + " 秒"
+		return days + "天 " + hours + "小时 "
+	},
 	/**
 	 * 
 	 * @param {*} data 

+ 40 - 25
src/components/buyCourseModal/index.vue

@@ -75,7 +75,7 @@ import ClassTimeTip from "@/components/common/ClassTimeTip.vue";
 export default {
   name: "BuyCourseModal",
   computed: {
-    ...mapGetters(["userInfo"]),
+    ...mapGetters(["userInfo"])
   },
   data() {
     return {
@@ -89,8 +89,8 @@ export default {
       educationId: "",
       props: {
         lazy: true,
-        lazyLoad: this.lazyLoad,
-      },
+        lazyLoad: this.lazyLoad
+      }
     };
   },
   mounted() {},
@@ -100,35 +100,47 @@ export default {
       this.gradeList = [];
       this.selectClassModal = true;
       this.goodsDetail = item;
+      if (this.goodsDetail.specialGoods) {
+        this.selectClick(this.goodsDetail, "class", true);
+      }
+      if (
+        this.goodsDetail.templateType == "apply" &&
+        this.goodsDetail.goodsType == 1
+      ) {
+        this.selectClick(this.goodsDetail, "exam", true);
+      }
     },
-    selectClick(goodsDetail, type) {
+    selectClick(goodsDetail, type, status) {
       if (type == "class") {
         //选择班级
         if (!this.gradeList.length) {
           this.$request
             .goodsGradeList({ goodsId: goodsDetail.goodsId })
-            .then((res) => {
+            .then(res => {
               this.gradeList = res.rows;
               if (this.gradeList.length == 0) {
                 let item = {
                   className: "系统分班",
-                  gradeId: 0,
+                  gradeId: 0
                 };
                 this.gradeList.push(item);
               } else {
                 let isGradeFull = this.gradeList.every(
-                  (item) =>
+                  item =>
                     item.studentNum > 0 && item.studentNum == item.studentUpper
                 );
                 //所有班级都满了
                 if (isGradeFull) {
                   let item = {
                     className: "系统分班",
-                    gradeId: 0,
+                    gradeId: 0
                   };
                   this.gradeList.unshift(item);
                 }
               }
+              if(status){
+                this.gradeId = this.gradeList[0].gradeId
+              }
             });
         }
       } else if (type == "apply") {
@@ -137,8 +149,11 @@ export default {
         //选择考期
         this.$request
           .getExamineList({ projectId: goodsDetail.projectId })
-          .then((res) => {
+          .then(res => {
             this.examineList = res.rows;
+            if(status){
+                this.educationId = this.examineList[0].educationId
+              }
           });
       }
     },
@@ -147,7 +162,7 @@ export default {
         if (!this.gradeId && this.gradeId !== 0) {
           this.$message({
             message: "请选择班级",
-            type: "warning",
+            type: "warning"
           });
           return;
         }
@@ -168,22 +183,22 @@ export default {
         if (!this.educationId) {
           this.$message({
             message: "请选择考期",
-            type: "warning",
+            type: "warning"
           });
           return false;
         }
       }
 
       let selectGoodsList = JSON.parse(JSON.stringify([this.goodsDetail]));
-      selectGoodsList.forEach((item) => {
+      selectGoodsList.forEach(item => {
         if (item.goodsType == 1) {
           if (item.specialGoods == 1) {
             let goodsInputData = {
               type: "class",
               gradeId: this.gradeId,
               gradeJson: JSON.stringify(
-                this.gradeList.find((grade) => grade.gradeId == this.gradeId)
-              ),
+                this.gradeList.find(grade => grade.gradeId == this.gradeId)
+              )
             };
             item.goodsInputData = goodsInputData;
           }
@@ -193,9 +208,9 @@ export default {
               applyAreasJson: JSON.stringify(this.applyAreas),
               examDateJson: JSON.stringify(
                 this.examineList.find(
-                  (exam) => exam.educationId == this.educationId
+                  exam => exam.educationId == this.educationId
                 )
-              ),
+              )
             };
             item.goodsInputData = goodsInputData;
           }
@@ -205,18 +220,18 @@ export default {
       localStorage.setItem("checkGoodsList", JSON.stringify(selectGoodsList));
 
       this.$router.push({
-        path: "/payment",
+        path: "/payment"
       });
     },
     /**
      * 获取所有省份
      */
     getProvinceList() {
-      this.$request.getProvinceList().then((res) => {
-        this.provinceList = res.rows.map((item) => ({
+      this.$request.getProvinceList().then(res => {
+        this.provinceList = res.rows.map(item => ({
           value: item.areaId,
           label: `${item.areaName}`,
-          leaf: false,
+          leaf: false
         }));
       });
     },
@@ -227,20 +242,20 @@ export default {
         areaName: node.parent.label,
         areaId: node.parent.value,
         cityId: node.value,
-        cityName: node.label,
+        cityName: node.label
       };
-    },
+    }
   },
   computed: {
     text() {
       let str = "";
 
       return str;
-    },
+    }
   },
   components: {
-    ClassTimeTip,
-  },
+    ClassTimeTip
+  }
 };
 </script>
 

+ 2 - 0
src/components/selectClassModal/index.vue

@@ -122,6 +122,8 @@ export default {
               self.gradeList.unshift(item);
             }
           }
+          //自动选中第一个
+          self.gradeValue = self.gradeList[0].gradeId
         });
     },
   },

+ 2 - 2
src/main.js

@@ -11,7 +11,7 @@ import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 import filters from './filters/index.js'
 import upload from '@/common/uploadFile'
-import mixin from '@/mixin/index'
+// import mixin from '@/mixin/index'
 import moment from "moment"
 import vueEsign from 'vue-esign'
 import axios from './axios.js'
@@ -27,7 +27,7 @@ Vue.prototype.$moment = moment
 
 Vue.use(ElementUI);
 Vue.use(vueEsign)
-Vue.mixin(mixin)
+// Vue.mixin(mixin)
 
 Object.keys(filters).forEach(key => {
     Vue.filter(key, filters[key])

+ 1 - 0
src/mixin/index.js

@@ -158,6 +158,7 @@ export default {
 
   beforeDestroy() {
     try {
+      console.log("触发一下给我看")
       this.$msgbox.close();
     } catch (err) { }
   },

+ 116 - 14
src/pages/course-detail/components/CourseTree.vue

@@ -31,7 +31,11 @@
       >
         <div class="item" v-for="(menu, index) in courseItem.list" :key="index">
           <template v-if="menu.type == 1">
-            <div class="item__title" @click="openModule(menu)">
+            <div
+              class="item__title"
+              @click="openModule(menu)"
+              style="padding:0px 8px;"
+            >
               <i
                 :class="{
                   'el-icon-caret-right': !menu.showList,
@@ -41,6 +45,12 @@
               <div class="MenuNames">
                 {{ menu.menuName }}
               </div>
+              <span
+                class="btn_status"
+                style="height: 20px;line-height: 20px;font-weight: 400;"
+                :class="'btn_status_' + getNewModuleStudyStatus(menu, true)"
+                >{{ getNewModuleStudyStatus(menu) }}</span
+              >
             </div>
             <div class="item__content">
               <div class="bank-chapter" v-if="menu.showList">
@@ -61,6 +71,13 @@
                       }"
                     ></i
                     >{{ chapter.name }}
+                    <span
+                      class="btn_status"
+                      :class="
+                        'btn_status_' + getNewChapterStudyStatus(chapter, true)
+                      "
+                      >{{ getNewChapterStudyStatus(chapter) }}</span
+                    >
                   </div>
 
                   <div
@@ -68,7 +85,7 @@
                     v-if="chapter.showList && chapter.type == 1"
                   >
                     <div
-                    :id="'section-'+section.typeId"
+                      :id="'section-' + section.typeId"
                       class="bank-section__item"
                       :class="{
                         active: isActive(section)
@@ -281,11 +298,18 @@
                       }"
                     ></i
                     >{{ menu.menuName }}
+                    <span
+                      class="btn_status"
+                      :class="
+                        'btn_status_' + getNewChapterStudyStatus(menu, true)
+                      "
+                      >{{ getNewChapterStudyStatus(menu) }}</span
+                    >
                   </div>
 
                   <div class="bank-section" v-if="menu.showList">
                     <div
-                      :id="'section-'+menu.typeId"
+                      :id="'section-' + menu.typeId"
                       class="bank-section__item"
                       :class="{
                         active: isActive(section)
@@ -450,7 +474,7 @@
             <div class="item__content">
               <div class="bank-section">
                 <div
-                :id="'section-'+menu.typeId"
+                  :id="'section-' + menu.typeId"
                   class="bank-section__item"
                   :class="{
                     active: isActive(menu)
@@ -545,6 +569,7 @@
     <el-dialog
       title="温馨提示"
       width="380px"
+      @open="getAllSectionList"
       center
       class="tip-dialog"
       :visible.sync="dialogPalyVisible"
@@ -576,12 +601,10 @@
       </template>
       <template v-else>
         <p>
-          当前是最后一个视频并已学习完,请检查所有章节的视频是否已学习完成
+          恭喜您课程学习全部完成,教务会在1-3个工作日内完成学习初审,请耐心等待
         </p>
         <div class="btn2">
-          <el-button type="primary" round @click="dialogPalyVisible = false"
-            >确定</el-button
-          >
+          <el-button type="primary" round @click="jumpPage">确定</el-button>
         </div>
       </template>
     </el-dialog>
@@ -629,6 +652,11 @@ export default {
     this.init();
   },
   methods: {
+    jumpPage() {
+      this.$router.replace({
+        path: "person-center/my-course"
+      });
+    },
     gotoExamination() {
       let A = this.allSectionList.findIndex(
         i =>
@@ -636,19 +664,19 @@ export default {
           i.chapterId == this.sectionItem.chapterId &&
           i.sectionId == this.sectionItem.sectionId
       );
-      if(A !== -1){
-        var a = 'section-'+this.allSectionList[A+1].examId
-        const btn = document.getElementById(a)
+      if (A !== -1) {
+        var a = "section-" + this.allSectionList[A + 1].examId;
+        const btn = document.getElementById(a);
         btn.onclick = () => {
           //
         };
         const event = new MouseEvent("click", {
           view: window,
           bubbles: true,
-          cancelable: true,
+          cancelable: true
         });
         btn.dispatchEvent(event);
-        console.log(a)
+        console.log(a);
       }
       return;
     },
@@ -969,6 +997,7 @@ export default {
             learning: section.learning,
             type: type,
             chapterId: section.chapterId || 0,
+            nextStatus: "next", //是否继续播放课程
             orderGoodsId: this.orderGoodsId
           }
         });
@@ -1011,6 +1040,7 @@ export default {
           learning: section.learning,
           type: type,
           chapterId: section.chapterId || 0,
+          nextStatus: "next", //是否继续播放课程
           orderGoodsId: this.orderGoodsId
         }
       });
@@ -1117,7 +1147,7 @@ export default {
       // let { rebuild, moduleId, chapterId } = section;
       let { rebuild, moduleId, chapterId, parentId, menuId } = section;
 
-      if (this.goodsLearningOrder != 2 || rebuild) {
+      if (this.goodsLearningOrder != 2) {
         return true;
       }
       if (this.treeList.length > 1 && courseIndex > 0) {
@@ -1206,6 +1236,54 @@ export default {
     }
   },
   computed: {
+    getNewChapterStudyStatus: function() {
+      return function(item, style_type) {
+        const Array1 = this.allSectionList.filter(
+          i =>
+            (i.chapterId == item.chapterId || i.chapterId == item.menuId) &&
+            (i.moduleId == item.moduleId || i.moduleId == 0)
+        );
+        var str = "";
+        console.log("chapter", this.sectionItem, item);
+        if (Array1.every(i => i.studyStatus == 1)) {
+          item.studyStatus = 1;
+          str = style_type ? 1 : "已学完";
+        } else {
+          item.studyStatus = -1;
+          str = style_type ? -1 : "待学习";
+        }
+        if (
+          (item.menuId == this.sectionItem.chapterId &&
+            0 == this.sectionItem.moduleId) ||
+          (item.chapterId == this.sectionItem.chapterId &&
+            item.moduleId == this.sectionItem.moduleId)
+        ) {
+          item.studyStatus = 0;
+          str = style_type ? 0 : "学习中";
+        }
+        return str;
+      };
+    },
+    getNewModuleStudyStatus: function() {
+      return function(item, style_type) {
+        const Array1 = this.allSectionList.filter(
+          i => i.moduleId == item.menuId || i.moduleId == 0
+        );
+        var str = "";
+        if (Array1.every(i => i.studyStatus == 1)) {
+          item.studyStatus = 1;
+          str = style_type ? 1 : "已学完";
+        } else {
+          item.studyStatus = -1;
+          str = style_type ? -1 : "待学习";
+        }
+        if (item.menuId == this.sectionItem.moduleId) {
+          item.studyStatus = 0;
+          str = style_type ? 0 : "学习中";
+        }
+        return str;
+      };
+    },
     query() {
       return this.$route.query;
     },
@@ -1269,6 +1347,30 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.btn_status {
+  float: right;
+  padding: 0px 4px;
+  font-size: 12px;
+  border: 1px solid #d9ecff;
+  border-radius: 4px;
+  box-sizing: border-box;
+  white-space: nowrap;
+}
+.btn_status_-1 {
+  background-color: #ecf5ff;
+  border-color: #d9ecff;
+  color: #409eff;
+}
+.btn_status_1 {
+  background-color: #f0f9eb;
+  border-color: #e1f3d8;
+  color: #67c23a;
+}
+.btn_status_0 {
+  background-color: #fdf6ec;
+  border-color: #faecd8;
+  color: #e6a23c;
+}
 .item__title {
   display: flex;
   align-items: center;

+ 46 - 42
src/pages/course-detail/index.vue

@@ -884,6 +884,7 @@
 </template>
 
 <script>
+import { Loading } from 'element-ui';
 import axios from "axios";
 import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
@@ -1343,60 +1344,33 @@ export default {
       return menuTab;
     }
   },
+  created(){
+    Loading.service().close()
+  },
   async mounted() {
-    console.log(this.$route.params);
-    this.courseId = +this.$route.query.courseId || "";
-    this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
+    console.log(1)
+    this.courseId = this.$route.query.courseId || "";
     this.goodsId = this.$route.params.goodsId;
     this.orderGoodsId = this.$route.query.orderGoodsId;
     this.gradeId = this.$route.query.gradeId;
     this.sectionItem = this.$route.query;
     let isOther = this.$route.query.isOther || "";
-
+    this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
     if (isOther) {
-      const confirmText = [
-        "您的学习账号已经开通,请按照步骤操作,进行学习。",
-        "1.点击【跳转学习网址】按钮",
-        "2.打开学习网址后,选择【个人用户】进行登录",
-        "(1)账号:您个人的身份证号码",
-        "(2)密码:身份证号码,再加111111"
-      ];
-      const newDatas = [];
-      const h = this.$createElement;
-      for (const i in confirmText) {
-        newDatas.push(h("p", null, confirmText[i]));
-      }
-      this.$confirm(h("div", null, newDatas), "温馨提示", {
-        beforeClose: type => {
-          if (type == "confirm") {
-            window.open("http://admin.zhujianpeixun.com/", "_blank");
-          } else if (type == "cancel") {
-            this.$router.back(-1);
-          }
-        },
-        confirmButtonText: "跳转学习网址",
-        cancelButtonText: "关闭",
-        closeOnClickModal: false,
-        closeOnPressEscape: false,
-        distinguishCancelAndClose: false,
-        showClose: false
-      });
-      return;
+      this.isOtherFunc()
     }
-
     if (this.$route.query.rebuild) {
       this.courseTabIndex = "2";
     }
-
     await this.getGoodsDetail(); //商品详情
-    this.dictList();
+    this.dictList();//获取字典
 
     this.getbaseprofiletplists().then(async res => {
-      console.log("tanglian2");
       await this.courseCourseList();
       this.getRebuildCourse();
     });
     document.addEventListener("visibilitychange", this.pauseVideo);
+    console.log(3)
   },
   beforeDestroy() {
     clearTimeout(this.takeSetInt);
@@ -1422,13 +1396,40 @@ export default {
     //     .then((res) => {});
     // }
     this.clears();
-    // clearInterval(this.answerTimer);
-    // clearInterval(this.postTimer);
-    // clearInterval(this.livingTimer);
   },
   methods: {
     ...mapMutations(["getCartCount"]),
     ...mapActions(["getUserInfo"]),
+    isOtherFunc(){
+      const confirmText = [
+        "您的学习账号已经开通,请按照步骤操作,进行学习。",
+        "1.点击【跳转学习网址】按钮",
+        "2.打开学习网址后,选择【个人用户】进行登录",
+        "(1)账号:您个人的身份证号码",
+        "(2)密码:身份证号码,再加111111"
+      ];
+      const newDatas = [];
+      const h = this.$createElement;
+      for (const i in confirmText) {
+        newDatas.push(h("p", null, confirmText[i]));
+      }
+      this.$confirm(h("div", null, newDatas), "温馨提示", {
+        beforeClose: type => {
+          if (type == "confirm") {
+            window.open("http://admin.zhujianpeixun.com/", "_blank");
+          } else if (type == "cancel") {
+            this.$router.back(-1);
+          }
+        },
+        confirmButtonText: "跳转学习网址",
+        cancelButtonText: "关闭",
+        closeOnClickModal: false,
+        closeOnPressEscape: false,
+        distinguishCancelAndClose: false,
+        showClose: false
+      });
+      return;
+    },
     switchBoxFunc() {
       this.switchBox = !this.switchBox;
     },
@@ -2601,7 +2602,6 @@ export default {
         }
         if (this.gradeId > 0) {
           //提交完资料返回判断是否已开班
-
           this.getGradeInfo();
         }
       });
@@ -3311,7 +3311,7 @@ export default {
         let self = this;
         this.$request.goodsDetail(this.goodsId).then(res => {
           self.goodsData = res.data;
-          console.log("tanglian1");
+          console.log("tanglian1",self.goodsData.erJianErZao);
           self.gradeId = self.goodsData.gradeId;
           if (this.goodsData.categoryName) {
             this.infoForm.apply_post = this.goodsData.categoryName;
@@ -3635,6 +3635,7 @@ export default {
         this.player.on("s2j_onVideoPause", () => {
           clearInterval(this.postTimer);
           if (this.sectionItem.learning != 1 && this.goodsData.erJianErZao) {
+            console.log(123)
             this.videoPause = setTimeout(() => {
               if (!this.takePhotoModal) {
                 if (this.isFullScreen()) {
@@ -4519,7 +4520,9 @@ export default {
           gradeId: this.gradeId
         })
         .then(async res => {
-          this.rebuildCourseList = res.data;
+          if(res.data.length > 0){
+            this.rebuildCourseList = [res.data[0]];
+          }
         });
     },
 
@@ -4547,6 +4550,7 @@ export default {
           .courseCourseList({ goodsId: this.goodsId, gradeId: this.gradeId })
           .then(async res => {
             this.courseList = res.rows;
+            console.error("res.rows",res.rows)
             if (!this.courseId) {
               this.courseId = this.courseList[0].courseId;
             }

+ 10 - 6
src/pages/course-exam/index.vue

@@ -1124,6 +1124,7 @@
 </template>
 
 <script>
+import myMixins from "@/mixin";
 import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
@@ -1139,6 +1140,7 @@ export default {
     CollectionBox,
     HeaderTabBox
   },
+  mixins: [myMixins],
   data() {
     return {
       hasTake: false,
@@ -1210,7 +1212,7 @@ export default {
       collectList: [],
       doMode: 1,
       simulateExamId: "",
-      examData:{}
+      examData: {}
     };
   },
   async mounted() {
@@ -1311,8 +1313,9 @@ export default {
             });
             return;
           }
-          this.allTimes =this.examData.answerTime * 60;
-          this.lastTime = this.examData.answerTime && this.examData.answerTime * 60;
+          this.allTimes = this.examData.answerTime * 60;
+          this.lastTime =
+            this.examData.answerTime && this.examData.answerTime * 60;
 
           data.forEach((item, index) => {
             if (typeof item.jsonStr == "string") {
@@ -1816,7 +1819,7 @@ export default {
     bankExam() {
       return this.$request.bankExam(this.examId).then(res => {
         this.bankType = res.data.doType;
-        this.examData = res.data
+        this.examData = res.data;
         if (this.bankType == 2) {
           this.needBack = true;
         }
@@ -2366,7 +2369,7 @@ export default {
         });
         return;
       }
-      let form = this.calculateScore(this.questionList)
+      let form = this.calculateScore(this.questionList);
       // let score = 0; //计算总分
       // let reportStatus = 0;
       // let number = 0; //做对的题目数量
@@ -2546,6 +2549,7 @@ export default {
             this.$router.replace({
               path: "/course-report",
               query: {
+                nextStatus: this.$route.query.nextStatus,
                 // orderGoodsId: this.orderGoodsId,
                 // chapterId: this.chapterId,
                 // moduleId: this.moduleId,
@@ -2605,7 +2609,7 @@ export default {
       }
       clearInterval(this.postTimer);
       clearInterval(this.timer);
-      let form = this.calculateScore(this.questionList)
+      let form = this.calculateScore(this.questionList);
       // let number = 0;
       // let score = 0;
       // let doQuestionNum = 0;

+ 267 - 106
src/pages/course-report/index.vue

@@ -95,11 +95,27 @@
         </div>
 
         <div class="section__footer">
-          <el-button type="primary" class="btn"  @click="backList()">返回列表</el-button>
+          <el-button type="primary" class="btn" @click="backList()"
+            >返回列表</el-button
+          >
           <!-- <el-button type="primary" class="btn">练习下一节</el-button> -->
-          <el-button type="primary" class="btn" @click="doRepeat(reportdata)" v-if="reportdata.doMode != 3 && !reportdata.reportStatus">重新做题</el-button>
-          <el-button type="primary" class="btn" @click="wrongExplain(reportdata)" v-if="doWrongQuestionNum">错题解析</el-button>
-          <el-button type="primary" class="btn" @click="allExplain(reportdata)">全部解析</el-button>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="doRepeat(reportdata)"
+            v-if="reportdata.doMode != 3 && !reportdata.reportStatus"
+            >重新做题</el-button
+          >
+          <el-button
+            type="primary"
+            class="btn"
+            @click="wrongExplain(reportdata)"
+            v-if="doWrongQuestionNum"
+            >错题解析</el-button
+          >
+          <el-button type="primary" class="btn" @click="allExplain(reportdata)"
+            >全部解析</el-button
+          >
         </div>
 
         <div v-if="courseList.length" class="course_list">
@@ -107,14 +123,6 @@
             <div class="title">相关推荐</div>
           </div>
           <div class="course__body">
-            <!-- <p
-              v-if="
-                !courseList.length
-              "
-              class="text_align"
-            >
-              无推荐课程
-            </p> -->
             <ul class="list clearfix">
               <template v-for="(item, index) in courseList">
                 <li class="course-item" :key="index">
@@ -137,6 +145,22 @@
         </div>
       </div>
     </section>
+    <el-dialog
+      title="提示"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :visible.sync="nextDialogStatus"
+      width="400px"
+    >
+      <span>是否继续学习?</span>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="nextDialogStatus = false"
+          >取消</el-button
+        ><el-button type="primary" @click="nextJump"
+          >确定</el-button
+        >
+      </span>
+    </el-dialog>
     <ToolBar></ToolBar>
     <Footer></Footer>
   </div>
@@ -154,92 +178,235 @@ export default {
     Footer,
     Header,
     ToolBar,
-    GoodsItem,
+    GoodsItem
   },
   data() {
     return {
-      examId: '',
+      nextDialogStatus:false,
+      examId: "",
       courseList: [],
-			pageNum: 1,
-			pageSize: 10,
-			total: 0,
-      recordId: '',
+      pageNum: 1,
+      pageSize: 10,
+      total: 0,
+      recordId: "",
       type: 0, //type:1章卷,2节卷,3模考卷
       reportdata: {},
+      studyItem:{}
     };
   },
   computed: {
     ...mapGetters(["examResult"]),
     doWrongQuestionNum() {
-      let value = this.reportdata.totalQuestionNum - this.reportdata.rightQuestionNum - this.reportdata.lessQuestionNum
-      return value > 0 ? value : 0
+      let value =
+        this.reportdata.totalQuestionNum -
+        this.reportdata.rightQuestionNum -
+        this.reportdata.lessQuestionNum;
+      return value > 0 ? value : 0;
     }
   },
   created() {
-    const { examId, recordId, type } = this.$route.query
-    this.examId = examId
-    this.recordId = recordId
-    this.type = type
-    this.getcourList()
-    this.bankReport()
+    const { examId, recordId, type } = this.$route.query;
+    this.examId = examId;
+    this.recordId = recordId;
+    this.type = type;
+    this.getcourList();
+    this.bankReport();
   },
   mounted() {
-    console.log('examResult:', this.examResult)
+    console.log("examResult:", this.examResult);
     // if (JSON.stringify(this.examResult) == "{}") {
     //   this.$router.back(-1);
     // }
   },
   methods: {
-    getcourList() {
-        this.$axios({
-            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
+    studyRecordMenuAllList(item) {
+      return new Promise(resolve => {
+        this.$request
+          .studyRecordMenuAllListWithExam({
+            courseId: item.courseId,
+            gradeId: item.gradeId,
+            goodsId: item.goodsId
+          })
+          .then(res => {
+            res.data = res.data.filter(
+              e => e.sectionType != 2 && e.doType != 1
+            );
+            resolve(res.data);
+          });
+      });
+    },
+    checkListDontStudy(list) {
+      if (list.length === 0) {
+        this.$message.warning("该课程无学习内容");
+        return false;
+      }
+      const index = list.findIndex(
+        i => i.studyStatus == -1 || i.studyStatus == 0
+      );
+      if (index != -1) {
+        return list[index];
+      } else {
+        this.$message.success("该课程内容已全部学完");
+        return false;
+      }
+    },
+    // 新增用户视频学习日志
+    studyLog(item, studyItem) {
+      this.$axios({
+        url: "/user/study/log",
+        method: "post",
+        data: {
+          goodsId: item.goodsId,
+          courseId: studyItem.courseId,
+          moduleId: studyItem.moduleId || 0,
+          chapterId: studyItem.chapterId || 0,
+          sectionId: studyItem.sectionId || 0,
+          fromPlat: 2, //来源平台 1小程序 2PC网站
+          goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
+          orderGoodsId: item.orderGoodsId
+        }
+      }).then(res => {
+        console.log("直播的用户学习日志:", res);
+      });
+    },
+    bankRecordDoNum(item, studyItem) {
+      return new Promise(resolve => {
+        this.$request
+          .bankRecordDoNum({
+            goodsId: item.goodsId,
+            gradeId: item.gradeId,
+            chapterId: studyItem.chapterId,
+            courseId: studyItem.courseId,
+            moduleId: studyItem.moduleId,
+            examId: studyItem.examId
+          })
+          .then(res => {
+            resolve(res.data);
+          });
+      });
+    },
+    async nextJump(){
+      var item = this.reportdata;
+      var studyItem = this.studyItem
+      if (studyItem.sectionId) {
+            //返回节
+            this.$router.replace({
+              path: `/my-course-detail/${item.goodsId}`,
+              query: {
+                gradeId: item.gradeId,
+                orderGoodsId: item.orderGoodsId,
+                courseId: studyItem.courseId,
+                chapterId: studyItem.chapterId,
+                moduleId: studyItem.moduleId,
+                sectionId: studyItem.sectionId,
+                recordingUrl: studyItem.recordingUrl,
+                liveUrl: studyItem.liveUrl,
+                sectionType: studyItem.sectionType,
+                liveStartTime: studyItem.liveStartTime,
+                liveEndTime: studyItem.liveEndTime
+              }
+            });
+            this.studyLog(item, studyItem);
+          }
+          if (studyItem.examId) {
+            //有次数限制
+            let num = await this.bankRecordDoNum(item, studyItem);
+            let examItem = await this.$request.getExamDetail(studyItem.examId);
+            // section.doNum
+            // record.status == 0 && record.historyExamJson 继续做题
+            if (
+              (examItem.data.answerNum - num > 0 &&
+                examItem.data.answerNum > 0) ||
+              examItem.data.answerNum == 0
+            ) {
+              this.$router.replace({
+                path: "/course-exam/" + item.goodsId,
+                query: {
+                  courseId: studyItem.courseId,
+                  gradeId: item.gradeId,
+                  moduleId: studyItem.moduleId || 0,
+                  sectionId: studyItem.sectionId || 0,
+                  examId: studyItem.examId,
+                  learning: studyItem.studyStatus,
+                  type: studyItem.examType, //题卷类型 1章卷 2节卷 3模块卷,
+                  chapterId: studyItem.chapterId || 0,
+                  orderGoodsId: item.orderGoodsId,
+                  nextStatus: "next" //是否继续播放课程
+                }
+              });
+            } else {
+              this.$message({
+                type: "warning",
+                message: "该试卷只能答题" + examItem.data.answerNum + "次"
+              });
+              return;
             }
-        })
+          }
+      this.nextDialogStatus = false
+    },
+    async GetNext() {
+      var item = this.reportdata;
+      this.$message.success("进入学习页");
+      console.log("进入学习页");
+      //获取当前课程所有节和试卷
+      let list = await this.studyRecordMenuAllList(item);
+      //返回第一个没学习的节或试卷
+      this.studyItem = this.checkListDontStudy(list);
+      this.nextDialogStatus = true
+    },
+    getcourList() {
+      this.$axios({
+        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;
+        }
+      });
     },
     bankReport() {
-      this.$request.bankReportData(this.recordId).then((res) => {
-        this.reportdata = res.data
-        // console.log('reportdata:', this.reportdata)
+      this.$request.bankReportData(this.recordId).then(res => {
+        this.reportdata = res.data;
+        if (this.$route.query.nextStatus == "next" && this.reportdata.reportStatus) {
+          this.GetNext();
+        }
+        console.log("reportdata:", this.reportdata);
       });
     },
     currentChangeCou(val) {
-      this.pageNum = val
-      this.getcourList()
+      this.pageNum = val;
+      this.getcourList();
     },
     backList() {
-      this.$router.go(-1)
+      this.$router.go(-1);
     },
     /**
      * 去做题
      */
     async doRepeat(reportdata) {
       // /bank/record/doNum
-      let count = await this.bankRecordDoNum()
-      console.log('已做的次数', count)
-      let answerNum = await this.getExamDetail(this.reportdata.examId)
-      console.log('全部的次数', answerNum)
+      let count = await this.bankRecordDoNum();
+      console.log("已做的次数", count);
+      let answerNum = await this.getExamDetail(this.reportdata.examId);
+      console.log("全部的次数", answerNum);
       //超过答题次数
       if (answerNum > 0 && count >= answerNum) {
         this.$message({
           type: "warning",
-          message: "该试卷只能答题" + answerNum + "次!",
+          message: "该试卷只能答题" + answerNum + "次!"
         });
         return;
       }
       // answerNum==0没有答题次数限制
       if (answerNum == 0 || (answerNum - count > 0 && answerNum > 0)) {
-        this.$router.push({
+        this.$router.replace({
           path: "/course-exam/" + this.reportdata.goodsId,
           query: {
             courseId: this.reportdata.courseId,
@@ -249,9 +416,9 @@ export default {
             examId: this.reportdata.examId,
             type: this.type,
             chapterId: this.reportdata.chapterId || 0,
-            orderGoodsId: this.reportdata.orderGoodsId,
-          },
-        })
+            orderGoodsId: this.reportdata.orderGoodsId
+          }
+        });
       }
 
       // this.studyLog()
@@ -260,7 +427,7 @@ export default {
      * 获取试卷已做的次数
      */
     bankRecordDoNum() {
-      return new Promise((resolve) => {
+      return new Promise(resolve => {
         this.$request
           .bankRecordDoNum({
             goodsId: this.reportdata.goodsId,
@@ -268,9 +435,9 @@ export default {
             chapterId: this.reportdata.chapterId || 0,
             courseId: this.reportdata.courseId,
             moduleId: this.reportdata.moduleId || 0,
-            examId: this.reportdata.examId,
+            examId: this.reportdata.examId
           })
-          .then((res) => {
+          .then(res => {
             resolve(res.data);
           });
       });
@@ -280,8 +447,8 @@ export default {
      * 获取试卷可以做的次数
      */
     getExamDetail(exam_id) {
-      return new Promise((resolve) => {
-        this.$request.getExamDetail(exam_id).then((res) => {
+      return new Promise(resolve => {
+        this.$request.getExamDetail(exam_id).then(res => {
           resolve(res.data.answerNum);
         });
       });
@@ -299,10 +466,9 @@ export default {
           sectionId: this.reportdata.sectionId || 0,
           fromPlat: 2, //来源平台 1小程序 2PC网站
           goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
-          orderGoodsId: this.reportdata.orderGoodsId,
-        },  
-      }).then((res) => {
-      });
+          orderGoodsId: this.reportdata.orderGoodsId
+        }
+      }).then(res => {});
     },
     wrongExplain(reportdata) {
       this.$router.push({
@@ -313,8 +479,8 @@ export default {
           chapterId: reportdata.chapterId || 0,
           goodsId: reportdata.goodsId,
           orderGoodsId: reportdata.orderGoodsId,
-          courseType: 2,
-        },
+          courseType: 2
+        }
       });
     },
 
@@ -322,16 +488,16 @@ export default {
       this.$router.push({
         path: "/bank-exam-all-explain/" + reportdata.recordId,
         query: {
-          simulateStatus:reportdata.doMode === 3 ? 1 : 0,
+          simulateStatus: reportdata.doMode === 3 ? 1 : 0,
           examId: reportdata.examId,
           moduleId: reportdata.moduleId || 0,
           chapterId: reportdata.chapterId || 0,
           goodsId: reportdata.goodsId,
-          courseType: 2,
-        },
+          courseType: 2
+        }
       });
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -600,47 +766,42 @@ export default {
   }
 
   .course_list {
-      .course {
-        background: #f5f7fa;
-        padding-top: 40px;
+    .course {
+      background: #f5f7fa;
+      padding-top: 40px;
 
-        &__header {
-          display: flex;
-          align-items: center;
-          justify-content: space-between;
-
-          .title {
-            background: url("~@/assets/video.png") no-repeat left center;
-            padding-left: 36px;
-            font-size: 24px;
-            font-family: YouSheBiaoTiHei;
-            font-weight: 400;
-            color: #333333;
-            text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
-          }
+      &__header {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
 
-          
+        .title {
+          background: url("~@/assets/video.png") no-repeat left center;
+          padding-left: 36px;
+          font-size: 24px;
+          font-family: YouSheBiaoTiHei;
+          font-weight: 400;
+          color: #333333;
+          text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
         }
+      }
 
-        
-
-        &__body {
-          .list {
-            width: 100%;
+      &__body {
+        .list {
+          width: 100%;
 
-            .course-item {
-              float: left;
-            }
+          .course-item {
+            float: left;
           }
         }
-
-      }
-      .pagination {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        margin: 20px 0px;
       }
     }
+    .pagination {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin: 20px 0px;
+    }
+  }
 }
 </style>

+ 1 - 8
src/pages/login/index.vue

@@ -1215,14 +1215,7 @@ export default {
           this.islogin = false;
           this.isloginSms = false;
           this.setUserInfo(res.data);
-          console.log("=========", this.currentRouter);
-          if (JSON.stringify(this.currentRouter) != "{}") {
-            console.log("zhelisafhsdifgsdiufg");
-            this.$router.push(this.currentRouter);
-            this.setCurrentRouter({});
-          } else {
-            this.$router.replace("/");
-          }
+          this.$router.replace("/")
         })
         .catch(err => {
           this.isRegister = false;

+ 10 - 8
src/pages/mock-exam/index.vue

@@ -1073,6 +1073,7 @@ import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
 import HeaderTabBox from "../../components/exam/HeaderTabBox.vue";
 import { mapMutations, mapGetters, mapActions } from "vuex";
+import myMixins from "@/mixin";
 export default {
   name: "BankExplain",
   components: {
@@ -1084,6 +1085,7 @@ export default {
   computed: {
     ...mapGetters(["sysTime"])
   },
+  mixins: [myMixins],
   data() {
     return {
       recordId: 0,
@@ -1342,12 +1344,12 @@ export default {
         orderGoodsId: this.orderGoodsId,
         from: this.doMode == 3 ? 3 : ""
       }).then(async items => {
-        var data = []
+        var data = [];
         if (this.doMode == 3) {
           this.simulateExamId = items.data.simulateExamId;
           data = items.data.questionList;
-        }else{
-          data = items.data
+        } else {
+          data = items.data;
         }
         if (!data.length) {
           this.$message({
@@ -1552,7 +1554,7 @@ export default {
     mockRecordEdit() {
       clearInterval(this.postTimer);
       clearInterval(this.timer);
-      let form = this.calculateScore(this.questionList)
+      let form = this.calculateScore(this.questionList);
 
       if (this.subscribeId) {
         this.mockSubscribeEdit();
@@ -2141,7 +2143,7 @@ export default {
       this.loading = true;
       clearInterval(this.timer);
       clearInterval(this.postTimer);
-      let form = this.calculateScore(this.questionList)
+      let form = this.calculateScore(this.questionList);
 
       if (this.subscribeId) {
         this.mockSubscribeEdit();
@@ -2152,8 +2154,8 @@ export default {
           eachExamId: this.eachExamId,
           examId: this.examId,
           recordId: this.recordId,
-          orderGoodsId:this.orderGoodsId,
-          goodsId:this.goodsId,
+          orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
           status: 1,
           examTime: parseInt(this.allTimes),
           doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
@@ -2201,7 +2203,7 @@ export default {
     leaveNow() {
       clearInterval(this.timer);
       clearInterval(this.postTimer);
-      let form = this.calculateScore(this.questionList)
+      let form = this.calculateScore(this.questionList);
       if (this.subscribeId) {
         this.mockSubscribeEdit();
       }

+ 1 - 1
src/pages/payment-success/index.vue

@@ -23,7 +23,7 @@
                   size="small"
                   round
                   @click="
-                    go('/person-center/my-classhour/appointment', {
+                    go('/person-center/my-examination/appointment', {
                       goodsId: goodsId,
                       gradeId: gradeId,
                       orderGoodsId: orderGoodsId,

+ 2 - 1
src/pages/person-center/mock-record/index.vue

@@ -57,7 +57,7 @@
                 <div class="btns-wrap">
                   <div class="btns">
                     <div class="btn-line">
-                      <div class="btn-line__in" @click="doRepeat(record)">
+                      <div class="btn-line__in" @click="doRepeat(record)" v-if="false">
                         <div>重新做题</div>
                       </div>
                       <div
@@ -86,6 +86,7 @@
                         <div>做题报告</div>
                       </div>
                       <div
+                      v-if="false"
                         class="btn-line__in"
                         @click="
                           go(

+ 53 - 14
src/pages/person-center/my-bank/index/index.vue

@@ -46,7 +46,7 @@
           }}</span>
         </div>
       </div>
-      <div class="height_style">
+      <el-main v-loading="loading" class="height_style">
         <div
           v-for="(item, index) in list"
           :key="index"
@@ -73,8 +73,8 @@
           <span
             v-if="
               item.validityStartTime &&
-              item.validityEndTime &&
-              item.goodsType != 5
+                item.validityEndTime &&
+                item.goodsType != 5
             "
             style="float: right; color: #999; font-size: 14px"
             >{{ $tools.timestampToTime(item.validityStartTime) }} -
@@ -91,6 +91,18 @@
             ></span
           >
         </div>
+      </el-main>
+      <div class="pagination" v-if="total > 0">
+        <el-pagination
+          @current-change="currentChange"
+          background
+          layout="prev, pager, next"
+          :total="total"
+          :pager-count="5"
+          :current-page.sync="param.pageNum"
+          :page-size="param.pageSize"
+        >
+        </el-pagination>
       </div>
     </el-dialog>
   </div>
@@ -103,15 +115,37 @@ export default {
   components: { bankDetailCopy },
   data() {
     return {
+      loading: false,
       bankData: {},
       dialogVisible: false,
       list: [],
+      param: {
+        pageNum: 1,
+        pageSize: 10
+      },
+      total: 0
     };
   },
   mounted() {
     this.getList();
   },
   methods: {
+    currentChange(e) {
+      this.param.pageNum = e;
+      this.getBankList();
+    },
+    getBankList() {
+      this.loading = true;
+      this.$request
+        .bankquestionlistUserFreeUnionBuyGoodsList(this.param)
+        .then(res => {
+          this.list = res.rows;
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
     //进入外链
     jumpExternalLink() {
       window.open(this.bankData.externalLink, "_blank");
@@ -122,14 +156,14 @@ export default {
     },
     getInfoData(data) {
       return new Promise((resolve, reject) => {
-        this.$request.goodsDetail(data.goodsId).then((res) => {
+        this.$request.goodsDetail(data.goodsId).then(res => {
           res.data.orderGoodsId = data.orderGoodsId;
           resolve(res.data);
         });
       });
     },
     getList() {
-      this.$request.examrecordgetUserDoLast().then(async (res) => {
+      this.$request.examrecordgetUserDoLast().then(async res => {
         let { goodsId } = this.$route.query;
         if (res.data && res.data.goodsId && !goodsId) {
           const result = await this.getInfoData(res.data);
@@ -140,11 +174,11 @@ export default {
         } else {
           this.$request
             .bankquestionlistUserFreeUnionBuyGoodsList()
-            .then((res) => {
+            .then(res => {
               if (res.rows.length > 0) {
                 this.bankData = !goodsId
                   ? res.rows[0]
-                  : res.rows.find((e) => e.goodsId == goodsId);
+                  : res.rows.find(e => e.goodsId == goodsId);
                 this.$nextTick(() => {
                   this.$refs.bankDetailCopy.initData(this.bankData);
                 });
@@ -157,10 +191,12 @@ export default {
      * 切换题库
      */
     changeBank() {
-      this.$request.bankquestionlistUserFreeUnionBuyGoodsList().then((res) => {
-        this.list = res.rows;
-        this.dialogVisible = true;
-      });
+      this.param = {
+        pageNum: 1,
+        pageSize: 10
+      };
+      this.dialogVisible = true;
+      this.getBankList();
     },
     /**
      * 确定选中
@@ -182,8 +218,8 @@ export default {
       this.$refs.bankDetailCopy.initData(item);
       this.bankData = item;
       this.dialogVisible = false;
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -208,7 +244,7 @@ export default {
   }
 }
 .height_style {
-  max-height: 600px;
+  max-height: 580px;
   overflow-y: auto;
 }
 .list_style {
@@ -234,4 +270,7 @@ export default {
   margin-right: 8px;
   border-radius: 2px;
 }
+.pagination {
+  text-align: center;
+}
 </style>

+ 1 - 1
src/pages/person-center/my-classhour/index/index.vue

@@ -532,7 +532,7 @@ export default {
         .getApplysubscribe(data)
         .then(res => {
           this.$router.push({
-            path: "/person-center/my-classhour/appointment",
+            path: "/person-center/my-examination/appointment",
             query: {
               goodsId: this.appointItem.goodsId,
               gradeId: this.appointItem.gradeId,

+ 1 - 1
src/pages/person-center/my-course/components/AppointTest.vue

@@ -67,7 +67,7 @@ export default {
             };
             this.$request.getApplysubscribe(data).then((res) => {
                 this.$router.push({
-                    path: "/person-center/my-classhour/appointment",
+                    path: "/person-center/my-examination/appointment",
                     query: {
                     goodsId: this.appointItem.goodsId,
                     gradeId: this.appointItem.gradeId,

+ 1 - 1
src/pages/person-center/my-course/courseData.vue

@@ -1435,7 +1435,7 @@ export default {
         .getApplysubscribe(data)
         .then((res) => {
           this.$router.push({
-            path: "/person-center/my-classhour/appointment",
+            path: "/person-center/my-examination/appointment",
             query: {
               goodsId: this.appointItem.goodsId,
               gradeId: this.appointItem.gradeId,

+ 0 - 2139
src/pages/person-center/my-course/index copy.vue

@@ -1,2139 +0,0 @@
-<template>
-  <div class="my-course">
-    <div>
-      <h4 class="headerTitle">
-        <span v-if="goodsData.subjectNames" style="font-size: 20px"
-          >【{{ goodsData.subjectNames }}】</span
-        >{{ goodsData.goodsName
-        }}<el-button
-          size="mini"
-          type="primary"
-          plain
-          icon="el-icon-sort"
-          style="margin-left: 14px"
-          @click="changeCourse"
-          >切换科目</el-button
-        ><el-button
-          v-if="outerChain()"
-          @click="jumpExternalLink"
-          size="mini"
-          type="primary"
-          >进入学习</el-button
-        >
-
-        <el-button
-          v-if="
-            goodsData.applyStatus === 1 &&
-              !(
-                sysTime <= goodsData.serviceStartTime ||
-                sysTime >= goodsData.serviceEndTime ||
-                (goodsData.classStartTime &&
-                  sysTime <= goodsData.classStartTime) ||
-                (goodsData.classEndTime && sysTime >= goodsData.classEndTime) ||
-                goodsData.learningStatus == 2 ||
-                goodsData.classStatus == 0 ||
-                (goodsData.learningStatus == 3 &&
-                  sysTime < goodsData.learningTimeStart) ||
-                !goodsData.examApplyGoodsList.length
-              )
-          "
-          size="mini"
-          type="warning"
-          plain
-          style="margin-left: 14px"
-          @click="changeTest()"
-          >预约考试
-        </el-button>
-        <div class="note" v-if="!outerChain()">
-          {{ goodsData.courseNum }}课程
-          {{ goodsData.secAllNum + goodsData.examNum }}节
-          {{ goodsData.classHours }}学时
-        </div>
-      </h4>
-      <div style="margin: 14px 0px" v-if="!outerChain()">
-        <el-button
-          size="small"
-          v-for="(item, index) in subjectList"
-          :type="newActiveSubjectId === item.id ? 'primary' : ''"
-          :key="index"
-          @click="newActiveSubjectId = item.id"
-          >{{ item.name }}</el-button
-        >
-      </div>
-      <div
-        v-for="(courseItem, teacherIndex) in goodsTeacher"
-        :key="teacherIndex"
-        v-show="!outerChain()"
-      >
-        <div
-          v-for="(item, index) in courseItem.courseList"
-          :key="index + 'two'"
-          v-show="item.subjectId === newActiveSubjectId || !newActiveSubjectId"
-        >
-          <div v-if="item.show == 1">
-            <div class="firstTop hoverStyle">
-              <div class="doubles">
-                <span class="iconStyle">课</span>
-                <span class="titles">{{ item.courseName }}</span>
-                <div
-                  v-if="courseItem.teaList && courseItem.teaList.length > 0"
-                  class="teacher_names"
-                >
-                  <div
-                    v-for="(tea, lindex) in courseItem.teaList"
-                    :key="lindex + 'three'"
-                    class="names"
-                    :class="{ nactive: States[teacherIndex] == lindex }"
-                    @click="switchTeacher(tea, lindex, teacherIndex)"
-                  >
-                    {{ tea.aliasName }}
-                  </div>
-                </div>
-              </div>
-
-              <span class="showHide" @click="changeStatus(item)">
-                <span v-if="item.showStatus">收起∧</span>
-                <span v-else>展开∨</span>
-              </span>
-            </div>
-            <div
-              v-if="
-                item.children && item.children.length > 0 && item.showStatus
-              "
-            >
-              <template v-for="(items, indexs) in item.children">
-                <div v-if="items.type === 1" :key="indexs">
-                  <p
-                    class="moduleStyle hoverStyle"
-                    @click="
-                      changeModuleStatus(items, index, indexs, teacherIndex)
-                    "
-                  >
-                    {{ items.menuName }}
-                    <span class="showHide"
-                      ><i v-if="items.showStatus" class="el-icon-arrow-up"></i>
-                      <i v-else class="el-icon-arrow-down"></i
-                    ></span>
-                  </p>
-                  <template
-                    v-if="
-                      items.showStatus &&
-                        items.children &&
-                        items.children.length > 0
-                    "
-                  >
-                    <div
-                      v-for="(i, k) in items.children"
-                      :key="k"
-                      style="padding-left: 20px"
-                    >
-                      <div
-                        v-if="i.type == 2"
-                        class="sectionStyle hoverStyleSection"
-                        style="padding-left: 20px"
-                      >
-                        <!-- 模考试卷 -->
-                        <el-row style="display: flex; align-items: center">
-                          <el-col :span="12">
-                            <span class="iconStyles">•</span>
-                            <span class="upStudyStyle sizeStyle">{{
-                              i.doType == 1
-                                ? "练习"
-                                : i.doType != 1
-                                ? "考试"
-                                : ""
-                            }}</span>
-                            <span v-if="i.recordStatus" class="upStudyStyle"
-                              >上次学到</span
-                            >
-                            <span class="span_style">{{ i.name }}</span>
-                          </el-col>
-                          <el-col
-                            :span="11"
-                            :offset="1"
-                            style="
-                              display: flex;
-                              justify-content: end;
-                              align-items: center;
-                            "
-                          >
-                            <el-button
-                              size="mini"
-                              style="width: 90px !important"
-                              type="text"
-                              v-if="i.doType == 1"
-                              @click="getResource(item, i, 3)"
-                              >进入学习</el-button
-                            >
-                            <!-- v-if="record.status == 0 && record.historyExamJson" -->
-                            <el-button
-                              size="mini"
-                              style="width: 90px !important"
-                              type="text"
-                              v-else
-                              @click="getResource(item, i, 3)"
-                              :disabled="i.learning === 1"
-                              >{{
-                                i.learning === 1
-                                  ? "合格"
-                                  : i.learning === 0
-                                  ? "不合格,重新考试"
-                                  : "进入考试"
-                              }}</el-button
-                            >
-                          </el-col>
-                        </el-row>
-                      </div>
-                      <div
-                        v-else
-                        class="chapterStyle hoverStyle"
-                        @click="
-                          changeChapterStatus(
-                            teacherIndex,
-                            2,
-                            i,
-                            index,
-                            indexs,
-                            k
-                          )
-                        "
-                      >
-                        <!-- <span class="iconStyle">章</span> -->
-                        {{ i.name }}
-                        <span class="showHide"
-                          ><i v-if="i.showStatus" class="el-icon-arrow-up"></i>
-                          <i v-else class="el-icon-arrow-down"></i
-                        ></span>
-                      </div>
-                      <template v-if="i.showStatus && i.children.length > 0">
-                        <div
-                          v-for="(is, ks) in i.children"
-                          class="sectionStyle hoverStyleSection"
-                          :key="ks"
-                          style="padding-left: 20px"
-                        >
-                          <el-row style="display: flex; align-items: center">
-                            <el-col :span="12">
-                              <span class="iconStyles">•</span>
-                              <span class="upStudyStyle sizeStyle">{{
-                                is.sectionType === 1
-                                  ? "视频"
-                                  : is.sectionType === 2
-                                  ? "直播"
-                                  : is.sectionType === 3
-                                  ? "回放"
-                                  : is.doType == 1
-                                  ? "练习"
-                                  : is.doType != 1
-                                  ? "考试"
-                                  : ""
-                              }}</span>
-                              <span class="span_style">{{ is.name }}</span>
-                              <!-- <div
-                                class="btn btn--green"
-                                v-if="
-                                  is.studyDuration > 0 &&
-                                  is.durationTime > 0 &&
-                                  is.studyDuration == is.durationTime
-                                "
-                              >
-                                已学完
-                              </div> -->
-                              <span v-if="is.recordStatus" class="upStudyStyle"
-                                >上次学到</span
-                              >
-                            </el-col>
-                            <el-col :span="4">
-                              <span v-show="is.teacherName"
-                                >已选讲师:{{ is.teacherName }}</span
-                              >
-                            </el-col>
-                            <el-col :span="3">
-                              <el-progress
-                                v-if="is.studyDuration && is.durationTime"
-                                :show-text="false"
-                                :percentage="
-                                  (is.studyDuration / is.durationTime) * 100 >
-                                  100
-                                    ? 100
-                                    : (is.studyDuration / is.durationTime) * 100
-                                "
-                              ></el-progress>
-                            </el-col>
-                            <el-col :span="2">
-                              <span v-show="is.studyDuration">
-                                {{
-                                  $tools.secondToDate(is.studyDuration) +
-                                    "/" +
-                                    $tools.secondToDate(is.durationTime)
-                                }}
-                              </span>
-                            </el-col>
-                            <el-col
-                              :span="2"
-                              :offset="1"
-                              v-if="checkSection(is.sectionId, 'sectionExam')"
-                            >
-                              <el-button
-                                size="mini"
-                                type="text"
-                                style="width: 90px !important"
-                                @click="
-                                  handelPracticeOrRxam(is, 2, item.courseId)
-                                "
-                                >习题</el-button
-                              >
-                            </el-col>
-                            <el-col
-                              :span="2"
-                              :offset="1"
-                              v-if="!is.sectionType"
-                            >
-                              <el-button
-                                size="mini"
-                                style="width: 90px !important"
-                                type="text"
-                                v-if="is.doType == 1"
-                                @click="getResource(item, is, 1)"
-                                >进入学习</el-button
-                              >
-                              <el-button
-                                size="mini"
-                                style="width: 90px !important"
-                                type="text"
-                                v-else
-                                @click="getResource(item, is, 1)"
-                              :disabled="is.learning === 1"
-                                >{{
-                                  is.learning === 1
-                                    ? "合格"
-                                    : is.learning === 0
-                                    ? "不合格,重新考试"
-                                    : "进入考试"
-                                }}</el-button
-                              >
-                            </el-col>
-                            <el-col
-                              :span="2"
-                              :offset="1"
-                              v-else-if="is.sectionType != 2"
-                            >
-                              <el-button
-                                size="mini"
-                                type="text"
-                                style="width: 90px !important"
-                                v-if="
-                                  is.studyDuration > 0 &&
-                                    is.durationTime > 0 &&
-                                    is.studyDuration == is.durationTime
-                                "
-                                @click="studyFunc(item, is)"
-                                >再次学习</el-button
-                              >
-                              <el-button
-                                type="primary"
-                                size="mini"
-                                style="width: 90px !important"
-                                v-else-if="
-                                  is.studyDuration > 0 &&
-                                    is.durationTime > 0 &&
-                                    is.studyDuration != is.durationTime
-                                "
-                                @click="studyFunc(item, is)"
-                                >继续学习</el-button
-                              >
-                              <el-button
-                                size="mini"
-                                type="primary"
-                                style="width: 90px !important"
-                                plain
-                                v-else-if="
-                                  is.studyDuration == 0 && is.durationTime > 0
-                                "
-                                @click="studyFunc(item, is)"
-                                >未开始</el-button
-                              >
-                            </el-col>
-                            <el-col :span="2" :offset="1" v-else>
-                              <el-button
-                                size="mini"
-                                plain
-                                disabled
-                                type="success"
-                                style="width: 90px !important"
-                                v-if="is.liveStartTime > sysTime"
-                                @click="studyFunc(item, is)"
-                                >未开播</el-button
-                              >
-                              <el-button
-                                size="mini"
-                                plain
-                                disabled
-                                type="danger"
-                                style="width: 90px !important"
-                                v-else-if="is.liveEndTime < sysTime"
-                                @click="studyFunc(item, is)"
-                                >已结束</el-button
-                              >
-                              <el-button
-                                size="mini"
-                                plain
-                                type="primary"
-                                style="
-                                  width: 90px !important;
-                                  text-align: center;
-                                "
-                                v-else-if="
-                                  is.liveEndTime > sysTime &&
-                                    is.liveStartTime < sysTime
-                                "
-                                @click="studyFunc(item, is)"
-                                >进入直播间</el-button
-                              >
-                            </el-col>
-                          </el-row>
-                        </div>
-                      </template>
-                    </div>
-                  </template>
-                </div>
-                <div v-if="items.type === 2" :key="indexs">
-                  <div
-                    class="chapterStyle hoverStyle"
-                    @click="
-                      changeChapterStatus(teacherIndex, 1, items, index, indexs)
-                    "
-                  >
-                    <!-- <span class="iconStyle">章</span> -->
-                    {{ items.menuName }}
-                    <span class="showHide"
-                      ><i v-if="items.showStatus" class="el-icon-arrow-up"></i>
-                      <i v-else class="el-icon-arrow-down"></i
-                    ></span>
-                  </div>
-                  <template
-                    v-if="items.showStatus && items.children.length > 0"
-                  >
-                    <div
-                      v-for="(i, k) in items.children"
-                      class="sectionStyle hoverStyleSection"
-                      :key="k"
-                      style="padding-left: 20px"
-                    >
-                      <el-row style="display: flex; align-items: center">
-                        <el-col :span="12">
-                          <span class="iconStyles">•</span>
-                          <span class="upStudyStyle sizeStyle">{{
-                            i.sectionType === 1
-                              ? "视频"
-                              : i.sectionType === 2
-                              ? "直播"
-                              : i.sectionType === 3
-                              ? "回放"
-                              : i.doType == 1
-                              ? "练习"
-                              : i.doType != 1
-                              ? "考试"
-                              : ""
-                          }}</span>
-                          <span class="span_style">
-                            {{ i.name }}
-                          </span>
-                          <span v-if="i.recordStatus" class="upStudyStyle"
-                            >上次学到</span
-                          >
-                        </el-col>
-                        <el-col :span="4">
-                          <span v-show="i.teacherName"
-                            >已选讲师:{{ i.teacherName }}</span
-                          >
-                        </el-col>
-                        <el-col :span="3">
-                          <el-progress
-                            v-if="i.studyDuration && i.durationTime"
-                            :show-text="false"
-                            :percentage="
-                              (i.studyDuration / i.durationTime) * 100 > 100
-                                ? 100
-                                : (i.studyDuration / i.durationTime) * 100
-                            "
-                          ></el-progress>
-                        </el-col>
-                        <el-col :span="2">
-                          <span v-show="i.studyDuration">
-                            {{
-                              $tools.secondToDate(i.studyDuration) +
-                                "/" +
-                                $tools.secondToDate(i.durationTime)
-                            }}
-                          </span>
-                        </el-col>
-                        <el-col
-                          :span="2"
-                          :offset="1"
-                          v-if="checkSection(i.sectionId, 'sectionExam')"
-                        >
-                          <el-button
-                            size="mini"
-                            type="text"
-                            style="width: 90px !important"
-                            @click="handelPracticeOrRxam(i, 2, item.courseId)"
-                            >习题</el-button
-                          >
-                        </el-col>
-                        <el-col :span="2" :offset="1" v-if="!i.sectionType">
-                          <el-button
-                            size="mini"
-                            style="width: 90px !important"
-                            type="text"
-                            v-if="i.doType == 1"
-                            @click="getResource(item, i, 1)"
-                            >进入学习</el-button
-                          >
-                          <el-button
-                            size="mini"
-                            style="width: 90px !important"
-                            type="text"
-                            v-else
-                            @click="getResource(item, i, 1)"
-                              :disabled="i.learning === 1"
-                            >{{
-                              i.learning === 1
-                                ? "合格"
-                                : i.learning === 0
-                                ? "不合格,重新考试"
-                                : "进入考试"
-                            }}</el-button
-                          >
-                        </el-col>
-                        <el-col
-                          :span="2"
-                          :offset="1"
-                          v-else-if="i.sectionType != 2"
-                        >
-                          <el-button
-                            size="mini"
-                            type="text"
-                            style="width: 90px !important"
-                            v-if="
-                              i.studyDuration > 0 &&
-                                i.durationTime > 0 &&
-                                i.studyDuration == i.durationTime
-                            "
-                            @click="studyFunc(item, i)"
-                            >再次学习</el-button
-                          >
-                          <el-button
-                            type="primary"
-                            size="mini"
-                            style="width: 90px !important"
-                            v-else-if="
-                              i.studyDuration > 0 &&
-                                i.durationTime > 0 &&
-                                i.studyDuration != i.durationTime
-                            "
-                            @click="studyFunc(item, i)"
-                            >继续学习</el-button
-                          >
-                          <el-button
-                            size="mini"
-                            plain
-                            type="primary"
-                            style="width: 90px !important"
-                            v-else-if="
-                              i.studyDuration == 0 && i.durationTime > 0
-                            "
-                            @click="studyFunc(item, i)"
-                            >未开始</el-button
-                          >
-                        </el-col>
-                        <el-col :span="2" :offset="1" v-else>
-                          <el-button
-                            size="mini"
-                            style="width: 90px !important"
-                            plain
-                            disabled
-                            type="success"
-                            v-if="i.liveStartTime > sysTime"
-                            @click="studyFunc(item, i)"
-                            >未开播</el-button
-                          >
-                          <el-button
-                            size="mini"
-                            style="width: 90px !important"
-                            plain
-                            disabled
-                            type="danger"
-                            v-else-if="i.liveEndTime < sysTime"
-                            @click="studyFunc(item, i)"
-                            >已结束</el-button
-                          >
-                          <el-button
-                            size="mini"
-                            style="width: 90px !important; text-align: center"
-                            plain
-                            type="primary"
-                            v-else-if="
-                              i.liveEndTime > sysTime &&
-                                i.liveStartTime < sysTime
-                            "
-                            @click="studyFunc(item, i)"
-                            >进入直播间</el-button
-                          >
-                        </el-col>
-                      </el-row>
-                    </div>
-                  </template>
-                </div>
-                <div
-                  v-if="items.type === 3"
-                  :key="indexs"
-                  class="sectionStyle hoverStyle"
-                >
-                  <el-row style="display: flex; align-items: center">
-                    <el-col :span="12">
-                      <span class="iconStyles">•</span>
-                      <span class="upStudyStyle sizeStyle">{{
-                        items.sectionType === 1
-                          ? "视频"
-                          : items.sectionType === 2
-                          ? "直播"
-                          : items.sectionType === 3
-                          ? "回放"
-                          : items.doType == 1
-                          ? "练习"
-                          : items.doType != 1
-                          ? "考试"
-                          : ""
-                      }}</span>
-                      <span class="span_style">
-                        {{ items.menuName }}
-                      </span>
-                      <span v-if="items.recordStatus" class="upStudyStyle"
-                        >上次学到</span
-                      >
-                    </el-col>
-                    <el-col :span="4">
-                      <span v-show="items.teacherName"
-                        >已选讲师:{{ items.teacherName }}</span
-                      >
-                    </el-col>
-                    <el-col :span="3">
-                      <el-progress
-                        v-if="items.studyDuration && items.durationTime"
-                        :show-text="false"
-                        :percentage="
-                          (items.studyDuration / items.durationTime) * 100 > 100
-                            ? 100
-                            : (items.studyDuration / items.durationTime) * 100
-                        "
-                      ></el-progress>
-                    </el-col>
-                    <el-col :span="2">
-                      <span v-show="items.studyDuration">
-                        {{
-                          $tools.secondToDate(items.studyDuration) +
-                            "/" +
-                            $tools.secondToDate(items.durationTime)
-                        }}
-                      </span>
-                    </el-col>
-                    <el-col
-                      :span="2"
-                      :offset="1"
-                      v-if="checkSection(items.menuId, 'sectionExamList')"
-                    >
-                      <el-button
-                        size="mini"
-                        type="text"
-                        style="width: 90px !important"
-                        @click="handelPracticeOrRxam(items, 2, item.courseId)"
-                        >习题</el-button
-                      >
-                    </el-col>
-                    <el-col :span="2" :offset="1" v-if="!items.sectionType">
-                      <el-button
-                        size="mini"
-                        style="width: 90px !important"
-                        type="text"
-                        v-if="items.doType == 1"
-                        @click="getResource(item, items, 2)"
-                        >进入学习</el-button
-                      >
-                      <el-button
-                        size="mini"
-                        style="width: 90px !important"
-                        type="text"
-                        v-else
-                        @click="getResource(item, items, 2)"
-                              :disabled="items.learning === 1"
-                        >{{
-                          items.learning === 1
-                            ? "合格"
-                            : items.learning === 0
-                            ? "不合格,重新考试"
-                            : "进入考试"
-                        }}</el-button
-                      >
-                    </el-col>
-                    <el-col
-                      :span="2"
-                      :offset="1"
-                      v-else-if="items.sectionType != 2"
-                    >
-                      <el-button
-                        size="mini"
-                        style="width: 90px !important"
-                        type="text"
-                        v-if="
-                          items.studyDuration > 0 &&
-                            items.durationTime > 0 &&
-                            items.studyDuration == items.durationTime
-                        "
-                        @click="studyFunc(item, items)"
-                        >再次学习</el-button
-                      >
-                      <el-button
-                        type="primary"
-                        style="width: 90px !important"
-                        size="mini"
-                        v-else-if="
-                          items.studyDuration > 0 &&
-                            items.durationTime > 0 &&
-                            items.studyDuration != items.durationTime
-                        "
-                        @click="studyFunc(item, items)"
-                        >继续学习</el-button
-                      >
-                      <el-button
-                        style="width: 90px !important"
-                        plain
-                        size="mini"
-                        type="primary"
-                        v-else-if="
-                          items.studyDuration == 0 && items.durationTime > 0
-                        "
-                        @click="studyFunc(item, items)"
-                        >未开始</el-button
-                      >
-                    </el-col>
-                    <el-col :span="2" :offset="1" v-else>
-                      <el-button
-                        size="mini"
-                        style="width: 90px !important"
-                        plain
-                        disabled
-                        type="success"
-                        v-if="items.liveStartTime > sysTime"
-                        @click="studyFunc(item, items)"
-                        >未开播</el-button
-                      >
-                      <el-button
-                        size="mini"
-                        style="width: 90px !important"
-                        plain
-                        disabled
-                        type="danger"
-                        v-else-if="items.liveEndTime < sysTime"
-                        @click="studyFunc(item, items)"
-                        >已结束</el-button
-                      >
-                      <el-button
-                        size="mini"
-                        style="width: 90px !important; text-align: center"
-                        plain
-                        type="primary"
-                        v-else-if="
-                          items.liveEndTime > sysTime &&
-                            items.liveStartTime < sysTime
-                        "
-                        @click="studyFunc(item, items)"
-                        >进入直播间</el-button
-                      >
-                    </el-col>
-                  </el-row>
-                </div>
-              </template>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <courseData ref="courseData" @backData="backData" />
-    <el-dialog
-      title="实名验证确认"
-      :visible.sync="showConfirm"
-      width="600px"
-      class="showconfirm"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-      :show-close="false"
-    >
-      <div class="showconfirm__content">
-        <div class="text">
-          为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
-        </div>
-        <el-descriptions :column="1">
-          <el-descriptions-item label="姓名">{{
-            userInfo && userInfo.realname
-          }}</el-descriptions-item>
-          <el-descriptions-item label="手机号">{{
-            userInfo && userInfo.telphone
-          }}</el-descriptions-item>
-          <el-descriptions-item label="身份证号">{{
-            userInfo && userInfo.idCard
-          }}</el-descriptions-item>
-        </el-descriptions>
-
-        <div class="">
-          <el-checkbox v-model="confirmChecked">确认个人信息无误</el-checkbox>
-        </div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="showConfirm = false">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="confirmUser"
-          :disabled="confirmCount > 0"
-          :loading="confirmLoading"
-          >{{
-            confirmCount > 0 ? "确 定(" + confirmCount + ")" : "确 定"
-          }}</el-button
-        >
-      </span>
-    </el-dialog>
-    <RebuildModal
-      ref="rebuildModal"
-      @rebuildSubmit="rebuildSubmit($event)"
-    ></RebuildModal>
-
-    <!-- 预约考试弹窗 -->
-    <appoint-test
-      :appointModal.sync="appointModal"
-      :appointItem="goodsData"
-    ></appoint-test>
-  </div>
-</template>
-
-<script>
-import { mapGetters, mapActions } from "vuex";
-import courseData from "./courseData.vue";
-import RebuildModal from "@/components/rebuildModal";
-import AppointTest from "./components/AppointTest.vue";
-export default {
-  name: "MyCourse",
-  components: { courseData, RebuildModal, AppointTest },
-  data() {
-    return {
-      goodsData: {},
-      goodsTeacher: [],
-      courseList: [],
-      sysTime: 0,
-      showConfirm: false,
-      confirmCount: 10,
-      confirmChecked: false,
-      confirmTimer: null,
-      confirmLoading: false,
-      appointModal: false, // 预约考试弹窗
-      subjectList: [], //当前商品课程科目汇总
-      newActiveSubjectId: "", //当前选中ID
-      businessData: {},
-      teaIndex: 0,
-      States: { 0: 0 },
-      sectionExamList: [], //节试卷集合
-      sectionExam: [] //节试卷集合
-    };
-  },
-  computed: {
-    ...mapGetters(["userInfo"])
-  },
-  mounted() {
-    this.getRecord();
-    this.sysTime = this.$tools.timest();
-  },
-  methods: {
-    //判断是否外链
-    outerChain() {
-      if (this.goodsData.externalLinkStatus) {
-        return true;
-      }
-      return false;
-    },
-    comeStyle(courseItem, item) {
-      this.$router.push({
-        path: `/my-course-detail/${this.goodsData.goodsId}`,
-        query: {
-          gradeId: courseItem.gradeId,
-          orderGoodsId: this.goodsData.orderGoodsId,
-          courseId: courseItem.courseId,
-          chapterId: item.chapterId,
-          moduleId: item.moduleId,
-          sectionId: item.sectionId || item.menuId,
-          recordingUrl: item.recordingUrl,
-          liveUrl: item.liveUrl,
-          sectionType: item.sectionType,
-          liveStartTime: item.liveStartTime,
-          liveEndTime: item.liveEndTime
-        }
-      });
-    },
-    changeCourse() {
-      this.$refs.courseData.openBoxs(this.goodsData);
-    },
-    changeTest() {
-      this.appointModal = true;
-    },
-    backData(item) {
-      this.goodsData = item;
-      this.goodsTeacher = [];
-      this.courseBusiness();
-      this.getGoodsCourseList(item);
-    },
-    //数组对象去重
-    uniqueFunc(arr, uniId) {
-      const res = new Map();
-      return arr.filter(
-        item => !res.has(item[uniId]) && res.set(item[uniId], 1)
-      );
-    },
-    awaitCourseCourseList(item) {
-      return new Promise(resolve => {
-        this.$request
-          .courseCourseList({
-            goodsId: item.goodsId,
-            gradeId: item.gradeId
-          })
-          .then(res => {
-            console.log("b1");
-            resolve(res);
-          });
-      });
-    },
-    awaitCourseTeacherList(item) {
-      return new Promise(resolve => {
-        this.$request
-          .courseCourseList({
-            goodsId: item.goodsId
-          })
-          .then(res => {
-            console.log("b1");
-            resolve(res);
-          });
-      });
-    },
-    /**
-     * 获取课程列表
-     */
-    getGoodsCourseList(item) {
-      return new Promise(async (resolve, reject) => {
-        const res = await this.awaitCourseCourseList(item);
-        var array = [];
-        res.rows.forEach(element => {
-          element.showStatus = false;
-          element.children = [];
-          array.push({
-            id: element.subjectId,
-            name: element.subjectName
-          });
-        });
-        //获取商品双师资模板
-        const res1 = await this.awaitCourseTeacherList(item);
-        if (res1.data && res1.data.length > 0) {
-          //课程老师模板
-          let teacherTel = res1.data;
-          //商品课程
-          let courses = res.rows;
-          teacherTel.forEach(tea => {
-            let dataList = [];
-            let teacherList = [];
-            courses.forEach(item => {
-              let courseData = tea.courseList.filter(
-                x => x.courseId == item.courseId
-              );
-              if (courseData && courseData.length > 0) {
-                dataList.push(item);
-                teacherList = tea.courseList;
-              }
-            });
-            let result = {
-              teaList: teacherList,
-              courseList: dataList
-            };
-            this.goodsTeacher.push(result);
-          });
-          if (this.goodsTeacher && this.goodsTeacher.length > 0) {
-            let courseIds = [];
-            this.goodsTeacher.forEach(item => {
-              item.courseList.forEach(course => {
-                courseIds.push(course.courseId);
-              });
-            });
-            if (courseIds.length > 0) {
-              courses.forEach(item => {
-                if (!courseIds.includes(item.courseId)) {
-                  let data = {
-                    teaList: [],
-                    courseList: []
-                  };
-                  data.courseList.push(item);
-                  this.goodsTeacher.push(data);
-                }
-              });
-            }
-          }
-          this.goodsTeacher.forEach(item => {
-            if (item.courseList && item.courseList.length > 0) {
-              item.courseList[0].show = 1;
-            }
-          });
-        } else {
-          //没有双师资模板
-          res.rows.forEach(item => {
-            item.show = 1;
-            let data = {
-              teaList: [],
-              courseList: []
-            };
-            data.courseList.push(item);
-            this.goodsTeacher.push(data);
-          });
-        }
-        console.log(this.goodsTeacher, "this.goodsTeacher");
-
-        this.courseList = res.rows;
-        array = this.uniqueFunc(array, "id");
-        array.unshift({
-          id: "",
-          name: "全部"
-        });
-        // this.subjectList = array;
-        this.subjectList = array.filter(item => item.name);
-        this.newActiveSubjectId = "";
-        resolve();
-        console.error("打开列表--------")
-        // if (res.rows && res.rows.length > 0) {
-        //   this.getRecord(res.rows[0]);
-        // }
-      });
-    },
-    //进入外链
-    jumpExternalLink() {
-      window.open(this.goodsData.externalLink, "_blank");
-    },
-    //切换老师
-    switchTeacher(data, index, teacherIndex) {
-      this.States[teacherIndex] = index;
-      this.teaIndex = index;
-      this.goodsTeacher.forEach((item, index) => {
-        if (item.teaList && item.teaList.length > 0) {
-          let list = item.teaList.filter(x => x.courseId == data.courseId);
-          if (list && list.length > 0) {
-            item.courseList.forEach((course, courseIndex) => {
-              if (course.courseId == data.courseId) {
-                this.$set(
-                  this.goodsTeacher[index].courseList[courseIndex],
-                  "show",
-                  1
-                );
-              } else {
-                this.$set(
-                  this.goodsTeacher[index].courseList[courseIndex],
-                  "show",
-                  0
-                );
-              }
-            });
-          }
-        }
-      });
-    },
-    getGoodsData(res) {
-      return new Promise((resolve, reject) => {
-        this.$request
-          .courseGoodsList({ orderGoodsId: res.data.orderGoodsId })
-          .then(async result => {
-            if (result.rows.length == 0) {
-              this.resultCourseGoodsList();
-            } else {
-              let array = result.rows[0];
-              array.orderGoodsId = res.data.orderGoodsId;
-              this.goodsData = array;
-              this.courseBusiness();
-              await this.getGoodsCourseList(array);
-              resolve();
-            }
-          });
-      });
-    },
-    /**
-     * 获取学习记录
-     */
-    getRecord(item) {
-      this.$request.studyrecordgetUserStudyLast().then(async res => {
-        if (res.data && (res.data.sectionId || res.data.examId)) {
-          await this.getGoodsData(res);
-          var stop = false;
-          for (let y = 0; y < this.goodsTeacher.length; y++) {
-            for (let i = 0; i < this.goodsTeacher[y].courseList.length; i++) {
-              if (stop) {
-                break;
-              }
-              if (
-                this.goodsTeacher[y].courseList[i].courseId == res.data.courseId
-              ) {
-                await this.changeStatus(this.goodsTeacher[y].courseList[i]);
-                for (
-                  let k = 0;
-                  k < this.goodsTeacher[y].courseList[i].children.length;
-                  k++
-                ) {
-                  if (res.data.moduleId) {
-                    if (
-                      this.goodsTeacher[y].courseList[i].children[k].menuId ==
-                      res.data.moduleId
-                    ) {
-                      await this.changeModuleStatus(
-                        this.goodsTeacher[y].courseList[i].children[k],
-                        i,
-                        k,
-                        y
-                      );
-                      for (
-                        let j = 0;
-                        j <
-                        this.goodsTeacher[y].courseList[i].children[k].children
-                          .length;
-                        j++
-                      ) {
-                        if (
-                          this.goodsTeacher[y].courseList[i].children[k]
-                            .children[j].chapterId == res.data.chapterId
-                        ) {
-                          await this.changeChapterStatus(
-                            y,
-                            2,
-                            this.goodsTeacher[y].courseList[i].children[k]
-                              .children[j],
-                            i,
-                            k,
-                            j
-                          );
-                          if (
-                            res.data.examId !== 0 &&
-                            res.data.examId ===
-                              this.goodsTeacher[y].courseList[i].children[k]
-                                .children[j].typeId
-                          ) {
-                            this.$set(
-                              this.goodsTeacher[y].courseList[i].children[k]
-                                .children[j],
-                              "recordStatus",
-                              true
-                            );
-                            stop = true;
-                          } else {
-                            for (
-                              let m = 0;
-                              m <
-                              this.goodsTeacher[y].courseList[i].children[k]
-                                .children[j].children.length;
-                              m++
-                            ) {
-                              if (
-                                (this.goodsTeacher[y].courseList[i].children[k]
-                                  .children[j].children[m].sectionId ==
-                                  res.data.sectionId &&
-                                  this.goodsTeacher[y].courseList[i].children[k]
-                                    .children[j].children[m].sectionId !== 0 &&
-                                  res.data.sectionId !== 0) ||
-                                this.goodsTeacher[y].courseList[i].children[k]
-                                  .children[j].children[m].typeId ==
-                                  res.data.examId
-                              ) {
-                                this.$set(
-                                  this.goodsTeacher[y].courseList[i].children[k]
-                                    .children[j].children[m],
-                                  "recordStatus",
-                                  true
-                                );
-                                stop = true;
-                                break;
-                              }
-                            }
-                          }
-                        }
-                      }
-                    }
-                  } else if (res.data.chapterId) {
-                    if (
-                      this.goodsTeacher[y].courseList[i].children[k].menuId ==
-                      res.data.chapterId
-                    ) {
-                      await this.changeChapterStatus(
-                        y,
-                        1,
-                        this.goodsTeacher[y].courseList[i].children[k],
-                        i,
-                        k
-                      );
-                      for (
-                        let j = 0;
-                        j <
-                        this.goodsTeacher[y].courseList[i].children[k].children
-                          .length;
-                        j++
-                      ) {
-                        if (
-                          (this.goodsTeacher[y].courseList[i].children[k]
-                            .children[j].sectionId == res.data.sectionId &&
-                            this.goodsTeacher[y].courseList[i].children[k]
-                              .children[j].sectionId !== 0 &&
-                            res.data.sectionId !== 0) ||
-                          this.goodsTeacher[y].courseList[i].children[k]
-                            .children[j].typeId == res.data.examId
-                        ) {
-                          this.$set(
-                            this.goodsTeacher[y].courseList[i].children[k]
-                              .children[j],
-                            "recordStatus",
-                            true
-                          );
-                          stop = true;
-                          break;
-                        }
-                      }
-                    }
-                  } else {
-                    if (
-                      (this.goodsTeacher[y].courseList[i].children[k].menuId ==
-                        res.data.sectionId &&
-                        this.goodsTeacher[y].courseList[i].children[k]
-                          .menuId !== 0 &&
-                        res.data.sectionId !== 0) ||
-                      this.goodsTeacher[y].courseList[i].children[k].typeId ==
-                        res.data.examId
-                    ) {
-                      this.$set(
-                        this.goodsTeacher[y].courseList[i].children[k],
-                        "recordStatus",
-                        true
-                      );
-                      stop = true;
-                      break;
-                    }
-                  }
-                }
-              }
-            }
-          }
-        } else {
-          this.resultCourseGoodsList();
-        }
-      });
-    },
-    resultCourseGoodsList() {
-      this.$request.courseGoodsList({ pageNum: 1, pageSize: 1 }).then(res => {
-        if (res.rows && res.rows.length > 0) {
-          this.backData(res.rows[0]);
-        }
-      });
-    },
-    /**
-     * 展开获取课程详情列表
-     */
-    changeStatus(item) {
-      return new Promise((resolve, reject) => {
-        console.log(item);
-        if (item.children.length > 0) {
-          item.showStatus = !item.showStatus;
-          return;
-        }
-        //获取节试卷列表
-        this.$request
-          .reSectionExamList({
-            chapterId: 0,
-            courseId: item.courseId,
-            gradeId: item.gradeId
-          })
-          .then(res => {
-            this.sectionExamList = res.data;
-          });
-        this.$request
-          .reMenuList({
-            courseId: item.courseId,
-            gradeId: item.gradeId,
-            orderGoodsId: this.goodsData.orderGoodsId
-          })
-          .then(res => {
-            res.rows.forEach(items => {
-              if (items.type != 3) {
-                items.showStatus = false;
-                items.children = [];
-              }
-            });
-            for (let i = 0; i < this.courseList.length; i++) {
-              if (this.courseList[i].courseId == item.courseId) {
-                this.$set(this.courseList[i], "children", res.rows);
-                this.$set(
-                  this.courseList[i],
-                  "showStatus",
-                  !this.courseList[i].showStatus
-                );
-                break;
-              }
-            }
-            resolve();
-          });
-      });
-    },
-    /**
-     * 模块详情列表
-     */
-    changeModuleStatus(item, index, indexs, teacherIndex) {
-      return new Promise((resolve, reject) => {
-        console.log(item, "item");
-        if (item.children && item.children.length > 0) {
-          item.showStatus = !item.showStatus;
-          return;
-        }
-        this.$request
-          .reChapterList({
-            moduleId: item.menuId,
-            gradeId: item.gradeId,
-            courseId: item.courseId
-          })
-          .then(res => {
-            res.data.forEach(items => {
-              items.children = [];
-              items.showStatus = false;
-            });
-            console.log(teacherIndex, "teacherIndex");
-            this.$set(
-              this.goodsTeacher[teacherIndex].courseList[index].children[
-                indexs
-              ],
-              "children",
-              res.data
-            );
-            item.showStatus = !item.showStatus;
-            resolve();
-          });
-      });
-    },
-    /**
-     * 章详情列表 type = 1 父级章 type = 2 父级模块
-     */
-    changeChapterStatus(teacherIndex, type, item, courseIndex, index, indexs) {
-      return new Promise((resolve, reject) => {
-        console.log(item, "定位");
-        console.log(type, item, courseIndex, index, indexs, teacherIndex);
-        if (item.children && item.children.length > 0) {
-          item.showStatus = !item.showStatus;
-          return;
-        }
-        //获取节试卷列表
-        this.$request
-          .reSectionExamList({
-            chapterId: type === 1 ? item.menuId : item.chapterId,
-            courseId: item.courseId,
-            gradeId: item.gradeId
-          })
-          .then(res => {
-            this.sectionExam = res.data;
-          });
-        this.$request
-          .reSectionList({
-            chapterId: type === 1 ? item.menuId : item.chapterId,
-            gradeId: item.gradeId,
-            courseId: item.courseId,
-            moduleId: item.moduleId || 0,
-            orderGoodsId: this.goodsData.orderGoodsId
-          })
-          .then(res => {
-            // let newArr = res.data.filter((item) => {
-            //   return item.type != 2;
-            // });
-            // let canLearn = newArr.every((item) => {
-            //   if (item.learning == 1) {
-            //     return true;
-            //   } else {
-            //     return false;
-            //   }
-            // });
-            // res.data.forEach((section) => {
-            //   section.canLearn = canLearn;
-            // });
-            if (type === 1) {
-              this.$set(
-                this.goodsTeacher[teacherIndex].courseList[courseIndex]
-                  .children[index],
-                "children",
-                res.data
-              );
-            }
-            if (type === 2) {
-              this.$set(
-                this.goodsTeacher[teacherIndex].courseList[courseIndex]
-                  .children[index].children[indexs],
-                "children",
-                res.data
-              );
-            }
-            item.showStatus = !item.showStatus;
-            resolve();
-          });
-      });
-    },
-    checkCanLearn(section) {
-      let time = this.$tools.timest();
-      let {
-        interfaceAccountId,
-        learnStatus,
-        serviceStartTime,
-        serviceEndTime,
-        classStartTime,
-        classEndTime,
-        classStatus,
-        learningStatus,
-        learningTimeStart
-      } = this.goodsData;
-      console.log(interfaceAccountId, learnStatus, "xzx");
-      if (interfaceAccountId > 0) {
-        learnStatus == 1
-          ? this.rebuildSubmit(this.goodsData, section)
-          : this.$message({
-              type: "warning",
-              message:
-                "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!"
-            });
-        return false;
-      }
-      let index = [
-        time <= serviceStartTime || time >= serviceEndTime,
-        (classStartTime && time <= classStartTime) ||
-          (classEndTime && time >= classEndTime),
-        learningStatus == 2,
-        classStatus == 0,
-        learningStatus == 3 && time < learningTimeStart
-      ].findIndex(e => e);
-      if (index !== -1) {
-        this.$message({
-          type: "warning",
-          message:
-            [
-              "不在学习服务期",
-              "不在班级有效期",
-              "开放学习时间待定",
-              "尚未开班",
-              "不在开放学习时间,"
-            ][index] + ",不能进入学习"
-        });
-      }
-      return index === -1;
-    },
-    async studyFunc(courseItem, items) {
-      if (!this.checkCanLearn(items)) {
-        return false;
-      }
-      if (
-        !(await this.orderTopTobottom(courseItem, items, 99)) &&
-        items.sectionType != 2
-      ) {
-        this.$message({
-          type: "warning",
-          message: "请按顺序学习视频课程"
-        });
-        return false;
-      }
-      let item = this.goodsData;
-      var confirmDetail = true;
-      if (item.educationName == "继续教育") {
-        if (
-          item.officialName &&
-          item.businessName == "二级" &&
-          (item.projectName == "建造师" || item.projectName == "造价师")
-        ) {
-          if (!(await this.RequiredCourse())) {
-            return;
-          }
-          
-          // confirmDetail = await this.userConfirmInfoDetail();
-        }
-      }
-      // //内部系统
-      // if (item.interfacePushId > 0 && item.officialStatus != 1) {
-      //   this.$message({
-      //     type: "warning",
-      //     message: "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
-      //   });
-      //   return;
-      // }
-
-      if (!confirmDetail) {
-        return;
-      }
-
-      let rebuildStatus = await this.courseGoodsRebuildStatus(
-        item.goodsId,
-        item.gradeId
-      );
-
-      if (rebuildStatus == 0) {
-        this.$refs.rebuildModal.showModal(item);
-        return;
-      }
-
-      // if (item.educationName == "继续教育") {
-      this.$request
-        .lockLockStatus({
-          action: "jxjy",
-          uuid: sessionStorage.getItem("uuid")
-        })
-        .then(res => {
-          //有其他端在操作,不能学习
-          this.$message({
-            type: "warning",
-            message: res.msg
-          });
-        })
-        .catch(err => {
-          //可以学习
-          this.$request
-            .courseCourseList({
-              pageNum: 1,
-              pageSize: 1,
-              goodsId: item.goodsId,
-              gradeId: item.gradeId
-            })
-            .then(async res => {
-              //学习次数是否上限---start
-              let learnNum = await this.goodsTodayStudySectionNum(courseItem);
-              let hasLearn = await this.gradeCheckGoodsStudy(courseItem, items);
-              console.log(learnNum, hasLearn);
-              if (this.goodsData.sectionMaxNum > 0) {
-                if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
-                  this.clickLock = false;
-                  this.$message({
-                    type: "warning",
-                    message: `每天最多学习${this.goodsData.sectionMaxNum}节`
-                  });
-                  return;
-                }
-              }
-              //学习次数是否上限---end
-              if (res.rows.length) {
-                // this.$emit("backData", item);
-                // this.dialogVisible = false;
-                console.log("可以学习");
-                this.comeStyle(courseItem, items);
-                // this.$router.push({
-                //   path: `/my-course-detail/${item.goodsId}`,
-                //   query: {
-                //     gradeId: item.gradeId,
-                //     orderGoodsId: item.orderGoodsId,
-                //     courseId: res.rows[0].courseId || "",
-                //   },
-                // });
-                // }
-              } else {
-                this.$message({
-                  type: "warning",
-                  message: "课程内暂无可以学习的科目"
-                });
-              }
-            });
-        });
-    },
-    handelPracticeOrRxam(section, type, courseId) {
-      if (type == 3) {
-        //节卷
-        let data = this.sectionExamList.filter(
-          x => x.sectionId == section.menuId
-        );
-        if (data && data.length > 0) {
-          section = data[0];
-        }
-      } else if (type == 2) {
-        //节卷
-        let data = this.sectionExam.filter(
-          x => x.sectionId == section.sectionId
-        );
-
-        if (data && data.length > 0) {
-          section = data[0];
-        }
-      }
-      this.$router.push({
-        path: "/course-exam/" + this.goodsData.goodsId,
-        query: {
-          courseId: courseId,
-          gradeId: this.goodsData.gradeId,
-          moduleId: section.moduleId || 0,
-          sectionId: section.sectionId || 0,
-          examId: section.typeId,
-          learning: section.learning,
-          type: type,
-          chapterId: section.chapterId || 0,
-          orderGoodsId: this.goodsData.orderGoodsId
-        }
-      });
-    },
-    async orderTopTobottom(courseLists, section, type) {
-      let { rebuild, moduleId, chapterId, parentId, menuId } = section;
-      if (this.goodsData.goodsLearningOrder != 2 || rebuild) {
-        return true;
-      }
-      // 课程顺序
-      if (this.courseList.length > 1) {
-        let index = this.courseList.findIndex(
-          e => e.courseId == courseLists.courseId
-        ); 
-
-        if (index) {
-          let prevItem = this.courseList[index - 1]; //上一课
-          if (prevItem.stuAllNum != prevItem.secAllNum) {
-            return false;
-          }
-        }
-      }
-      let list = await this.studyRecordMenuAllList(courseLists);
-        // type = 99属于节视频
-        // type = 3属于节练习
-      if (type == 99) {
-        if (parentId >= 0 && menuId >= 0) {
-          var index = list.findIndex(e => {
-            return parentId
-              ? e.moduleId == moduleId &&
-                  e.chapterId == chapterId &&
-                  e.id == section.sectionId
-              : e.id == menuId;
-          });
-        } else {
-          var index = list.findIndex(
-            e =>
-              e.moduleId == moduleId &&
-              e.chapterId == chapterId &&
-              e.id == section.sectionId
-          );
-        }
-        list = list.slice(0, index);
-      } else if (type != 3) {
-        list = list.filter(
-          e => e.moduleId == moduleId && e.chapterId == chapterId
-        );
-        var index = list.findIndex(
-            e =>
-              e.moduleId == moduleId &&
-              e.chapterId == chapterId &&
-              e.examId == section.typeId
-          );
-        list = list.slice(0, index);
-      }
-      return list.every(item => item.studyStatus == 1);
-    },
-    async exceedLearnNum(courseLists, section) {
-      let learnNum = await this.goodsTodayStudySectionNum(section);
-      let hasLearn = await this.gradeCheckGoodsStudy(courseLists, section);
-
-      if (this.goodsData.sectionMaxNum > 0) {
-        if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
-          this.$message({
-            type: "warning",
-            message: `每天最多学习${this.goodsData.sectionMaxNum}节`
-          });
-          return false;
-        }
-      }
-      return true;
-    },
-    async getResource(courseLists, section, type) {
-      let item = this.goodsData;
-      var confirmDetail = true;
-      if (item.educationName == "继续教育") {
-        if (
-          item.officialName &&
-          item.businessName == "二级" &&
-          (item.projectName == "建造师" || item.projectName == "造价师")
-        ) {
-          if (!(await this.RequiredCourse())) {
-            return;
-          }
-          // confirmDetail = await this.userConfirmInfoDetail();
-        }
-      }
-      if (!confirmDetail) {
-        return;
-      }
-      //type:1章卷,2节卷,3模考卷,4习题
-      if (!this.checkCanLearn()) {
-        return false;
-      }
-      // 学习次数
-      if (!(await this.exceedLearnNum(courseLists, section))) {
-        return false;
-      }
-
-      // 学习顺序
-
-      if (!(await this.orderTopTobottom(courseLists, section, type))) {
-        this.$message({
-          type: "warning",
-          message: "请学完视频课程再进行练习和测试"
-        });
-        return false;
-      }
-      //有次数限制
-      let num = await this.bankRecordDoNum(courseLists, section);
-      // section.doNum
-      // record.status == 0 && record.historyExamJson 继续做题
-      if (section.answerNum - num > 0 && section.answerNum > 0) {
-        this.$router.push({
-          path: "/course-exam/" + this.goodsData.goodsId,
-          query: {
-            courseId: courseLists.courseId,
-            gradeId: this.goodsData.gradeId,
-            moduleId: section.moduleId || 0,
-            sectionId: section.sectionId || 0,
-            examId: section.typeId,
-            learning: section.learning,
-            type: type,
-            chapterId: section.chapterId || 0,
-            orderGoodsId: this.goodsData.orderGoodsId
-          }
-        });
-        //没有答题次数限制
-      } else if (section.answerNum == 0) {
-        this.$router.push({
-          path: "/course-exam/" + this.goodsData.goodsId,
-          query: {
-            courseId: courseLists.courseId,
-            gradeId: this.goodsData.gradeId,
-            moduleId: section.moduleId || 0,
-            sectionId: section.sectionId || 0,
-            examId: section.typeId,
-            learning: section.learning,
-            type: type,
-            chapterId: section.chapterId || 0,
-            orderGoodsId: this.goodsData.orderGoodsId
-          }
-        });
-      } else {
-        this.$message({
-          type: "warning",
-          message: "该试卷只能答题" + section.answerNum + "次"
-        });
-
-        return;
-      }
-      this.studyLog(
-        (section.moduleId = 0),
-        (section.chapterId = 0),
-        section.typeId,
-        courseLists
-      );
-    },
-    //校验节是否有试卷
-    checkSection(sectionId, key) {
-      let _data = this[key];
-      if (_data.length == 0) {
-        return false;
-      }
-      return _data.some(section => section.sectionId == sectionId);
-    },
-    // 新增用户视频学习日志
-    studyLog(moduleId, chapterId, sectionId, courseLists) {
-      this.$axios({
-        url: "/user/study/log",
-        method: "post",
-        data: {
-          goodsId: this.goodsData.goodsId,
-          courseId: courseLists.courseId,
-          moduleId: moduleId || 0,
-          chapterId: chapterId || 0,
-          sectionId: sectionId || 0,
-          fromPlat: 2, //来源平台 1小程序 2PC网站
-          goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
-          orderGoodsId: this.goodsData.orderGoodsId
-        }
-      }).then(res => {
-        console.log("直播的用户学习日志:", res);
-      });
-    },
-    /**
-     * 获取培训项目详情
-     */
-    courseBusiness() {
-      this.$request.courseBusiness(this.goodsData.businessId).then(res => {
-        this.businessData = res.data;
-      });
-    },
-    bankRecordDoNum(courseLists, section) {
-      return new Promise(resolve => {
-        this.$request
-          .bankRecordDoNum({
-            goodsId: this.goodsData.goodsId,
-            gradeId: this.goodsData.gradeId,
-            chapterId: section.chapterId,
-            courseId: courseLists.courseId,
-            moduleId: 0,
-            examId: section.typeId
-          })
-          .then(res => {
-            resolve(res.data);
-          });
-      });
-    },
-
-    studyRecordMenuAllList(courseLists) {
-      return new Promise(resolve => {
-        this.$request
-          .studyRecordMenuAllListWithExam({
-            courseId: courseLists.courseId,
-            gradeId: this.goodsData.gradeId,
-            goodsId: this.goodsData.goodsId
-          })
-          .then(res => {
-            res.data = res.data.filter(e => e.sectionType != 2);
-            resolve(res.data);
-          });
-      });
-    },
-    gradeCheckGoodsStudy(courseItem, option) {
-      return new Promise(resolve => {
-        this.$request
-          .gradeCheckGoodsStudy({
-            goodsId: this.goodsData.goodsId,
-            gradeId: courseItem.gradeId,
-            moduleId: option.moduleId || 0,
-            chapterId: option.chapterId || 0,
-            sectionId: option.sectionId || option.menuId
-          })
-          .then(res => {
-            resolve(res.data);
-          });
-      });
-    },
-    goodsTodayStudySectionNum(option) {
-      return new Promise(resolve => {
-        this.$request
-          .goodsTodayStudySectionNum({
-            goodsId: this.goodsData.goodsId,
-            gradeId: option.gradeId
-          })
-          .then(res => {
-            resolve(res.data);
-          });
-      });
-    },
-    RequiredCourse() {
-      return new Promise(resolve => {
-        if (this.goodsData.categoryName !== "必修") {
-          this.$request
-            .goodsGradeCheckFinishRequiredCourse({
-              businessId: this.goodsData.businessId,
-              goodsId: this.goodsData.goodsId
-            })
-            .then(res => {
-              // if (res.data > 0) {
-              //   this.$message.warning("请先学习必修商品");
-              //   resolve(false);
-              // } else {
-                resolve(true);
-              // }
-            });
-        }
-      });
-    },
-    userConfirmInfoDetail() {
-      return new Promise(resolve => {
-        this.$request
-          .userConfirmInfoDetail({
-            orderGoodsId: this.goodsData.orderGoodsId
-          })
-          .then(res => {
-            if (!res.data) {
-              clearInterval(this.confirmTimer);
-              this.confirmCount = 10;
-              this.showConfirm = true;
-              this.confirmTimer = setInterval(() => {
-                if (this.confirmCount > 0) {
-                  this.confirmCount--;
-                } else {
-                  clearInterval(this.confirmTimer);
-                }
-              }, 1000);
-            } else {
-              if (res.data.pushInfo) {
-                resolve(true);
-              } else {
-                this.$confirm(
-                  "开通信息推送不成功,无法进入学习,请联系020-87085982!",
-                  "提示",
-                  {
-                    confirmButtonText: "确定",
-                    closeOnClickModal: false,
-                    closeOnPressEscape: false,
-                    distinguishCancelAndClose: false,
-                    showClose: false,
-                    showCancelButton: false
-                  }
-                )
-                  .then(_ => {})
-                  .catch(_ => {});
-                resolve(false);
-              }
-            }
-          });
-      });
-    },
-
-    confirmUser() {
-      if (!this.confirmChecked) {
-        this.$message.warning("请勾选确认个人信息无误");
-        return;
-      }
-      this.confirmLoading = true;
-      let infoJson = {
-        realname: this.userInfo.realname,
-        idCard: this.userInfo.idCard,
-        telphone: this.userInfo.telphone
-      };
-      this.$request
-        .userConfirminfo({
-          infoJson: JSON.stringify(infoJson),
-          orderGoodsId: this.goodsData.orderGoodsId
-        })
-        .then(res => {
-          if (res.data.pushInfo) {
-            this.$message.success("提交成功");
-          } else {
-            this.$confirm(
-              "开通信息推送不成功,无法进入学习,请联系020-87085982!",
-              "提示",
-              {
-                confirmButtonText: "确定",
-                closeOnClickModal: false,
-                closeOnPressEscape: false,
-                distinguishCancelAndClose: false,
-                showClose: false,
-                showCancelButton: false
-              }
-            )
-              .then(_ => {})
-              .catch(_ => {});
-          }
-          this.showConfirm = false;
-          this.confirmLoading = false;
-        });
-    },
-    /**
-     * @param {Object} goodsId 商品id
-     * 查询商品重修状态
-     */
-    courseGoodsRebuildStatus(goodsId, gradeId) {
-      return new Promise(resolve => {
-        this.$request
-          .courseGoodsRebuildStatus({
-            goodsId: goodsId,
-            gradeId: gradeId
-          })
-          .then(res => {
-            resolve(res.data);
-          });
-      });
-    },
-    rebuildSubmit(item, section) {
-      this.$router.push({
-        path: `/my-course-detail/${item.goodsId}`,
-        query: {
-          gradeId: item.gradeId,
-          orderGoodsId: item.orderGoodsId,
-          rebuild: 1,
-          courseId: section.courseId,
-          chapterId: section.chapterId,
-          moduleId: section.moduleId,
-          sectionId: section.sectionId || section.menuId
-        }
-      });
-    }
-  }
-};
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped lang="scss">
-.headerTitle {
-  color: #222;
-  font-weight: bold;
-  font-size: 24px;
-  padding: 28px 0px 20px;
-  border-bottom: 1px solid #eee;
-  .note {
-    margin: 4px 0 0 10px;
-    color: #777777;
-    font-size: 16px;
-    font-weight: 500;
-  }
-}
-
-.firstTop {
-  padding: 24px 0px;
-  // margin: 24px 0px;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-
-  .doubles {
-    display: flex;
-    align-items: center;
-  }
-
-  .iconStyle {
-    background-color: #3f8dfd;
-    color: #fff;
-    margin-right: 8px;
-    padding: 0px 4px;
-    border-radius: 4px;
-    font-size: 12px;
-    vertical-align: text-top;
-  }
-
-  .titles {
-    font-weight: bold;
-    color: #333;
-    font-size: 18px;
-  }
-
-  .showHide {
-    cursor: pointer;
-    user-select: none;
-    float: right;
-    color: #99a0a7;
-  }
-}
-
-.moduleStyle {
-  padding: 17px;
-  background-color: #f8f8f9;
-  font-weight: bold;
-  color: #222;
-  margin-bottom: 16px;
-
-  .showHide {
-    cursor: pointer;
-    user-select: none;
-    float: right;
-    color: #99a0a7;
-  }
-}
-
-.chapterStyle {
-  font-weight: 400;
-
-  .iconStyle {
-    background-color: #fff;
-    color: #3f8dfd;
-    margin-right: 8px;
-    padding: 0px 2px;
-    border-radius: 2px;
-    border: 1px solid #3f8dfd;
-    font-size: 10px;
-    vertical-align: text-top;
-  }
-
-  .showHide {
-    cursor: pointer;
-    user-select: none;
-    float: right;
-    color: #99a0a7;
-  }
-
-  margin-bottom: 16px;
-  padding: 17px;
-  border-bottom: 1px solid #eee;
-}
-
-.sectionStyle {
-  color: #99a0a7;
-  padding: 10px;
-
-  .iconStyles {
-    color: #99a0a7;
-    margin-right: 8px;
-    padding: 0px 2px;
-  }
-}
-
-.upStudyStyle {
-  font-size: 12px;
-  background-color: #f2f7ff;
-  border: 1px solid #3f8dfd;
-  color: #3f8dfd;
-  padding: 1px 4px;
-  border-radius: 4px;
-}
-
-.sizeStyle {
-  font-size: 12px;
-  background-color: #fff !important;
-  border-color: #979ea5 !important;
-  color: #979ea5 !important;
-  padding: 2px 3px !important;
-}
-
-.hoverStyle {
-  cursor: pointer;
-  transition: all 0.2s;
-
-  &:hover {
-    background-color: #eaf3ff;
-  }
-}
-
-.btn--green {
-  display: inline-block;
-  margin-left: 16px;
-  border: 1px solid #34c759;
-  background: #34c759;
-  width: 48px;
-  height: 20px;
-  border-radius: 4px;
-  line-height: 18px;
-  color: #fff;
-  text-align: center;
-}
-.hoverStyleSection {
-  transition: all 0.2s;
-
-  &:hover {
-    background-color: #eaf3ff;
-  }
-}
-
-.span_style {
-  max-width: 400px;
-  display: inline-block;
-  vertical-align: middle;
-}
-
-// 老师名字样式
-.teacher_names {
-  display: flex;
-  margin-left: 20px;
-
-  .names {
-    font-size: 13px;
-    color: #666666;
-    margin-right: 12px;
-    cursor: pointer;
-    background: #f8f8f8;
-    border-radius: 4px;
-    padding: 3px 6px;
-
-    &.nactive {
-      color: #3f8dfd;
-      background: #f2f7ff;
-    }
-  }
-}
-</style>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 532 - 734
src/pages/person-center/my-course/index.vue


+ 0 - 0
src/pages/person-center/my-classhour/appointment-add-kp/index.vue → src/pages/person-center/my-examination/appointment-add-kp/index.vue


+ 1 - 1
src/pages/person-center/my-classhour/appointment-add/index.vue → src/pages/person-center/my-examination/appointment-add/index.vue

@@ -325,7 +325,7 @@ export default {
       if (this.dataId == 1) {
         this.updateApplyData(data);
         this.$router.push({
-          path: "/person-center/my-classhour/appointment-add-kp",
+          path: "/person-center/my-examination/appointment-add-kp",
           query: {
             applyId: this.applyId,
             applyStatus: this.applyStatus,

+ 26 - 25
src/pages/person-center/my-classhour/appointment/index.vue → src/pages/person-center/my-examination/appointment/index.vue

@@ -49,7 +49,7 @@
               :label="item.name"
               v-if="
                 listData.applyStatus &&
-                listData.applyStatus.indexOf(item.name) !== -1
+                  listData.applyStatus.indexOf(item.name) !== -1
               "
               >{{ item.label }}</el-radio
             >
@@ -75,7 +75,7 @@ export default {
     return {
       radiolist: [
         { name: "1", label: "非补考学员" },
-        { name: "2", label: "补考学员" },
+        { name: "2", label: "补考学员" }
       ],
       form: {},
       radio: "",
@@ -85,7 +85,7 @@ export default {
       listData: [],
       goodsIdBK: null,
       applyId: "",
-      reportStatus: 0, // 是否线上签署疫情防控承诺书, 1是,0否
+      reportStatus: 0 // 是否线上签署疫情防控承诺书, 1是,0否
     };
   },
   mounted() {
@@ -101,16 +101,17 @@ export default {
         goodsId: this.goodsId,
         gradeId: this.gradeId,
         orderGoodsId: this.orderGoodsId,
-        applyId: this.applyId,
+        applyId: this.applyId
       };
       // /apply/subscribe
-      this.$request.getApplysubscribe(data).then((res) => {
+      this.$request.getApplysubscribe(data).then(res => {
         if (res.data.applyStatus) {
           res.data.applyStatus = res.data.applyStatus.split(",");
         }
         this.listData = res.data;
-        this.reportStatus = res.data.reportStatus
-        console.log('reportStatus', this.reportStatus)
+        // this.reportStatus = res.data.reportStatus
+        this.reportStatus = 0;
+        console.log("reportStatus", this.reportStatus);
       });
     },
     cancel() {
@@ -120,7 +121,7 @@ export default {
       if (!this.radio) {
         this.$message({
           type: "warning",
-          message: "请选择您的考试身份",
+          message: "请选择您的考试身份"
         });
         return;
       }
@@ -129,22 +130,22 @@ export default {
         applyStatus: this.radio,
         orderGoodsId: this.orderGoodsId,
         goodsId: this.goodsId,
-        gradeId: this.gradeId,
+        gradeId: this.gradeId
       };
       this.$request
         .getApplysubscribeNext(data)
-        .then((res) => {
+        .then(res => {
           if (res.data === 1 || res.data === 2) {
             this.$router.push({
-              path: "/person-center/my-classhour/appointment-add",
+              path: "/person-center/my-examination/appointment-add",
               query: {
                 applyId: this.listData.applyId,
                 applyStatus: this.radio,
                 goodsId: this.goodsId,
                 dataId: res.data,
                 orderGoodsId: this.orderGoodsId,
-                reportStatus: this.reportStatus,
-              },
+                reportStatus: this.reportStatus
+              }
             });
           }
           if (res.data === 3) {
@@ -152,9 +153,9 @@ export default {
               .goodsList({
                 makeGoodsId: this.goodsId,
                 goodsType: 3,
-                orderGoodsId: this.orderGoodsId,
+                orderGoodsId: this.orderGoodsId
               })
-              .then((res) => {
+              .then(res => {
                 if (res.rows.length) {
                   this.goodsIdBK = res.rows[0].goodsId;
                 }
@@ -170,17 +171,17 @@ export default {
                   "提示",
                   {
                     confirmButtonText: "缴费",
-                    cancelButtonText: "知道了",
+                    cancelButtonText: "知道了"
                   }
                 )
-                  .then((_) => {
+                  .then(_ => {
                     console.log(this.goodsIdBK, "this.goodsIdBK");
                     if (!this.goodsIdBK) {
                       this.$message.warning("请联系管理员配置补考商品");
                     } else {
                       this.$request
                         .commonGoodsDetail(this.goodsIdBK)
-                        .then((res) => {
+                        .then(res => {
                           let detail = res.data;
                           detail.learnOrderGoodsId = this.orderGoodsId;
                           detail.learnGradeId = this.gradeId;
@@ -196,8 +197,8 @@ export default {
                           this.$router.push({
                             path: "/payment",
                             query: {
-                              isBK: "1",
-                            },
+                              isBK: "1"
+                            }
                           });
                         });
                     }
@@ -205,18 +206,18 @@ export default {
                     //   path: "/payment-success",
                     // });
                   })
-                  .catch((_) => {});
+                  .catch(_ => {});
               });
           }
         })
-        .catch((err) => {
+        .catch(err => {
           this.$message({
             type: "warning",
-            message: err.msg,
+            message: err.msg
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 3 - 746
src/pages/person-center/my-examination/index.vue

@@ -1,756 +1,13 @@
 <template>
-  <div class="my-examination">
-    <div class="my-examination__header">
-      <el-tabs :value="activeName" @tab-click="tabChange">
-        <el-tab-pane label="考试预约" name="1"></el-tab-pane>
-        <el-tab-pane label="考试成绩和证书" name="2"></el-tab-pane>
-      </el-tabs>
-    </div>
-
-    <div class="my-examination__body">
-      <!-- 考试预约 -->
-      <template v-if="activeName == 1">
-        <div class="tabs-list">
-          <div
-            class="tabs-list__item"
-            :class="{ 'tabs-list__item--active': tabIndex == index }"
-            v-for="(item, index) in examList"
-            :key="index"
-            @click="examChange(item, index)"
-          >
-            {{ item.label }} {{ item.count ? `(${item.count})` : "" }}
-          </div>
-        </div>
-
-        <template v-if="listData.length == 0">
-          <div class="no-data" v-if="listData.length == 0">
-            您暂无相关考试预约哦~
-          </div>
-        </template>
-
-        <template v-else>
-          <div class="content-list">
-            <div
-              class="content-list__item"
-              v-for="(item, index) in listData"
-              :key="index"
-            >
-              <div class="content-list__item__header">
-                <div class="text">
-                  <div class="title">{{ item.goodsName }}</div>
-                  <div class="desc">
-                    {{ $tools.timestampToTime(item.createTime, false) }}
-                  </div>
-                </div>
-                <!--  -->
-                <el-button
-                  v-if="item.applyReportStatus == 1 && item.reportStatus == 0"
-                  type="primary"
-                  plain
-                  round
-                  class="btn"
-                  @click="toSignUp(item)"
-                  >签署疫情承诺书</el-button
-                >
-                <el-button
-                  v-if="isShowFun(item) && item.subscribeStatus == 1"
-                  type="primary"
-                  plain
-                  round
-                  class="btn"
-                  @click="cancel(item)"
-                  >取消预约</el-button
-                >
-              </div>
-              <div class="content-list__item__body clearfix">
-                <div class="left-box">
-                  <div class="title">报考学员信息</div>
-                  <div class="desc-list">
-                    <div class="desc-list__item">
-                      姓名:<span class="note">{{ item.realname }}</span>
-                    </div>
-                    <div class="desc-list__item">
-                      身份证:<span class="note">{{ item.idCard }}</span>
-                    </div>
-                    <div class="desc-list__item">
-                      考试身份:<span class="note">{{
-                        item.studentType == 1
-                          ? "非补考学员"
-                          : item.studentType == 2
-                          ? "补考学员"
-                          : ""
-                      }}</span>
-                    </div>
-                  </div>
-                </div>
-                <div class="center-box">
-                  <div class="title">考试预约信息</div>
-                  <div class="desc-list">
-                    <div class="desc-list__item desc-list__item--red">
-                      报名开放时间:
-                      {{ $tools.timestampToTime(item.applyStartTime) }} ~
-                      {{ $tools.timestampToTime(item.applyEndTime) }}
-                    </div>
-                    <div class="desc-list__item">
-                      报考专业:<span class="note" v-if="item.categoryName"
-                        >{{ item.categoryName }}专业</span
-                      >
-                    </div>
-                    <!-- fromPlat:1云学堂 2智慧考场 -->
-                    <!-- seatNumber 有座位号就显示roomAddress,否则显示applySiteAddress -->
-                    <div class="desc-list__item">
-                      考试地点:<span class="note">{{
-                        item.seatNumber ? (item.roomAddress || '') : (item.applySiteAddress || '')
-                      }}</span>
-                    </div>
-                    <div class="desc-list__item">
-                      考试时间:<span class="note"
-                        >{{ $tools.timestampToTime(item.applySiteExamTime) }}
-                        {{ item.applySiteStartTime }} ~
-                        {{ item.applySiteEndTime }}</span
-                      >
-                    </div>
-                    <div class="desc-list__item">
-                      考前培训地点:<span class="note">{{
-                        item.applySiteAddressTrain
-                      }}</span>
-                    </div>
-                    <div
-                      class="desc-list__item"
-                      v-if="
-                        item.applySiteExamTrainTime &&
-                        item.applySiteStartTrainTime &&
-                        item.applySiteEndTrainTime
-                      "
-                    >
-                      考前培训时间:<span class="note"
-                        >{{
-                          $tools.timestampToTime(item.applySiteExamTrainTime)
-                        }}
-                        {{ item.applySiteStartTrainTime }} ~
-                        {{ item.applySiteEndTrainTime }}</span
-                      >
-                    </div>
-                    <div class="desc-list__item">
-                      准考证号:<span class="note">{{ item.examineeCode || ''}}</span>
-                    </div>
-                    <div v-if="item.fromPlat == 2" class="desc-list__item">
-                      座位号:<span class="note">{{ item.seatNumber || '' }}</span>
-                    </div>
-                    <!-- applyReportStatus是否显示签署承诺书 1是,0否 -->
-                    <div v-if="item.applyReportStatus == 1" class="desc-list__item">
-                      疫情防控承诺书:<span class="note unSign" @click="toSignUp(item)">{{ item.reportStatus == 1 ? '已签署' : item.reportStatus == 0 ? '未签署' : '' }}</span>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <div class="pagination">
-            <el-pagination
-              @current-change="currentChange"
-              background
-              layout="prev, pager, next"
-              :total="total"
-              :pager-count="5"
-              :page-size="param.pageSize"
-            >
-            </el-pagination>
-          </div>
-        </template>
-      </template>
-      <!-- 考试成绩和证书 -->
-      <template v-if="activeName == 2">
-        <div class="tabs-list">
-          <div
-            class="tabs-list__item"
-            :class="{ 'tabs-list__item--active': resultIndex == index }"
-            v-for="(item, index) in resultList"
-            :key="index"
-            @click="resultChange(item, index)"
-          >
-            {{ item.label }} {{ item.count ? `(${item.count})` : "" }}
-          </div>
-        </div>
-
-        <template v-if="listData.length == 0">
-          <div class="no-data" v-if="listData.length == 0">
-            您暂无相关考试成绩和证书哦~
-          </div>
-        </template>
-
-        <template v-else>
-          <div class="content-list">
-            <div
-              class="content-list__item"
-              v-for="(item, index) in listData"
-              :key="index"
-            >
-              <div class="content-list__item__header">
-                <div class="text">
-                  <div class="title">{{ item.goodsName }}</div>
-                  <div class="desc">
-                    {{ $tools.timestampToTime(item.createTime, false) }}
-                  </div>
-                </div>
-                <!-- <div class="btn">取消预约</div> -->
-              </div>
-              <div class="content-list__item__body clearfix">
-                <div class="left-box">
-                  <div class="title">报考学员信息</div>
-                  <div class="desc-list">
-                    <div class="desc-list__item">
-                      姓名:<span class="note">{{ item.goodsName }}</span>
-                    </div>
-                    <div class="desc-list__item">
-                      身份证:<span class="note">{{ item.idCard }}</span>
-                    </div>
-                    <div class="desc-list__item">
-                      考试身份:<span class="note">{{
-                        item.studentType == 1
-                          ? "非补考学员"
-                          : item.studentType == 2
-                          ? "补考学员"
-                          : ""
-                      }}</span>
-                    </div>
-                  </div>
-                </div>
-                <div class="center-box">
-                  <div class="title">考试预约信息</div>
-                  <div class="desc-list">
-                    <div class="desc-list__item desc-list__item--red">
-                      报名开放时间:
-                      {{ $tools.timestampToTime(item.applyStartTime) }} ~
-                      {{ $tools.timestampToTime(item.applyEndTime) }}
-                    </div>
-                    <div class="desc-list__item">
-                      报考专业:<span class="note">{{
-                        item.categoryName
-                      }}</span>
-                    </div>
-                    <div class="desc-list__item">
-                      考试地点:<span class="note">{{
-                        item.applySiteAddress
-                      }}</span>
-                    </div>
-                    <div class="desc-list__item">
-                      考试时间:<span class="note"
-                        >{{ $tools.timestampToTime(item.applySiteExamTime) }}
-                        {{ item.applySiteStartTime }} ~
-                        {{ item.applySiteEndTime }}</span
-                      >
-                    </div>
-                    <div
-                      class="desc-list__item"
-                      v-if="item.applySiteAddressTrain"
-                    >
-                      考前培训地点:<span class="note">{{
-                        item.applySiteAddressTrain
-                      }}</span>
-                    </div>
-                    <div
-                      class="desc-list__item"
-                      v-if="
-                        item.applySiteExamTrainTime &&
-                        item.applySiteStartTrainTime &&
-                        item.applySiteEndTrainTime
-                      "
-                    >
-                      考前培训时间:<span class="note">{{
-                        $tools.timestampToTime(item.applySiteExamTrainTime) +
-                        " " +
-                        item.applySiteStartTrainTime +
-                        "~" +
-                        item.applySiteEndTrainTime
-                      }}</span>
-                    </div>
-                  </div>
-                </div>
-                <div class="right-box">
-                  <div class="title">考试成绩和证书信息</div>
-                  <div class="desc-list">
-                    <div class="desc-list__item">
-                      考试成绩:<span class="note"
-                        >{{ item.performance }}分</span
-                      >
-                    </div>
-                    <div class="desc-list__item">
-                      考试结果:<span
-                        class="note note--success"
-                        v-if="item.result === 1"
-                        >通过</span
-                      >
-                      <span class="note note--error" v-if="item.result === 0"
-                        >未通过</span
-                      >
-                    </div>
-                    <div class="desc-list__item" v-if="item.result === 1">
-                      证书编号:<span class="note">{{
-                        item.certificateCode
-                      }}</span>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <div class="pagination">
-            <el-pagination
-              @current-change="currentChange"
-              background
-              layout="prev, pager, next"
-              :total="total"
-              :pager-count="5"
-              :page-size="param.pageSize"
-            >
-            </el-pagination>
-          </div>
-        </template>
-      </template>
-    </div>
-
-    <!-- 疫情承诺书 -->
-    <sign-commit :appointModal.sync="appointModal" :commitItem="commitItem" @successSign="successSign"></sign-commit>
+  <div>
+    <router-view></router-view>
   </div>
 </template>
 
 <script>
-import { mapGetters, mapActions } from "vuex";
-import SignCommit from './components/SignCommit.vue'
-export default {
-  name: "MyExamination",
-  components: { SignCommit },
-  computed: {
-    ...mapGetters(["sysTime"]),
-  },
-  data() {
-    return {
-      subscribeStatus: 1,
-      exceedExamExpend: 2,
-      result: "",
-      tabIndex: 0,
-      resultIndex: 0,
-      activeName: "1",
-      resultList: [
-        {
-          label: "通过",
-          count: 0,
-          result: 1,
-        },
-        {
-          label: "未通过",
-          count: 0,
-          result: 0,
-        },
-      ],
-      examList: [
-        {
-          label: "已预约",
-          count: 0,
-          subscribeStatus: 1,
-          exceedExamExpend: 2,
-        },
-        {
-          label: "已取消",
-          count: 0,
-          subscribeStatus: 2,
-          exceedExamExpend: "",
-        },
-        {
-          label: "已过期",
-          count: 0,
-          subscribeStatus: 1,
-          exceedExamExpend: 1,
-        },
-      ],
-      total: 0,
-      param: {
-        pageNum: 1,
-        pageSize: 10,
-      },
-      listData: [],
-      appointModal: false, // 疫情承诺书弹窗
-      commitItem: {},
-    };
-  },
-  mounted() {
-    this.getApplylist();
-    this.getCount();
-  },
-  methods: {
-    ...mapActions(["setSystemTime"]),
-    // 签署成功刷新列表
-    successSign() {
-      console.log('成功--')
-      this.getApplylist()
-      this.getCount()
-    },
-    getCount() {
-      this.$request
-        .getApplylist({
-          pageNum: 1,
-          pageSize: 1,
-          subscribeStatus: 1,
-          exceedExamExpend: 2,
-        })
-        .then((res) => {
-          this.examList[0].count = res.total;
-        });
-
-      this.$request
-        .getApplylist({
-          pageNum: 1,
-          pageSize: 1,
-          subscribeStatus: 2,
-          exceedExamExpend: "",
-        })
-        .then((res) => {
-          this.examList[1].count = res.total;
-        });
-
-      this.$request
-        .getApplylist({
-          pageNum: 1,
-          pageSize: 1,
-          subscribeStatus: 1,
-          exceedExamExpend: 1,
-        })
-        .then((res) => {
-          this.examList[2].count = res.total;
-        });
-
-      this.$request
-        .getApplylist({
-          pageNum: 1,
-          pageSize: 1,
-          result: 1,
-        })
-        .then((res) => {
-          this.resultList[0].count = res.total;
-        });
-
-      this.$request
-        .getApplylist({
-          pageNum: 1,
-          pageSize: 1,
-          result: 0,
-        })
-        .then((res) => {
-          this.resultList[1].count = res.total;
-        });
-    },
-    tabChange(e) {
-      if (this.activeName == e.name) {
-        return;
-      }
-      this.activeName = e.name;
-
-      if (this.activeName == "1") {
-        this.tabIndex = 0;
-        this.result = "";
-        this.param.pageNum = 1;
-        this.subscribeStatus = 1;
-        this.exceedExamExpend = 2;
-        this.getApplylist();
-      } else {
-        this.resultIndex = 0;
-        this.result = 1;
-        this.param.pageNum = 1;
-        this.subscribeStatus = "";
-        this.exceedExamExpend = "";
-        this.getApplylist();
-      }
-    },
-    resultChange(item, index) {
-      if (this.resultIndex == index) return;
-      this.resultIndex = index;
-      this.result = item.result;
-      this.param.pageNum = 1;
-      this.subscribeStatus = "";
-      this.exceedExamExpend = "";
-      this.getApplylist();
-    },
-    examChange(item, index) {
-      if (this.tabIndex == index) return;
-      this.tabIndex = index;
-      this.subscribeStatus = item.subscribeStatus;
-      this.exceedExamExpend = item.exceedExamExpend;
-      this.param.pageNum = 1;
-      this.getApplylist();
-    },
-    getApplylist() {
-      this.$request
-        .getApplylist({
-          pageNum: this.param.pageNum,
-          pageSize: this.param.pageSize,
-          subscribeStatus: this.subscribeStatus,
-          exceedExamExpend: this.exceedExamExpend,
-          result: this.result,
-        })
-        .then((res) => {
-          this.listData = res.rows;
-          this.total = res.total;
-          this.setSystemTime();
-        });
-    },
-    isShowFun(item) {
-      // var timestamp = parseInt(new Date().getTime() / 1000);
-      var newDataAge = parseInt(
-        new Date(new Date(this.sysTime * 1000).toLocaleDateString()).getTime() /
-          1000
-      );
-      //报名开放时间”过了“结束时间点”,【取消预约】按钮隐藏
-      if (item.applyEndTime <= this.sysTime) {
-        console.log(999);
-        return false;
-      } else {
-        //报名开放时间-进行中,【前培标记:已开通】,【取消预约】按钮隐藏
-        if (item.beforeStatus === 1) {
-          console.log(1);
-          return false;
-        } else if (item.examStatus !== 0) {
-          console.log(2);
-          return false;
-        } else if (item.applySiteExamTime < newDataAge) {
-          console.log(3);
-          return false;
-        } else if (item.applySiteExamTime > newDataAge) {
-          console.log(4);
-          return true;
-        } else if (item.applySiteExamTime == newDataAge) {
-          console.log(5);
-          var hours = new Date(this.sysTime * 1000).getHours();
-          var mins = new Date(this.sysTime * 1000).getMinutes();
-          var arrays = item.applySiteStartTime.split(":").map(Number);
-          if (arrays[0] > hours) {
-            return true;
-          } else if (arrays[0] < hours) {
-            return false;
-          } else {
-            if (arrays[1] <= mins) {
-              return false;
-            } else {
-              return true;
-            }
-          }
-        } else {
-          return true;
-        }
-      }
-    },
-    cancel(item) {
-      const confirmText = [
-        "每次考试均有名额限制,",
-        "取消预约后,您可能无法再次预约本次考试。",
-        "请慎重考虑。",
-        "您确定要取消本次考试预约吗?",
-      ];
-      const newDatas = [];
-      const h = this.$createElement;
-      for (const i in confirmText) {
-        newDatas.push(h("p", null, confirmText[i]));
-      }
-      this.$confirm(h("div", null, newDatas), "温馨提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        closeOnClickModal: false,
-        closeOnPressEscape: false,
-        distinguishCancelAndClose: false,
-        showClose: false,
-      })
-        .then((_) => {
-          var bols = this.isShowFun(item);
-          console.log(bols);
-          if (!bols) {
-            this.$message({
-              type: "warning",
-              message: "当前已无法取消预约",
-            });
-            return;
-          }
-          this.$request
-            .editApply({
-              subscribeId: item.subscribeId,
-              subscribeStatus: 2,
-            })
-            .then((res) => {
-              this.$request
-                .getApplylist({ subscribeStatus: 1, exceedExamExpend: 2 })
-                .then((res) => {
-                  this.listData = res.rows;
-                  this.getApplylist();
-                  this.getCount();
-                });
-            });
-        })
-        .catch((_) => {
-          console.log(_);
-        });
-    },
-
-    currentChange(e) {
-      this.param.pageNum = e;
-      this.getApplylist();
-    },
-    toSignUp(item) {
-      console.log('item', item)
-      this.commitItem = item
-      this.appointModal = true
-    },
-  },
-};
+export default {};
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style scoped lang="scss">
-.my-examination {
-  &__header {
-    /deep/ .el-tabs__header {
-      margin-bottom: 0;
-    }
-  }
-  &__body {
-    .tabs-list {
-      border-bottom: 1px solid #eee;
-      font-size: 0;
-      &__item {
-        cursor: pointer;
-        display: inline-block;
-        padding: 0 30px;
-        height: 40px;
-        line-height: 40px;
-        font-size: 14px;
-        font-family: Microsoft YaHei;
-        font-weight: 400;
-        color: #666666;
-
-        &--active {
-          color: #3f8dfd;
-        }
-      }
-    }
-
-    .content-list {
-      margin-top: 10px;
-
-      &__item {
-        margin-bottom: 24px;
-        height: 350px;
-        background: #fafbfc;
-        border: 1px solid #eeeeee;
-        box-shadow: 0px 0px 7px 1px rgba(0, 0, 0, 0.04);
-        border-radius: 8px;
-        &__header {
-          height: 64px;
-          display: flex;
-          align-items: center;
-          padding: 0 14px;
-          border-bottom: 1px solid #eee;
-
-          .text {
-            flex: 1;
-            .title {
-              font-size: 16px;
-              font-family: Microsoft YaHei;
-              font-weight: bold;
-              color: #333333;
-            }
-
-            .desc {
-              margin-top: 8px;
-              font-size: 12px;
-              font-family: Microsoft YaHei;
-              font-weight: 400;
-              color: #999999;
-            }
-          }
-
-          .btn {
-            width: 122px;
-            height: 32px;
-            border-radius: 16px;
-            padding: 0;
-            text-align: center;
-            line-height: 32px;
-            font-size: 16px;
-          }
-        }
-
-        &__body {
-          .left-box,
-          .center-box,
-          .right-box {
-            float: left;
-            width: 300px;
-            padding: 0 14px;
-
-            .title {
-              font-size: 16px;
-              font-family: Microsoft YaHei;
-              font-weight: 400;
-              color: #3f8dfd;
-              padding: 0 14px;
-              margin: 14px 0;
-              border-left: 2px solid #3f8dfd;
-            }
-
-            .desc-list {
-              &__item {
-                line-height: 28px;
-                font-size: 16px;
-                font-family: Microsoft YaHei;
-                font-weight: 400;
-                color: #333333;
-
-                &--red {
-                  color: #ff3b30;
-                }
-
-                .note {
-                  font-size: 16px;
-                  font-family: Microsoft YaHei;
-                  font-weight: 400;
-                  color: #666666;
-
-                  &--success {
-                    color: #56dc68;
-                  }
-
-                  &--error {
-                    color: #ff3b30;
-                  }
-                }
-                .unSign {
-                  text-decoration: underline;
-                  cursor: pointer;
-                }
-              }
-            }
-          }
-
-          .center-box {
-            width: 500px;
-          }
-
-          .right-box {
-            width: 300px;
-          }
-        }
-      }
-    }
-
-    .no-data {
-      text-align: center;
-      padding: 50px 0;
-      color: #666;
-      font-size: 16px;
-    }
-
-    .pagination {
-      padding: 30px 0;
-      text-align: center;
-    }
-  }
-}
 </style>

+ 759 - 0
src/pages/person-center/my-examination/index/index.vue

@@ -0,0 +1,759 @@
+<template>
+  <div class="my-examination">
+    <div class="my-examination__header">
+      <el-tabs :value="activeName" @tab-click="tabChange">
+        <el-tab-pane label="考试预约" name="1"></el-tab-pane>
+        <el-tab-pane label="考试成绩和证书" name="2"></el-tab-pane>
+      </el-tabs>
+    </div>
+
+    <div class="my-examination__body">
+      <!-- 考试预约 -->
+      <template v-if="activeName == 1">
+        <div class="tabs-list">
+          <div
+            class="tabs-list__item"
+            :class="{ 'tabs-list__item--active': tabIndex == index }"
+            v-for="(item, index) in examList"
+            :key="index"
+            @click="examChange(item, index)"
+          >
+            {{ item.label }} {{ item.count ? `(${item.count})` : "" }}
+          </div>
+        </div>
+
+        <template v-if="listData.length == 0">
+          <div class="no-data" v-if="listData.length == 0">
+            您暂无相关考试预约哦~
+          </div>
+        </template>
+
+        <template v-else>
+          <div class="content-list">
+            <div
+              class="content-list__item"
+              v-for="(item, index) in listData"
+              :key="index"
+            >
+              <div class="content-list__item__header">
+                <div class="text">
+                  <div class="title">{{ item.goodsName }}</div>
+                  <div class="desc">
+                    {{ $tools.timestampToTime(item.createTime, false) }}
+                  </div>
+                </div>
+                <!--  -->
+                <el-button
+                  v-if="item.applyReportStatus == 1 && item.reportStatus == 0 && false"
+                  type="primary"
+                  plain
+                  round
+                  class="btn"
+                  @click="toSignUp(item)"
+                  >签署疫情承诺书</el-button
+                >
+                <el-button
+                  v-if="isShowFun(item) && item.subscribeStatus == 1"
+                  type="primary"
+                  plain
+                  round
+                  class="btn"
+                  @click="cancel(item)"
+                  >取消预约</el-button
+                >
+              </div>
+              <div class="content-list__item__body clearfix">
+                <div class="left-box">
+                  <div class="title">报考学员信息</div>
+                  <div class="desc-list">
+                    <div class="desc-list__item">
+                      姓名:<span class="note">{{ item.realname }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      身份证:<span class="note">{{ item.idCard }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      考试身份:<span class="note">{{
+                        item.studentType == 1
+                          ? "非补考学员"
+                          : item.studentType == 2
+                          ? "补考学员"
+                          : ""
+                      }}</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="center-box">
+                  <div class="title">考试预约信息</div>
+                  <div class="desc-list">
+                    <div class="desc-list__item desc-list__item--red">
+                      报名开放时间:
+                      {{ $tools.timestampToTime(item.applyStartTime) }} ~
+                      {{ $tools.timestampToTime(item.applyEndTime) }}
+                    </div>
+                    <div class="desc-list__item">
+                      报考专业:<span class="note" v-if="item.categoryName"
+                        >{{ item.categoryName }}专业</span
+                      >
+                    </div>
+                    <!-- fromPlat:1云学堂 2智慧考场 -->
+                    <!-- seatNumber 有座位号就显示roomAddress,否则显示applySiteAddress -->
+                    <div class="desc-list__item">
+                      考试地点:<span class="note">{{
+                        item.seatNumber ? (item.roomAddress || '') : (item.applySiteAddress || '')
+                      }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      考试时间:<span class="note"
+                        >{{ $tools.timestampToTime(item.applySiteExamTime) }}
+                        {{ item.applySiteStartTime }} ~
+                        {{ item.applySiteEndTime }}</span
+                      >
+                    </div>
+                    <div class="desc-list__item">
+                      座位号:<span class="note">{{ item.seatNumber || '' }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      考前培训地点:<span class="note">{{
+                        item.applySiteAddressTrain
+                      }}</span>
+                    </div>
+                    <div
+                      class="desc-list__item"
+                      v-if="
+                        item.applySiteExamTrainTime &&
+                        item.applySiteStartTrainTime &&
+                        item.applySiteEndTrainTime
+                      "
+                    >
+                      考前培训时间:<span class="note"
+                        >{{
+                          $tools.timestampToTime(item.applySiteExamTrainTime)
+                        }}
+                        {{ item.applySiteStartTrainTime }} ~
+                        {{ item.applySiteEndTrainTime }}</span
+                      >
+                    </div>
+                    <div class="desc-list__item">
+                      准考证号:<span class="note">{{ item.examineeCode || ''}}</span>
+                    </div>
+                    <!-- applyReportStatus是否显示签署承诺书 1是,0否 -->
+                    <div v-if="item.applyReportStatus == 1 && false" class="desc-list__item">
+                      疫情防控承诺书:<span class="note unSign" @click="toSignUp(item)">{{ item.reportStatus == 1 ? '已签署' : item.reportStatus == 0 ? '未签署' : '' }}</span>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="pagination">
+            <el-pagination
+              @current-change="currentChange"
+              background
+              layout="prev, pager, next"
+              :total="total"
+              :pager-count="5"
+              :page-size="param.pageSize"
+            >
+            </el-pagination>
+          </div>
+        </template>
+      </template>
+      <!-- 考试成绩和证书 -->
+      <template v-if="activeName == 2">
+        <div class="tabs-list">
+          <div
+            class="tabs-list__item"
+            :class="{ 'tabs-list__item--active': resultIndex == index }"
+            v-for="(item, index) in resultList"
+            :key="index"
+            @click="resultChange(item, index)"
+          >
+            {{ item.label }} {{ item.count ? `(${item.count})` : "" }}
+          </div>
+        </div>
+
+        <template v-if="listData.length == 0">
+          <div class="no-data" v-if="listData.length == 0">
+            您暂无相关考试成绩和证书哦~
+          </div>
+        </template>
+
+        <template v-else>
+          <div class="content-list">
+            <div
+              class="content-list__item"
+              v-for="(item, index) in listData"
+              :key="index"
+            >
+              <div class="content-list__item__header">
+                <div class="text">
+                  <div class="title">{{ item.goodsName }}</div>
+                  <div class="desc">
+                    {{ $tools.timestampToTime(item.createTime, false) }}
+                  </div>
+                </div>
+                <!-- <div class="btn">取消预约</div> -->
+              </div>
+              <div class="content-list__item__body clearfix">
+                <div class="left-box">
+                  <div class="title">报考学员信息</div>
+                  <div class="desc-list">
+                    <div class="desc-list__item">
+                      姓名:<span class="note">{{ item.goodsName }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      身份证:<span class="note">{{ item.idCard }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      考试身份:<span class="note">{{
+                        item.studentType == 1
+                          ? "非补考学员"
+                          : item.studentType == 2
+                          ? "补考学员"
+                          : ""
+                      }}</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="center-box">
+                  <div class="title">考试预约信息</div>
+                  <div class="desc-list">
+                    <div class="desc-list__item desc-list__item--red">
+                      报名开放时间:
+                      {{ $tools.timestampToTime(item.applyStartTime) }} ~
+                      {{ $tools.timestampToTime(item.applyEndTime) }}
+                    </div>
+                    <div class="desc-list__item">
+                      报考专业:<span class="note">{{
+                        item.categoryName
+                      }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      考试地点:<span class="note">{{
+                        item.applySiteAddress
+                      }}</span>
+                    </div>
+                    <div class="desc-list__item">
+                      考试时间:<span class="note"
+                        >{{ $tools.timestampToTime(item.applySiteExamTime) }}
+                        {{ item.applySiteStartTime }} ~
+                        {{ item.applySiteEndTime }}</span
+                      >
+                    </div>
+                    <div class="desc-list__item">
+                      座位号:<span class="note">{{ item.seatNumber || '' }}</span>
+                    </div>
+                    <div
+                      class="desc-list__item"
+                      v-if="item.applySiteAddressTrain"
+                    >
+                      考前培训地点:<span class="note">{{
+                        item.applySiteAddressTrain
+                      }}</span>
+                    </div>
+                    <div
+                      class="desc-list__item"
+                      v-if="
+                        item.applySiteExamTrainTime &&
+                        item.applySiteStartTrainTime &&
+                        item.applySiteEndTrainTime
+                      "
+                    >
+                      考前培训时间:<span class="note">{{
+                        $tools.timestampToTime(item.applySiteExamTrainTime) +
+                        " " +
+                        item.applySiteStartTrainTime +
+                        "~" +
+                        item.applySiteEndTrainTime
+                      }}</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="right-box">
+                  <div class="title">考试成绩和证书信息</div>
+                  <div class="desc-list">
+                    <div class="desc-list__item">
+                      考试成绩:<span class="note"
+                        >{{ item.performance }}分</span
+                      >
+                    </div>
+                    <div class="desc-list__item">
+                      考试结果:<span
+                        class="note note--success"
+                        v-if="item.result === 1"
+                        >通过</span
+                      >
+                      <span class="note note--error" v-if="item.result === 0"
+                        >未通过</span
+                      >
+                    </div>
+                    <div class="desc-list__item" v-if="item.result === 1">
+                      证书编号:<span class="note">{{
+                        item.certificateCode
+                      }}</span>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="pagination">
+            <el-pagination
+              @current-change="currentChange"
+              background
+              layout="prev, pager, next"
+              :total="total"
+              :pager-count="5"
+              :page-size="param.pageSize"
+            >
+            </el-pagination>
+          </div>
+        </template>
+      </template>
+    </div>
+
+    <!-- 疫情承诺书 -->
+    <sign-commit :appointModal.sync="appointModal" :commitItem="commitItem" @successSign="successSign"></sign-commit>
+  </div>
+</template>
+
+<script>
+import { mapGetters, mapActions } from "vuex";
+import SignCommit from '../components/SignCommit.vue'
+export default {
+  name: "MyExamination",
+  components: { SignCommit },
+  computed: {
+    ...mapGetters(["sysTime"]),
+  },
+  data() {
+    return {
+      subscribeStatus: 1,
+      exceedExamExpend: 2,
+      result: "",
+      tabIndex: 0,
+      resultIndex: 0,
+      activeName: "1",
+      resultList: [
+        {
+          label: "通过",
+          count: 0,
+          result: 1,
+        },
+        {
+          label: "未通过",
+          count: 0,
+          result: 0,
+        },
+      ],
+      examList: [
+        {
+          label: "已预约",
+          count: 0,
+          subscribeStatus: 1,
+          exceedExamExpend: 2,
+        },
+        {
+          label: "已取消",
+          count: 0,
+          subscribeStatus: 2,
+          exceedExamExpend: "",
+        },
+        {
+          label: "已过期",
+          count: 0,
+          subscribeStatus: 1,
+          exceedExamExpend: 1,
+        },
+      ],
+      total: 0,
+      param: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      listData: [],
+      appointModal: false, // 疫情承诺书弹窗
+      commitItem: {},
+    };
+  },
+  mounted() {
+    this.getApplylist();
+    this.getCount();
+  },
+  methods: {
+    ...mapActions(["setSystemTime"]),
+    // 签署成功刷新列表
+    successSign() {
+      console.log('成功--')
+      this.getApplylist()
+      this.getCount()
+    },
+    getCount() {
+      this.$request
+        .getApplylist({
+          pageNum: 1,
+          pageSize: 1,
+          subscribeStatus: 1,
+          exceedExamExpend: 2,
+        })
+        .then((res) => {
+          this.examList[0].count = res.total;
+        });
+
+      this.$request
+        .getApplylist({
+          pageNum: 1,
+          pageSize: 1,
+          subscribeStatus: 2,
+          exceedExamExpend: "",
+        })
+        .then((res) => {
+          this.examList[1].count = res.total;
+        });
+
+      this.$request
+        .getApplylist({
+          pageNum: 1,
+          pageSize: 1,
+          subscribeStatus: 1,
+          exceedExamExpend: 1,
+        })
+        .then((res) => {
+          this.examList[2].count = res.total;
+        });
+
+      this.$request
+        .getApplylist({
+          pageNum: 1,
+          pageSize: 1,
+          result: 1,
+        })
+        .then((res) => {
+          this.resultList[0].count = res.total;
+        });
+
+      this.$request
+        .getApplylist({
+          pageNum: 1,
+          pageSize: 1,
+          result: 0,
+        })
+        .then((res) => {
+          this.resultList[1].count = res.total;
+        });
+    },
+    tabChange(e) {
+      if (this.activeName == e.name) {
+        return;
+      }
+      this.activeName = e.name;
+
+      if (this.activeName == "1") {
+        this.tabIndex = 0;
+        this.result = "";
+        this.param.pageNum = 1;
+        this.subscribeStatus = 1;
+        this.exceedExamExpend = 2;
+        this.getApplylist();
+      } else {
+        this.resultIndex = 0;
+        this.result = 1;
+        this.param.pageNum = 1;
+        this.subscribeStatus = "";
+        this.exceedExamExpend = "";
+        this.getApplylist();
+      }
+    },
+    resultChange(item, index) {
+      if (this.resultIndex == index) return;
+      this.resultIndex = index;
+      this.result = item.result;
+      this.param.pageNum = 1;
+      this.subscribeStatus = "";
+      this.exceedExamExpend = "";
+      this.getApplylist();
+    },
+    examChange(item, index) {
+      if (this.tabIndex == index) return;
+      this.tabIndex = index;
+      this.subscribeStatus = item.subscribeStatus;
+      this.exceedExamExpend = item.exceedExamExpend;
+      this.param.pageNum = 1;
+      this.getApplylist();
+    },
+    getApplylist() {
+      this.$request
+        .getApplylist({
+          pageNum: this.param.pageNum,
+          pageSize: this.param.pageSize,
+          subscribeStatus: this.subscribeStatus,
+          exceedExamExpend: this.exceedExamExpend,
+          result: this.result,
+        })
+        .then((res) => {
+          this.listData = res.rows;
+          this.total = res.total;
+          this.setSystemTime();
+        });
+    },
+    isShowFun(item) {
+      // var timestamp = parseInt(new Date().getTime() / 1000);
+      var newDataAge = parseInt(
+        new Date(new Date(this.sysTime * 1000).toLocaleDateString()).getTime() /
+          1000
+      );
+      //报名开放时间”过了“结束时间点”,【取消预约】按钮隐藏
+      if (item.applyEndTime <= this.sysTime) {
+        console.log(999);
+        return false;
+      } else {
+        //报名开放时间-进行中,【前培标记:已开通】,【取消预约】按钮隐藏
+        if (item.beforeStatus === 1) {
+          console.log(1);
+          return false;
+        } else if (item.examStatus !== 0) {
+          console.log(2);
+          return false;
+        } else if (item.applySiteExamTime < newDataAge) {
+          console.log(3);
+          return false;
+        } else if (item.applySiteExamTime > newDataAge) {
+          console.log(4);
+          return true;
+        } else if (item.applySiteExamTime == newDataAge) {
+          console.log(5);
+          var hours = new Date(this.sysTime * 1000).getHours();
+          var mins = new Date(this.sysTime * 1000).getMinutes();
+          var arrays = item.applySiteStartTime.split(":").map(Number);
+          if (arrays[0] > hours) {
+            return true;
+          } else if (arrays[0] < hours) {
+            return false;
+          } else {
+            if (arrays[1] <= mins) {
+              return false;
+            } else {
+              return true;
+            }
+          }
+        } else {
+          return true;
+        }
+      }
+    },
+    cancel(item) {
+      const confirmText = [
+        "每次考试均有名额限制,",
+        "取消预约后,您可能无法再次预约本次考试。",
+        "请慎重考虑。",
+        "您确定要取消本次考试预约吗?",
+      ];
+      const newDatas = [];
+      const h = this.$createElement;
+      for (const i in confirmText) {
+        newDatas.push(h("p", null, confirmText[i]));
+      }
+      this.$confirm(h("div", null, newDatas), "温馨提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        closeOnClickModal: false,
+        closeOnPressEscape: false,
+        distinguishCancelAndClose: false,
+        showClose: false,
+      })
+        .then((_) => {
+          var bols = this.isShowFun(item);
+          console.log(bols);
+          if (!bols) {
+            this.$message({
+              type: "warning",
+              message: "当前已无法取消预约",
+            });
+            return;
+          }
+          this.$request
+            .editApply({
+              subscribeId: item.subscribeId,
+              subscribeStatus: 2,
+            })
+            .then((res) => {
+              this.$request
+                .getApplylist({ subscribeStatus: 1, exceedExamExpend: 2 })
+                .then((res) => {
+                  this.listData = res.rows;
+                  this.getApplylist();
+                  this.getCount();
+                });
+            });
+        })
+        .catch((_) => {
+          console.log(_);
+        });
+    },
+
+    currentChange(e) {
+      this.param.pageNum = e;
+      this.getApplylist();
+    },
+    toSignUp(item) {
+      console.log('item', item)
+      this.commitItem = item
+      this.appointModal = true
+    },
+  },
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped lang="scss">
+.my-examination {
+  &__header {
+    /deep/ .el-tabs__header {
+      margin-bottom: 0;
+    }
+  }
+  &__body {
+    .tabs-list {
+      border-bottom: 1px solid #eee;
+      font-size: 0;
+      &__item {
+        cursor: pointer;
+        display: inline-block;
+        padding: 0 30px;
+        height: 40px;
+        line-height: 40px;
+        font-size: 14px;
+        font-family: Microsoft YaHei;
+        font-weight: 400;
+        color: #666666;
+
+        &--active {
+          color: #3f8dfd;
+        }
+      }
+    }
+
+    .content-list {
+      margin-top: 10px;
+
+      &__item {
+        margin-bottom: 24px;
+        height: 350px;
+        background: #fafbfc;
+        border: 1px solid #eeeeee;
+        box-shadow: 0px 0px 7px 1px rgba(0, 0, 0, 0.04);
+        border-radius: 8px;
+        &__header {
+          height: 64px;
+          display: flex;
+          align-items: center;
+          padding: 0 14px;
+          border-bottom: 1px solid #eee;
+
+          .text {
+            flex: 1;
+            .title {
+              font-size: 16px;
+              font-family: Microsoft YaHei;
+              font-weight: bold;
+              color: #333333;
+            }
+
+            .desc {
+              margin-top: 8px;
+              font-size: 12px;
+              font-family: Microsoft YaHei;
+              font-weight: 400;
+              color: #999999;
+            }
+          }
+
+          .btn {
+            width: 122px;
+            height: 32px;
+            border-radius: 16px;
+            padding: 0;
+            text-align: center;
+            line-height: 32px;
+            font-size: 16px;
+          }
+        }
+
+        &__body {
+          .left-box,
+          .center-box,
+          .right-box {
+            float: left;
+            width: 300px;
+            padding: 0 14px;
+
+            .title {
+              font-size: 16px;
+              font-family: Microsoft YaHei;
+              font-weight: 400;
+              color: #3f8dfd;
+              padding: 0 14px;
+              margin: 14px 0;
+              border-left: 2px solid #3f8dfd;
+            }
+
+            .desc-list {
+              &__item {
+                line-height: 28px;
+                font-size: 16px;
+                font-family: Microsoft YaHei;
+                font-weight: 400;
+                color: #333333;
+
+                &--red {
+                  color: #ff3b30;
+                }
+
+                .note {
+                  font-size: 16px;
+                  font-family: Microsoft YaHei;
+                  font-weight: 400;
+                  color: #666666;
+
+                  &--success {
+                    color: #56dc68;
+                  }
+
+                  &--error {
+                    color: #ff3b30;
+                  }
+                }
+                .unSign {
+                  text-decoration: underline;
+                  cursor: pointer;
+                }
+              }
+            }
+          }
+
+          .center-box {
+            width: 500px;
+          }
+
+          .right-box {
+            width: 300px;
+          }
+        }
+      }
+    }
+
+    .no-data {
+      text-align: center;
+      padding: 50px 0;
+      color: #666;
+      font-size: 16px;
+    }
+
+    .pagination {
+      padding: 30px 0;
+      text-align: center;
+    }
+  }
+}
+</style>

+ 104 - 80
src/pages/person-center/my-message/index.vue

@@ -179,7 +179,7 @@
             (statusGO &&
               listData.systemStatus === 1 &&
               getNames(listData.remindId) !== '') ||
-            (listData.systemStatus === 2 && listData.receiptStatus === 0)
+              (listData.systemStatus === 2 && listData.receiptStatus === 0)
           "
         >
           <el-button
@@ -196,8 +196,8 @@
             @click="jumpFuns(goodsData, listData.remindId)"
             v-if="
               statusGO &&
-              listData.systemStatus === 1 &&
-              getNames(listData.remindId) !== ''
+                listData.systemStatus === 1 &&
+                getNames(listData.remindId) !== ''
             "
           >
             {{ getNames(listData.remindId) }}
@@ -219,7 +219,7 @@ import RebuildModal from "@/components/rebuildModal";
 export default {
   name: "MyMessage",
   components: {
-    RebuildModal,
+    RebuildModal
   },
   data() {
     return {
@@ -227,17 +227,17 @@ export default {
       tabList: [
         {
           label: "系统消息",
-          systemStatus: "1",
+          systemStatus: "1"
         },
         {
           label: "教务消息",
-          systemStatus: "2",
-        },
+          systemStatus: "2"
+        }
       ],
       formData: {
         systemStatusList: "1", //1系统消息2教务消息
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 10
       },
       goodsData: {},
       list: [],
@@ -250,7 +250,7 @@ export default {
       rebuildItem: [],
       listListStatus: true,
       receiptNum: 0, //未读数量
-      orderGoodsId: 0,
+      orderGoodsId: 0
     };
   },
   mounted() {
@@ -262,9 +262,9 @@ export default {
       this.$request
         .getappinformUserlist({
           systemStatusList: this.formData.systemStatusList,
-          receiptStatus: 0,
+          receiptStatus: 0
         })
-        .then((res) => {
+        .then(res => {
           this.receiptNum = res.total;
         });
     },
@@ -273,18 +273,18 @@ export default {
      */
     uploadMsgStatus() {
       this.$confirm("确定全部标记为已读?")
-        .then((_) => {
+        .then(_ => {
           this.$request
             .courseappinformUserupdateAllRead({
-              systemStatus: this.formData.systemStatusList,
+              systemStatus: this.formData.systemStatusList
             })
-            .then((res) => {
+            .then(res => {
               this.getMsgCount();
               this.$message.success("成功");
               this.getappinformUserlist();
             });
         })
-        .catch((_) => {});
+        .catch(_ => {});
     },
     currentChange(e) {
       this.formData.pageNum = e;
@@ -300,7 +300,7 @@ export default {
       this.listListStatus = false;
       this.$request
         .getappinformUserlist(this.formData)
-        .then((res) => {
+        .then(res => {
           this.list = res.rows;
           this.total = res.total;
           this.getreceiptStatus();
@@ -316,14 +316,14 @@ export default {
      */
     clearMsg() {
       this.$confirm("清空消息吗?")
-        .then((_) => {
-          this.$request.appInformUserRemoveAll().then((res) => {
+        .then(_ => {
+          this.$request.appInformUserRemoveAll().then(res => {
             this.getMsgCount();
             this.formData.pageNum = 1;
             this.getappinformUserlist();
           });
         })
-        .catch((_) => {});
+        .catch(_ => {});
     },
 
     getNames(int) {
@@ -392,14 +392,14 @@ export default {
 
           if (item.goodsType == 1 || item.goodsType == 6) {
             item.orderGoodsId = this.orderGoodsId;
-            this.canJump(item).then((res) => {
+            this.canJump(item).then(res => {
               this.$router.push({
                 path: `/my-course-detail/${item.goodsId}`,
                 query: {
                   gradeId: item.gradeId,
                   orderGoodsId: item.orderGoodsId,
-                  courseId: res.rows[0].courseId || "",
-                },
+                  courseId: res.rows[0].courseId || ""
+                }
               });
             });
 
@@ -410,8 +410,8 @@ export default {
             this.$router.push({
               path: "/person-center/my-bank/bank-detail/" + item.goodsId,
               query: {
-                orderGoodsId: item.orderGoodsId,
-              },
+                orderGoodsId: item.orderGoodsId
+              }
             });
           }
 
@@ -420,28 +420,28 @@ export default {
         case 4:
           console.log(item, "item");
           item.orderGoodsId = this.orderGoodsId;
-          this.canJump(item).then((res) => {
+          this.canJump(item).then(res => {
             this.$router.push({
               path: `/my-course-detail/${item.goodsId}`,
               query: {
                 gradeId: item.gradeId,
                 orderGoodsId: item.orderGoodsId,
-                courseId: res.rows[0].courseId || "",
-              },
+                courseId: res.rows[0].courseId || ""
+              }
             });
           });
           break;
         case 24:
           console.log(item, "item");
           item.orderGoodsId = this.orderGoodsId;
-          this.canJump(item).then((res) => {
+          this.canJump(item).then(res => {
             this.$router.push({
               path: `/my-course-detail/${item.goodsId}`,
               query: {
                 gradeId: item.gradeId,
                 orderGoodsId: item.orderGoodsId,
-                courseId: res.rows[0].courseId || "",
-              },
+                courseId: res.rows[0].courseId || ""
+              }
             });
           });
           break;
@@ -449,36 +449,36 @@ export default {
         case 13:
           var data = {
             goodsId: item.goodsId,
-            gradeId: item.gradeId,
+            gradeId: item.gradeId
           };
           this.$request
             .getApplysubscribe(data)
-            .then((res) => {
+            .then(res => {
               this.$router.push({
-                path: "/person-center/my-classhour/appointment",
+                path: "/person-center/my-examination/appointment",
                 query: {
                   goodsId: item.goodsId,
-                  gradeId: item.gradeId,
-                },
+                  gradeId: item.gradeId
+                }
               });
             })
-            .catch((err) => {
+            .catch(err => {
               this.$message({
                 type: "warning",
-                message: err.msg,
+                message: err.msg
               });
             });
           break;
         case 20:
           item.orderGoodsId = this.orderGoodsId;
-          this.canJump(item).then((res) => {
+          this.canJump(item).then(res => {
             this.$router.push({
               path: `/my-course-detail/${item.goodsId}`,
               query: {
                 gradeId: item.gradeId,
                 orderGoodsId: item.orderGoodsId,
-                courseId: res.rows[0].courseId || "",
-              },
+                courseId: res.rows[0].courseId || ""
+              }
             });
           });
           break;
@@ -492,13 +492,13 @@ export default {
      * 查询商品重修状态
      */
     courseGoodsRebuildStatus(goodsId, gradeId) {
-      return new Promise((resolve) => {
+      return new Promise(resolve => {
         this.$request
           .courseGoodsRebuildStatus({
             goodsId: goodsId,
-            gradeId: gradeId,
+            gradeId: gradeId
           })
-          .then((res) => {
+          .then(res => {
             resolve(res.data);
           });
       });
@@ -510,8 +510,8 @@ export default {
         query: {
           gradeId: item.gradeId,
           orderGoodsId: item.orderGoodsId,
-          rebuild: 1,
-        },
+          rebuild: 1
+        }
       });
     },
 
@@ -524,14 +524,14 @@ export default {
     isOk() {
       this.$request
         .courseappinformUser({ id: this.listData.id, receiptStatus: 1 })
-        .then((res) => {
+        .then(res => {
           this.getappinformUserlist();
         });
 
       this.showDetailModal = false;
     },
     getMessage() {
-      this.$request.getappinformUserId(this.messageId).then((res) => {
+      this.$request.getappinformUserId(this.messageId).then(res => {
         if (
           res.data.receiptStatus === 1 &&
           (res.data.remindId === 2 ||
@@ -540,7 +540,7 @@ export default {
         ) {
           this.$request
             .getbaseprofiletpgetInfo({ goodsId: res.data.goodsId })
-            .then((k) => {
+            .then(k => {
               if (
                 (k.data.status === 3 && k.data.changeStatus === 2) ||
                 k.data.status === 2 ||
@@ -555,7 +555,7 @@ export default {
         if (!res.data.receiptStatus) {
           this.$request
             .courseappinformUser({ id: res.data.id, receiptStatus: 1 })
-            .then((res) => {});
+            .then(res => {});
         }
         if (res.data.informVo && res.data.informVo.affiche) {
           res.data.informVo.affiche = res.data.informVo.affiche.replace(
@@ -567,7 +567,7 @@ export default {
         console.log(this.listData, "listData");
         if (res.data.goodsId) {
           if (res.data.gradeId) {
-            this.$request.goodsDetail(res.data.goodsId).then((rs) => {
+            this.$request.goodsDetail(res.data.goodsId).then(rs => {
               this.goodsData = rs.data;
               this.showDetailModal = true;
               if (
@@ -587,7 +587,7 @@ export default {
               }
             });
           } else {
-            this.$request.commonGoodsDetail(res.data.goodsId).then((rs) => {
+            this.$request.commonGoodsDetail(res.data.goodsId).then(rs => {
               this.goodsData = rs.data;
               this.showDetailModal = true;
               if (
@@ -615,12 +615,12 @@ export default {
     },
 
     canJump(item) {
-      return new Promise((resolve) => {
+      return new Promise(resolve => {
         this.$request
           .orderInfo({
-            orderGoodsId: item.orderGoodsId,
+            orderGoodsId: item.orderGoodsId
           })
-          .then(async (res) => {
+          .then(async res => {
             let items = res.data;
             let currentTime = this.$tools.timest();
             console.log(currentTime);
@@ -642,7 +642,7 @@ export default {
                   "1.点击【跳转学习网址】按钮",
                   "2.打开学习网址后,选择【个人用户】进行登录",
                   "(1)账号:您个人的身份证号码",
-                  "(2)密码:身份证号码,再加111111",
+                  "(2)密码:身份证号码,再加111111"
                 ];
                 const newDatas = [];
                 const h = this.$createElement;
@@ -655,19 +655,19 @@ export default {
                   closeOnClickModal: false,
                   closeOnPressEscape: false,
                   distinguishCancelAndClose: false,
-                  showClose: false,
+                  showClose: false
                 })
-                  .then((_) => {
+                  .then(_ => {
                     window.open("http://admin.zhujianpeixun.com/", "_blank");
                   })
-                  .catch((_) => {});
+                  .catch(_ => {});
 
                 return;
               } else {
                 this.$message({
                   type: "warning",
                   message:
-                    "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!",
+                    "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!"
                 });
                 return;
               }
@@ -688,7 +688,7 @@ export default {
               ) {
                 this.$message({
                   type: "warning",
-                  message: "不在学习服务期,不能进入学习",
+                  message: "不在学习服务期,不能进入学习"
                 });
                 return;
               }
@@ -700,7 +700,7 @@ export default {
               ) {
                 this.$message({
                   type: "warning",
-                  message: "不在班级有效期,不能进入学习",
+                  message: "不在班级有效期,不能进入学习"
                 });
                 return;
               }
@@ -708,7 +708,7 @@ export default {
               if (items.learningStatus == 2) {
                 this.$message({
                   type: "warning",
-                  message: "开放学习时间待定,不能进入学习",
+                  message: "开放学习时间待定,不能进入学习"
                 });
                 return;
               }
@@ -716,7 +716,7 @@ export default {
               if (items.classStatus == 0) {
                 this.$message({
                   type: "warning",
-                  message: "尚未开班,不能进入学习",
+                  message: "尚未开班,不能进入学习"
                 });
                 return;
               }
@@ -726,7 +726,7 @@ export default {
               ) {
                 this.$message({
                   type: "warning",
-                  message: "不在开放学习时间,不能进入学习",
+                  message: "不在开放学习时间,不能进入学习"
                 });
                 return;
               }
@@ -744,31 +744,55 @@ export default {
             // if (item.educationName == "继续教育") {
             this.$request
               .lockLockStatus({
-                action: "jxjy",
+                action: "jxjy"
               })
-              .then((res) => {
+              .then(res => {
                 //有其他端在操作,不能学习
-                this.$message({
-                  type: "warning",
-                  message: res.msg,
-                });
+                this.$confirm("有其他端在操作,是否将该用户踢下线?", "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+                })
+                  .then(() => {
+                    this.$request.appuseroffline().then(r => {
+                      //可以学习
+                this.$request
+                  .courseCourseList({
+                    pageNum: 1,
+                    pageSize: 1,
+                    goodsId: items.goodsId,
+                    gradeId: items.gradeId
+                  })
+                  .then(res => {
+                    if (res.rows.length) {
+                      resolve(res);
+                    } else {
+                      this.$message({
+                        type: "warning",
+                        message: "课程内暂无可以学习的科目"
+                      });
+                    }
+                  });
+                    });
+                  })
+                  .catch(() => {});
               })
-              .catch((err) => {
+              .catch(err => {
                 //可以学习
                 this.$request
                   .courseCourseList({
                     pageNum: 1,
                     pageSize: 1,
                     goodsId: items.goodsId,
-                    gradeId: items.gradeId,
+                    gradeId: items.gradeId
                   })
-                  .then((res) => {
+                  .then(res => {
                     if (res.rows.length) {
                       resolve(res);
                     } else {
                       this.$message({
                         type: "warning",
-                        message: "课程内暂无可以学习的科目",
+                        message: "课程内暂无可以学习的科目"
                       });
                     }
                   });
@@ -809,8 +833,8 @@ export default {
           moduleId: item.moduleId || 0,
           chapterId: item.chapterId || 0,
           recordingUrl: item.recordingUrl,
-          noteSecond: item.noteSecond,
-        },
+          noteSecond: item.noteSecond
+        }
       });
       // });
     },
@@ -822,12 +846,12 @@ export default {
           current: item.topicNum - 1,
           examId: item.examId,
           moduleId: item.moduleId || 0,
-          chapterId: item.chapterId || 0,
-        },
+          chapterId: item.chapterId || 0
+        }
       });
       console.log(item);
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 11 - 4
src/pages/person-center/play-record/index.vue

@@ -253,10 +253,17 @@ export default {
             })
             .then(res => {
               //有其他端在操作,不能学习
-              this.$message({
-                type: "warning",
-                message: res.msg
-              });
+              this.$confirm("有其他端在操作,是否将该用户踢下线?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+              })
+                .then(() => {
+                  this.$request.appuseroffline().then(r => {
+                    this.goCourse(sectionItem);
+                  });
+                })
+                .catch(() => {});
             })
             .catch(err => {
               //可以学习

+ 89 - 32
src/router/index.js

@@ -570,11 +570,6 @@ const router = new Router({
           component: resolve => require(['@/pages/person-center/my-order/index'], resolve),
           name: '我的订单'
         },
-        {
-          path: 'my-examination',
-          component: resolve => require(['@/pages/person-center/my-examination/index'], resolve),
-          name: '我的考试'
-        },
         {
           path: 'my-mock',
           component: resolve => require(['@/pages/person-center/my-mock/index'], resolve),
@@ -613,9 +608,9 @@ const router = new Router({
           ]
         },
         {
-          path: 'my-classhour',
-          component: resolve => require(['@/pages/person-center/my-classhour/index'], resolve),
-          name: '我的学时',
+          path: 'my-examination',
+          component: resolve => require(['@/pages/person-center/my-examination/index'], resolve),
+          name: '我的考试',
           children: [
             {
               path: '/',
@@ -623,26 +618,42 @@ const router = new Router({
             },
             {
               path: 'index',
-              component: resolve => require(['@/pages/person-center/my-classhour/index/index'], resolve),
-              name: '我的学时',
+              component: resolve => require(['@/pages/person-center/my-examination/index/index'], resolve),
+              name: '我的考试',
             },
             {
               path: 'appointment',
-              component: resolve => require(['@/pages/person-center/my-classhour/appointment/index'], resolve),
+              component: resolve => require(['@/pages/person-center/my-examination/appointment/index'], resolve),
               name: '预约考试',
             },
             {
               path: 'appointment-add',
-              component: resolve => require(['@/pages/person-center/my-classhour/appointment-add/index'], resolve),
+              component: resolve => require(['@/pages/person-center/my-examination/appointment-add/index'], resolve),
               name: '预约考试',
             },
             {
               path: 'appointment-add-kp',
-              component: resolve => require(['@/pages/person-center/my-classhour/appointment-add-kp/index'], resolve),
+              component: resolve => require(['@/pages/person-center/my-examination/appointment-add-kp/index'], resolve),
               name: '预约考试',
             }
           ]
         },
+        {
+          path: 'my-classhour',
+          component: resolve => require(['@/pages/person-center/my-classhour/index'], resolve),
+          name: '我的学时',
+          children: [
+            {
+              path: '/',
+              redirect: 'index',
+            },
+            {
+              path: 'index',
+              component: resolve => require(['@/pages/person-center/my-classhour/index/index'], resolve),
+              name: '我的学时',
+            },
+          ]
+        },
       ]
     }
   ]
@@ -654,8 +665,8 @@ Router.prototype.push = function push(location) {
 }
 const originalReplace = Router.prototype.replace
 
-Router.prototype.replace = function replace(location){
-return originalReplace.call(this , location).catch(err=>err)
+Router.prototype.replace = function replace(location) {
+  return originalReplace.call(this, location).catch(err => err)
 }
 router.beforeEach(async (to, from, next) => {
   console.error("页面进入")
@@ -731,15 +742,36 @@ router.beforeEach(async (to, from, next) => {
             })
             .then((res) => {
               //有其他端在操作,不能学习
-              Message({
-                type: "warning",
-                message: res.msg,
-              });
-
-              if (from.path == '/') {
-                next('/')
-              }
-
+              MessageBox.confirm("有其他端在操作,是否将该用户踢下线?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+              })
+                .then(() => {
+                  request.appuseroffline().then(r => {
+                    //可以学习,开启锁定
+                    canToBank = 1;
+                    request.lockLockAction({
+                      action: 'bank',
+                      uuid: tools.getUuid()
+                    }).then(res => {
+                    })
+                    canToBank = setInterval(() => {
+                      request.lockLockAction({
+                        action: 'bank',
+                        uuid: tools.getUuid()
+                      }).then(res => {
+
+                      })
+                    }, 10000);
+                    next()
+                  });
+                })
+                .catch(() => {
+                  if (from.path == '/') {
+                    next('/')
+                  }
+                });
             }).catch(err => {
               //可以学习,开启锁定
               canToBank = 1;
@@ -804,15 +836,40 @@ router.beforeEach(async (to, from, next) => {
               })
               .then((res) => {
                 //有其他端在操作,不能学习
-                Message({
-                  type: "warning",
-                  message: res.msg,
-                });
+                MessageBox.confirm("有其他端在操作,是否将该用户踢下线?", "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+                })
+                  .then(() => {
+                    request.appuseroffline().then(r => {
+                      //可以学习,开启锁定
+                      canToCourse = 1;
+                      request.lockLockAction({
+                        action: 'jxjy',
+                        uuid: tools.getUuid()
+                      }).then(res => {
+                      })
+                      canToCourse = setInterval(() => {
+                        request.lockLockAction({
+                          action: 'jxjy',
+                          uuid: tools.getUuid()
+                        }).then(res => {
+
+                        })
+                      }, 10000);
+                      console.log("学习")
+                      next()
+                    });
+                  })
+                  .catch(() => {
+                    if (from.path == '/') {
+                      next('/')
+                    }
+                  });
 
-                if (from.path == '/') {
-                  next('/')
-                }
-              }).catch(err => {
+              })
+              .catch(err => {
                 //可以学习,开启锁定
                 canToCourse = 1;
                 request.lockLockAction({

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio