chenxiong 3 yıl önce
ebeveyn
işleme
ade88af9a7

+ 8 - 0
src/apis/common.js

@@ -278,6 +278,14 @@ export default {
 		})
 	},
 
+  commonSystemTime() {
+		return request({
+			url: '/app/common/system/dict/data/sys/time',
+			method: 'get',
+			noToken: true
+		})
+	},
+
   dictList(data) {
 		return request({
 			url: '/app/common/system/dict/data/list',

+ 29 - 1
src/apis/mock.js

@@ -93,7 +93,35 @@ export default {
 			method: 'get',
 		})
 	},
+
+  mockSubscribeInfo(data) {
+		return request({
+			url: '/mock/subscribe/info/'+data,
+			method: 'get',
+		})
+	},
   
+  mockApplyListApplyName(data) {
+		return request({
+			url: '/mock/apply/listApplyName',
+			method: 'get',
+      params:data
+		})
+	},
+  mockRecordGroupList(data) {
+		return request({
+			url: '/mock/record/group_list',
+			method: 'get',
+      params:data
+		})
+	},
   
-  
+  mockRecordList(data) {
+		return request({
+			url: '/mock/record/list',
+			method: 'get',
+      params:data
+		})
+	},
+ 
 }

BIN
src/assets/liveRing.png


+ 1 - 1
src/common/tools.js

@@ -186,7 +186,7 @@ export default {
   },
 
 
-  imageToBase64(url,quality = 0.5) {
+  imageToBase64(url,quality = 0.8) {
     return new Promise(resolve => {
       var image = new Image();
       // 解决跨域 Canvas 污染问题,

+ 1 - 1
src/components/exercisesModal/index.vue

@@ -40,7 +40,7 @@ export default {
     showModal(item) {
       this.$request
         .appBeforeAddress({
-          // goodsId,
+          goodsId: item.goodsId,
           orderGoodsId: item.orderGoodsId,
         })
         .then((res) => {

+ 0 - 1
src/components/header/index.vue

@@ -412,7 +412,6 @@ export default {
     }
 
     .text-list {
-      margin-top: 30px;
       text-align: right;
       font-size: 0;
 

+ 30 - 1
src/pages/course-detail/index.vue

@@ -2237,7 +2237,7 @@ import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
 import GoodsItem from "@/components/goodsItem/index";
 
-import { mapGetters, mapMutations } from "vuex";
+import { mapGetters, mapMutations, mapActions } from "vuex";
 import * as baseUrls from "@/axios.js";
 import pdf from "vue-pdf";
 import print from "print-js";
@@ -2693,6 +2693,7 @@ export default {
   },
   methods: {
     ...mapMutations(["getCartCount"]),
+    ...mapActions(["getUserInfo"]),
     isLast(item) {
       if (this.liveLast) {
         let sectionASame =
@@ -3134,12 +3135,14 @@ export default {
         datas.id = self.id;
         self.$request.editbaseprofileStamp(datas).then((res) => {
           this.uploading = false;
+          this.getUserInfo();
           this.showStampDetailModail = false;
           this.$message.success("提交成功");
         });
       } else {
         self.$request.addbaseprofileStamp(datas).then((res) => {
           this.uploading = false;
+          this.getUserInfo();
           this.showStampDetailModail = false;
           this.$message.success("提交成功");
         });
@@ -3429,6 +3432,7 @@ export default {
                   .then((res) => {
                     this.uploading = false;
                     this.courseCourseList();
+                    this.getUserInfo();
                     this.$message.success("提交成功");
                     this.showInfoDetailModal = false;
                   })
@@ -3463,6 +3467,7 @@ export default {
                   .then((res) => {
                     this.uploading = false;
                     this.courseCourseList();
+                    this.getUserInfo();
                     this.$message.success("提交成功");
                     this.showInfoDetailModal = false;
                   })
@@ -3530,6 +3535,7 @@ export default {
           .then((res) => {
             this.uploading = false;
             this.courseCourseList();
+            this.getUserInfo();
             this.$message.success("提交成功");
             this.showInfoDetailModal = false;
           })
@@ -3564,6 +3570,7 @@ export default {
           .then((res) => {
             this.uploading = false;
             this.courseCourseList();
+            this.getUserInfo();
             this.$message.success("提交成功");
             this.showInfoDetailModal = false;
           })
@@ -4079,6 +4086,24 @@ export default {
                     if (arrays[k].value) {
                       self.fileList3 = [{ url: arrays[k].value }];
                     }
+                  } else if (k === "name") {
+                    self.$set(
+                      self.infoForm,
+                      k,
+                      this.$store.state.userInfo.realname
+                    );
+                  } else if (k === "idcard") {
+                    self.$set(
+                      self.infoForm,
+                      k,
+                      this.$store.state.userInfo.idCard
+                    );
+                  } else if (k === "telphone") {
+                    self.$set(
+                      self.infoForm,
+                      k,
+                      this.$store.state.userInfo.telphone
+                    );
                   } else {
                     self.$set(self.infoForm, k, arrays[k].value);
                   }
@@ -4504,6 +4529,10 @@ export default {
           if (this.goodsData.categoryName) {
             this.apply_post_disabled = true;
           }
+
+          if (this.userInfo.companyName) {
+            this.infoForm.work_unit = this.userInfo.companyName;
+          }
         }
         if (this.goodsData.buyNote) {
           this.tabList = [

+ 1 - 1
src/pages/goods-detail/course-detail.vue

@@ -29,7 +29,7 @@
                   </div>
                   <div class="desc">
                     {{ courseList.length }} 课程
-                    {{ goodsDetail.classHours }}学时
+                    {{ goodsDetail.classHours || "-" }}学时
                   </div>
                   <div class="price">
                     ¥{{ goodsDetail.standPrice | toFixed }}

+ 1 - 1
src/pages/goods-detail/live-detail.vue

@@ -29,7 +29,7 @@
                   </div>
                   <div class="desc">
                     {{ courseList.length }} 课程
-                    {{ goodsDetail.classHours }}学时
+                    {{ goodsDetail.classHours || "-" }}学时
                   </div>
                   <div class="price">
                     ¥{{ goodsDetail.standPrice | toFixed }}

+ 7 - 7
src/pages/live-detail/index.vue

@@ -6487,13 +6487,13 @@ export default {
         });
         return;
       }
-      if (!this.gradeId) {
-        this.$message({
-          message: "暂无班级数据",
-          type: "warning",
-        });
-        return;
-      }
+      // if (!this.gradeId) {
+      //   this.$message({
+      //     message: "暂无班级数据",
+      //     type: "warning",
+      //   });
+      //   return;
+      // }
       var polyvPlayerContext = this.player;
       let noteDate = this.$tools.getZeroTime();
       let noteSecond = polyvPlayerContext.j2s_getCurrentTime();

+ 5 - 3
src/pages/mock-countdown/index.vue

@@ -15,7 +15,7 @@
           </el-breadcrumb>
         </div>
 
-        <div class="title">距离管理开考还有</div>
+        <div class="title">距离{{ mockName }}开考还有</div>
         <div class="countdown">
           <div class="box">{{ getDuring("minutes") }}</div>
           <span class="pin">:</span>
@@ -58,14 +58,16 @@ export default {
       end: 0,
       eachExamId: 0,
       subscribeId: 0,
+      mockName: "",
     };
   },
   computed: {},
   mounted() {
+    this.mockName = this.$route.query.mockName;
     this.subscribeId = this.$route.query.subscribeId;
     this.eachExamId = this.$route.query.eachExamId;
     this.examId = this.$route.query.examId;
-    this.timeLimit = +this.$route.query.timeLimit || 0;
+    this.timeLimit = +this.$route.query.limit || 0;
     this.start = +this.$route.query.start;
     this.end = this.timeLimit * 60 + this.start;
     this.timer = setInterval(() => {
@@ -105,7 +107,7 @@ export default {
     canTest() {},
     examBank() {
       if (this.nowTime > this.start && this.nowTime < this.end) {
-        this.$router.push({
+        this.$router.replace({
           path: "/mock-exam",
           query: {
             examId: this.examId,

+ 28 - 71
src/pages/mock-exam/index.vue

@@ -119,21 +119,7 @@
                           ></div>
                         </div>
                       </div>
-                      <div class="question__btns">
-                        <div
-                          class="collect"
-                          @click="
-                            collect(collectList[questionIndex], questionIndex)
-                          "
-                        >
-                          <template v-if="!collectList[questionIndex]"
-                            ><i class="el-icon-star-off"></i>收藏本题</template
-                          >
-                          <template v-if="collectList[questionIndex]"
-                            ><i class="el-icon-star-on"></i>已收藏</template
-                          >
-                        </div>
-                      </div>
+                      <div class="question__btns"></div>
                     </div>
                     <div
                       class="question"
@@ -225,19 +211,6 @@
                         >
                           确认答案
                         </div>
-                        <div
-                          class="collect"
-                          @click="
-                            collect(collectList[questionIndex], questionIndex)
-                          "
-                        >
-                          <template v-if="!collectList[questionIndex]"
-                            ><i class="el-icon-star-off"></i>收藏本题</template
-                          >
-                          <template v-if="collectList[questionIndex]"
-                            ><i class="el-icon-star-on"></i>已收藏</template
-                          >
-                        </div>
                       </div>
                     </div>
                     <div
@@ -313,21 +286,7 @@
                           ></div>
                         </div>
                       </div>
-                      <div class="question__btns">
-                        <div
-                          class="collect"
-                          @click="
-                            collect(collectList[questionIndex], questionIndex)
-                          "
-                        >
-                          <template v-if="!collectList[questionIndex]"
-                            ><i class="el-icon-star-off"></i>收藏本题</template
-                          >
-                          <template v-if="collectList[questionIndex]"
-                            ><i class="el-icon-star-on"></i>已收藏</template
-                          >
-                        </div>
-                      </div>
+                      <div class="question__btns"></div>
                     </div>
                     <div
                       class="question"
@@ -810,21 +769,7 @@
                           </el-tab-pane>
                         </el-tabs>
                       </div>
-                      <div class="question__btns">
-                        <div
-                          class="collect"
-                          @click="
-                            collect(collectList[questionIndex], questionIndex)
-                          "
-                        >
-                          <template v-if="!collectList[questionIndex]"
-                            ><i class="el-icon-star-off"></i>收藏本题</template
-                          >
-                          <template v-if="collectList[questionIndex]"
-                            ><i class="el-icon-star-on"></i>已收藏</template
-                          >
-                        </div>
-                      </div>
+                      <div class="question__btns"></div>
                     </div>
                     <div
                       class="question"
@@ -917,19 +862,6 @@
                         >
                           确认答案
                         </div>
-                        <div
-                          class="collect"
-                          @click="
-                            collect(collectList[questionIndex], questionIndex)
-                          "
-                        >
-                          <template v-if="!collectList[questionIndex]"
-                            ><i class="el-icon-star-off"></i>收藏本题</template
-                          >
-                          <template v-if="collectList[questionIndex]"
-                            ><i class="el-icon-star-on"></i>已收藏</template
-                          >
-                        </div>
                       </div>
                     </div>
                   </template>
@@ -1086,11 +1018,14 @@ export default {
       collectList: [],
       isSubmit: false,
       postTimer: null,
+      subscribeId: 0,
+      isAutoSubmit: false,
     };
   },
   async mounted() {
     this.examId = this.$route.query.examId;
     this.eachExamId = this.$route.query.eachExamId;
+    this.subscribeId = this.$route.query.subscribeId || "";
 
     await this.bankExam();
     this.goodsQuestionList();
@@ -1199,6 +1134,14 @@ export default {
   },
   methods: {
     ...mapMutations(["setExamResult"]),
+    mockSubscribeEdit() {
+      this.$request
+        .mockSubscribeEdit({
+          subscribeId: this.subscribeId,
+          handStatus: this.isAutoSubmit ? 2 : 1,
+        })
+        .then((res) => {});
+    },
     toFixed(num) {
       if (num) {
         let str = String(num).indexOf(".");
@@ -1287,6 +1230,7 @@ export default {
                   distinguishCancelAndClose: false,
                   showClose: false,
                 });
+                this.isAutoSubmit = true;
 
                 setTimeout(() => {
                   try {
@@ -1564,6 +1508,10 @@ export default {
         }
       });
 
+      if (this.subscribeId) {
+        this.mockSubscribeEdit();
+      }
+
       this.$request
         .mockRecordEdit({
           eachExamId: this.eachExamId,
@@ -2244,6 +2192,10 @@ export default {
         reportStatus = 0;
       }
 
+      if (this.subscribeId) {
+        this.mockSubscribeEdit();
+      }
+
       // setTimeout(() => {
       //   let result = {
       //     chapterId: this.chapterId,
@@ -2289,6 +2241,7 @@ export default {
             this.$router.replace({
               path: "/mock-report",
               query: {
+                subscribeId: this.subscribeId,
                 eachExamId: this.eachExamId,
                 examId: this.examId,
                 recordId: this.recordId,
@@ -2459,6 +2412,10 @@ export default {
         reportStatus = 0;
       }
 
+      if (this.subscribeId) {
+        this.mockSubscribeEdit();
+      }
+
       console.log(333);
       //交卷
       this.$request

+ 196 - 3
src/pages/mock-report/index.vue

@@ -2,6 +2,59 @@
   <div class="bank-report">
     <Header></Header>
     <section class="section">
+      <template
+        v-if="
+          subscribeInfo.liveStartTime <= sysTime &&
+          subscribeInfo.liveEndTime >= sysTime
+        "
+      >
+        <div class="container section__top">
+          <div class="text">
+            模考讲解直播将在{{
+              $tools.timestampToTime(subscribeInfo.liveStartTime, false, true)
+            }}开始,开启模考讲解直播提醒,不错过每一个考点
+          </div>
+
+          <el-button type="primary" class="btn" round @click="goLive()"
+            >立即前往查看直播</el-button
+          >
+        </div>
+      </template>
+      <template v-else>
+        <div
+          class="container section__top"
+          v-if="subscribeInfo.liveSubscribe == 0"
+        >
+          <div class="text">
+            模考讲解直播将在{{
+              $tools.timestampToTime(subscribeInfo.liveStartTime, false, true)
+            }}开始,开启模考讲解直播提醒,不错过每一个考点
+          </div>
+
+          <el-button
+            type="primary"
+            class="btn"
+            round
+            @click="showLiveModal = true"
+            >开启模考讲解直播提醒</el-button
+          >
+        </div>
+
+        <div
+          class="container section__top"
+          v-if="subscribeInfo.liveSubscribe == 1"
+        >
+          <div class="text">
+            模考讲解直播将在{{
+              $tools.timestampToTime(subscribeInfo.liveStartTime, false, true)
+            }}开始
+          </div>
+
+          <el-button type="primary" disabled class="btn" round
+            >直播提醒已开启</el-button
+          >
+        </div>
+      </template>
       <div class="container">
         <div
           class="section__header section__header--warm"
@@ -146,6 +199,40 @@
         </div>
       </div>
     </section>
+
+    <el-dialog
+      width="462px"
+      height="453px"
+      class="info"
+      :visible.sync="showLiveModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+    >
+      <div class="info__content">
+        <img src="@/assets/liveRing.png" alt="" />
+        <div class="main">
+          <div class="title">开启模考讲解直播提醒</div>
+          <div class="desc">
+            此科目模考分析将在{{
+              $tools.timestampToTime(subscribeInfo.liveStartTime, false, true)
+            }}进行直播讲解
+            <br />
+            开启直播提醒,不错过名师讲解
+          </div>
+
+          <div class="btns">
+            <el-button class="btn" @click="showLiveModal = false"
+              >暂不开启</el-button
+            >
+            <el-button type="primary" class="btn" @click="openRemind"
+              >开启提醒</el-button
+            >
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+
     <ToolBar></ToolBar>
     <Footer></Footer>
   </div>
@@ -155,7 +242,7 @@
 import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
-import { mapGetters } from "vuex";
+import { mapGetters, mapActions } from "vuex";
 export default {
   name: "BankExplain",
   components: {
@@ -165,6 +252,8 @@ export default {
   },
   data() {
     return {
+      mockName: "",
+      showLiveModal: false,
       wrongRecordWrongNum: 0,
       nextExamId: "",
       examData: {},
@@ -172,21 +261,53 @@ export default {
       examId: 0,
       recordId: 0,
       eachExamId: 0,
+      subscribeId: 0,
+      subscribeInfo: {},
     };
   },
   computed: {
-    ...mapGetters(["examResult"]),
+    ...mapGetters(["examResult", "sysTime"]),
   },
   async mounted() {
     this.eachExamId = this.$route.query.eachExamId;
     this.examId = this.$route.query.examId;
     this.recordId = this.$route.query.recordId;
-
+    this.subscribeId = this.$route.query.subscribeId;
+    this.setSystemTime();
+    this.mockSubscribeInfo();
     this.mockWrongRecordWrongNum();
     await this.bankExam();
     await this.mockReport();
   },
   methods: {
+    ...mapActions(["setSystemTime"]),
+    goLive() {
+      this.$router.push({
+        path: "/living-room/" + this.subscribeInfo.liveUrl,
+      });
+    },
+    openRemind() {
+      this.showLiveModal = false;
+      this.$request
+        .mockSubscribeEdit({
+          subscribeId: this.subscribeId,
+          liveSubscribe: 1,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.mockSubscribeInfo();
+            this.$message.success("开启成功");
+          }
+        });
+    },
+    mockSubscribeInfo() {
+      if (!this.subscribeId) {
+        return;
+      }
+      this.$request.mockSubscribeInfo(this.subscribeId).then((res) => {
+        this.subscribeInfo = res.data;
+      });
+    },
     back() {
       this.$router.back(-1);
     },
@@ -323,6 +444,32 @@ export default {
 <style scoped lang="scss">
 .bank-report {
   .section {
+    &__top {
+      height: 72px;
+      background: #f7f9fc;
+      display: flex;
+      align-items: center;
+      margin-top: 20px;
+      padding: 0 20px;
+      justify-content: space-between;
+
+      .text {
+        font-size: 16px;
+        font-family: Microsoft YaHei;
+        font-weight: 400;
+        color: #333333;
+      }
+
+      .btn {
+        width: 200px;
+        height: 32px;
+        font-size: 16px;
+        border-radius: 16px;
+        padding: 0;
+        line-height: 32px;
+        text-align: center;
+      }
+    }
     &__header {
       height: 120px;
       border-radius: 0px;
@@ -579,5 +726,51 @@ export default {
       }
     }
   }
+
+  .info {
+    /deep/ .el-dialog__header {
+      display: none;
+    }
+    /deep/ .el-dialog__body {
+      padding: 0;
+      overflow: unset;
+    }
+
+    &__content {
+      .main {
+        padding: 24px;
+
+        .title {
+          text-align: center;
+          font-size: 16px;
+          font-family: Microsoft YaHei;
+          font-weight: bold;
+          color: #333333;
+        }
+
+        .desc {
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: 400;
+          color: #666666;
+          line-height: 24px;
+        }
+
+        .btns {
+          margin-top: 50px;
+          text-align: center;
+
+          .btn {
+            display: inline-block;
+            width: 160px;
+            height: 40px;
+            padding: 0;
+            border-radius: 8px;
+            margin: 0 8px;
+          }
+        }
+      }
+    }
+  }
 }
 </style>

+ 9 - 0
src/pages/person-center/free-bank/index/index.vue

@@ -155,6 +155,15 @@ export default {
       });
     },
     goStudy(item) {
+      let sysTime = this.$tools.timest();
+      if (
+        item.serviceStartTime &&
+        item.serviceEndTime &&
+        (sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime)
+      ) {
+        this.$message.warning("不在学习服务期,不能进入学习");
+        return;
+      }
       this.$router.push({
         path: "/person-center/free-bank/bank-detail/" + item.goodsId,
         query: {

+ 3 - 0
src/pages/person-center/index.vue

@@ -81,6 +81,9 @@
                 <router-link to="/person-center/my-mock">
                   <div class="item">我的模考</div>
                 </router-link>
+                <router-link to="/person-center/mock-record">
+                  <div class="item">模考记录</div>
+                </router-link>
                 <router-link to="/person-center/my-message">
                   <div class="item">我的消息</div>
                 </router-link>

+ 422 - 0
src/pages/person-center/mock-record/index.vue

@@ -0,0 +1,422 @@
+<template>
+  <div class="bank-record">
+    <div class="bank-record__header">
+      <div class="title">模考记录</div>
+      <!-- <div class="content">
+        <el-select
+          clearable
+          @change="remockRecordGroupList"
+          v-model="param.goodsId"
+          placeholder="请选择"
+        >
+          <el-option
+            clearable
+            v-for="item in list"
+            :key="item.goodsId"
+            :label="item.goodsName"
+            :value="item.goodsId"
+          >
+          </el-option>
+        </el-select>
+        <el-select
+          @change="remockRecordGroupList"
+          v-model="param.paperId"
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="item in list1"
+            :key="item.paperId"
+            :label="item.paperName"
+            :value="item.paperId"
+          >
+          </el-option>
+        </el-select>
+      </div> -->
+    </div>
+
+    <div class="bank-record__body">
+      <div class="bank-item" v-for="(record, index) in recordList" :key="index">
+        <div class="bank-item__header">
+          <div class="note" v-if="record.paperName">{{ record.paperName }}</div>
+          {{ record.examName }}
+        </div>
+        <div class="bank-item__body">
+          <div class="list">
+            <div class="exam-item">
+              <div class="exam-item__body">
+                <div class="text">
+                  <span class="title">{{
+                    $tools.timestampToTime(record.updateTime, false)
+                  }}</span>
+                  <span class="desc"
+                    >总{{ record.totalQuestionNum }}题/对{{
+                      record.rightQuestionNum
+                    }}题</span
+                  >
+                </div>
+                <div class="btns-wrap">
+                  <div class="btns">
+                    <div class="btn-line">
+                      <div class="btn-line__in" @click="doRepeat(record)">
+                        <div>重新做题</div>
+                      </div>
+                      <div
+                        class="btn-line__in"
+                        @click="
+                          go('/mock-exam-all-explain/' + record.recordId, {
+                            examId: record.examId,
+                          })
+                        "
+                      >
+                        <div>解析</div>
+                      </div>
+
+                      <div
+                        class="btn-line__in"
+                        @click="
+                          go('/mock-report', {
+                            subscribeId: record.subscribeId,
+                            eachExamId: record.eachExamId,
+                            examId: record.examId,
+                            recordId: record.recordId,
+                          })
+                        "
+                      >
+                        <div>做题报告</div>
+                      </div>
+                      <div
+                        class="btn-line__in"
+                        @click="
+                          go(
+                            '/person-center/mock-record-list/' + record.goodsId,
+                            {
+                              examId: record.examId,
+                              recordId: record.recordId,
+                              eachExamId: record.eachExamId,
+                            }
+                          )
+                        "
+                      >
+                        <div>更多记录</div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="bank-record__footer">
+      <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>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "BankRecord",
+  data() {
+    return {
+      list1: [],
+      list: [],
+      param: {
+        pageNum: 1,
+        pageSize: 10,
+        goodsId: "",
+        paperId: "",
+      },
+      recordList: [],
+      total: 0,
+    };
+  },
+  mounted() {
+    // this.listGoodsUserQuestion();
+    // this.examaperList();
+    this.mockRecordGroupList();
+  },
+  methods: {
+    remockRecordGroupList() {
+      this.param.pageNum = 1;
+      this.mockRecordGroupList();
+    },
+    examaperList() {
+      this.$request.examaperList().then((res) => {
+        this.list1 = res.rows;
+        this.list1.unshift({
+          paperId: "",
+          paperName: "全部试卷类型",
+        });
+      });
+    },
+
+    listGoodsUserQuestion() {
+      this.$request.listGoodsUserQuestion().then((res) => {
+        this.list = res.rows;
+        this.list.unshift({
+          goodsId: "",
+          goodsName: "全部题库记录",
+        });
+      });
+    },
+    go(path, query) {
+      this.$router.push({
+        path,
+        query,
+      });
+    },
+    currentChange(e) {
+      this.param.pageNum = e;
+      this.mockRecordGroupList();
+    },
+    mockRecordGroupList() {
+      this.$request.mockRecordGroupList(this.param).then((res) => {
+        this.recordList = res.rows;
+        this.total = res.total;
+      });
+    },
+
+    async doRepeat(section) {
+      this.$router.push({
+        path: "/mock-exam",
+        query: {
+          examId: section.examId,
+          eachExamId: section.eachExamId,
+          subscribeId: section.subscribeId,
+        },
+      });
+
+      return;
+      let count = await this.examRecordCount(section.examId);
+      let answerNum = await this.getExamDetail(section.examId);
+      //超过答题次数
+      if (answerNum > 0 && count >= answerNum) {
+        this.$message({
+          type: "warning",
+          message: "该试卷只能答题" + answerNum + "次!",
+        });
+        return;
+      }
+
+      this.$confirm(`是否清空答案重做?`, "提示", {
+        confirmButtonText: "重做",
+        cancelButtonText: "查看上次",
+        closeOnClickModal: false,
+        closeOnPressEscape: false,
+        distinguishCancelAndClose: false,
+        showClose: false,
+      })
+        .then((_) => {
+          this.$router.push({
+            path: "/bank-exam/" + section.goodsId,
+            query: {
+              orderGoodsId: section.orderGoodsId,
+              examId: section.examId,
+              moduleId: section.moduleExamId || 0,
+              chapterId: section.chapterExamId || 0,
+            },
+          });
+        })
+        .catch((_) => {
+          this.$router.push({
+            path: "/bank-exam-all-explain/" + section.recordId,
+            query: {
+              examId: section.examId,
+              moduleId: section.moduleExamId || 0,
+              chapterId: section.chapterExamId || 0,
+              goodsId: section.goodsId,
+              orderGoodsId: section.orderGoodsId,
+            },
+          });
+        });
+    },
+
+    /**
+     * 查询试卷历史做题次数
+     */
+    examRecordCount(examId) {
+      return new Promise((resolve) => {
+        this.$request
+          .examRecordCount({
+            examId: examId,
+            goodsId: this.id,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    /**
+     * @param {Object} exam_id
+     * 获取试卷可以做的次数
+     */
+    getExamDetail(exam_id) {
+      return new Promise((resolve) => {
+        this.$request.getExamDetail(exam_id).then((res) => {
+          resolve(res.data.answerNum);
+        });
+      });
+    },
+  },
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped lang="scss">
+.bank-record {
+  &__header {
+    .title {
+      height: 56px;
+      line-height: 56px;
+    }
+
+    .content {
+      margin: 10px 0;
+    }
+    border-bottom: 1px solid #eee;
+  }
+  &__body {
+    .bank-item {
+      margin-top: 24px;
+
+      &__header {
+        height: 32px;
+        line-height: 32px;
+        .note {
+          display: inline-block;
+          margin-right: 15px;
+          padding: 0 5px;
+          height: 32px;
+          line-height: 32px;
+          background: #3f8dfd;
+          text-align: center;
+          color: #fff;
+          font-size: 16px;
+          border-radius: 8px 0 8px 0;
+        }
+      }
+
+      &__body {
+        .list {
+          .exam-item {
+            height: 65px;
+            background: #fafbfc;
+            border-radius: 8px;
+            overflow: hidden;
+            line-height: 65px;
+            border-top: 1px solid #eee;
+            position: relative;
+
+            &__body {
+              .text {
+                .title {
+                  margin-left: 24px;
+                  font-size: 16px;
+                  font-family: Microsoft YaHei;
+                  font-weight: 400;
+                  color: #333333;
+                }
+
+                .desc {
+                  margin-left: 24px;
+                  color: #666;
+                  font-size: 16px;
+                }
+              }
+
+              .btns-wrap {
+                display: table;
+                position: absolute;
+                right: 0;
+                top: 0;
+                height: 100%;
+                margin-right: 20px;
+
+                .btns {
+                  display: table-cell;
+                  vertical-align: middle;
+                  text-align: center;
+
+                  .btn {
+                    cursor: pointer;
+                    width: 122px;
+                    height: 32px;
+                    padding: 0;
+                    border-radius: 16px;
+                    display: inline-block;
+                    text-align: center;
+                    line-height: 32px;
+                    vertical-align: middle;
+
+                    /deep/ span {
+                      font-size: 16px;
+                    }
+                  }
+
+                  .btn-line {
+                    margin: 0 10px;
+                    overflow: hidden;
+                    vertical-align: middle;
+                    display: inline-block;
+                    background: #ffffff;
+                    border: 1px solid #3f8dfd;
+                    border-radius: 30px;
+                    font-size: 0;
+                    line-height: 0;
+
+                    &__in {
+                      cursor: pointer;
+                      display: inline-block;
+                      padding: 7px 0;
+                      color: #3f8dfd;
+
+                      > div {
+                        text-align: center;
+                        font-size: 16px;
+                        line-height: 16px;
+                        width: 96px;
+                        height: 16px;
+                        border-right: 1px solid #3f8dfd;
+                      }
+
+                      &:nth-last-of-type(1) {
+                        > div {
+                          border: 0;
+                        }
+                      }
+
+                      &:hover {
+                        background: #3f8dfd;
+                        color: #fff;
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  &__footer {
+    .pagination {
+      padding: 30px 0;
+      text-align: center;
+    }
+  }
+}
+</style>

+ 358 - 0
src/pages/person-center/mock-record/record-list/index.vue

@@ -0,0 +1,358 @@
+<template>
+  <div class="bank-record">
+    <div class="bank-record__header">做题记录</div>
+    <div class="bank-record__body">
+      <div class="bank-item" v-for="(record, index) in recordList" :key="index">
+        <div class="bank-item__header">
+          <div class="note" v-if="record.paperName">{{ record.paperName }}</div>
+          {{ record.examName }}
+        </div>
+        <div class="bank-item__body">
+          <div class="list">
+            <div class="exam-item">
+              <div class="exam-item__body">
+                <div class="text">
+                  <span class="title">{{
+                    $tools.timestampToTime(record.updateTime, false)
+                  }}</span>
+                  <span class="desc"
+                    >总{{ record.totalQuestionNum }}题/对{{
+                      record.rightQuestionNum
+                    }}题</span
+                  >
+                </div>
+                <div class="btns-wrap">
+                  <div class="btns">
+                    <el-button
+                      type="primary"
+                      class="btn"
+                      @click="
+                        go('/bank-exam-continue/' + record.goodsId, {
+                          recordId: record.recordId,
+                          examId: record.examId,
+                          chapterId: record.chapterExamId,
+                          moduleId: record.moduleExamId,
+                          orderGoodsId: record.orderGoodsId,
+                        })
+                      "
+                      v-if="record.status == 0 && record.historyExamJson"
+                      >继续答题</el-button
+                    >
+
+                    <div class="btn-line">
+                      <div class="btn-line__in" @click="doRepeat(record)">
+                        <div>重新做题</div>
+                      </div>
+                      <div
+                        class="btn-line__in"
+                        @click="
+                          go('/mock-exam-all-explain/' + record.recordId, {
+                            examId: record.examId,
+                          })
+                        "
+                      >
+                        <div>解析</div>
+                      </div>
+                      <div
+                        class="btn-line__in"
+                        @click="
+                          go('/mock-report', {
+                            subscribeId: record.subscribeId,
+                            eachExamId: record.eachExamId,
+                            examId: record.examId,
+                            recordId: record.recordId,
+                          })
+                        "
+                      >
+                        <div>做题报告</div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="bank-record__footer">
+      <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>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "BankRecord",
+  data() {
+    return {
+      param: {
+        pageNum: 1,
+        pageSize: 10,
+        eachExamId: 0,
+      },
+      recordList: [],
+      total: 0,
+    };
+  },
+  mounted() {
+    this.param.eachExamId = this.$route.query.eachExamId;
+    this.mockRecordList();
+  },
+  methods: {
+    currentChange(e) {
+      this.param.pageNum = e;
+      this.mockRecordList();
+    },
+    go(path, query) {
+      console.log(path);
+      console.log(query);
+      this.$router.push({
+        path,
+        query,
+      });
+    },
+    mockRecordList() {
+      this.$request.mockRecordList(this.param).then((res) => {
+        this.recordList = res.rows;
+        this.total = res.total;
+      });
+    },
+
+    async doRepeat(section) {
+      this.$router.push({
+        path: "/mock-exam",
+        query: {
+          examId: section.examId,
+          eachExamId: section.eachExamId,
+          subscribeId: section.subscribeId,
+        },
+      });
+
+      return;
+      let count = await this.examRecordCount(section.examId);
+      let answerNum = await this.getExamDetail(section.examId);
+      //超过答题次数
+      if (answerNum > 0 && count >= answerNum) {
+        this.$message({
+          type: "warning",
+          message: "该试卷只能答题" + answerNum + "次!",
+        });
+        return;
+      }
+
+      this.$confirm(`是否清空答案重做?`, "提示", {
+        confirmButtonText: "重做",
+        cancelButtonText: "查看上次",
+        closeOnClickModal: false,
+        closeOnPressEscape: false,
+        distinguishCancelAndClose: false,
+        showClose: false,
+      })
+        .then((_) => {
+          this.$router.push({
+            path: "/bank-exam/" + section.goodsId,
+            query: {
+              orderGoodsId: section.orderGoodsId,
+              examId: section.examId,
+              moduleId: section.moduleExamId || 0,
+              chapterId: section.chapterExamId || 0,
+            },
+          });
+        })
+        .catch((_) => {
+          this.$router.push({
+            path: "/bank-exam-all-explain/" + section.recordId,
+            query: {
+              examId: section.examId,
+              moduleId: section.moduleExamId || 0,
+              chapterId: section.chapterExamId || 0,
+              goodsId: section.goodsId,
+              orderGoodsId: section.orderGoodsId,
+            },
+          });
+        });
+    },
+
+    /**
+     * 查询试卷历史做题次数
+     */
+    examRecordCount(examId) {
+      return new Promise((resolve) => {
+        this.$request
+          .examRecordCount({
+            examId: examId,
+            goodsId: this.id,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    /**
+     * @param {Object} exam_id
+     * 获取试卷可以做的次数
+     */
+    getExamDetail(exam_id) {
+      return new Promise((resolve) => {
+        this.$request.getExamDetail(exam_id).then((res) => {
+          resolve(res.data.answerNum);
+        });
+      });
+    },
+  },
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped lang="scss">
+.bank-record {
+  &__header {
+    height: 56px;
+    line-height: 56px;
+    border-bottom: 1px solid #eee;
+  }
+  &__body {
+    .bank-item {
+      margin-top: 24px;
+
+      &__header {
+        height: 32px;
+        line-height: 32px;
+        .note {
+          display: inline-block;
+          margin-right: 15px;
+          padding: 0 5px;
+          height: 32px;
+          line-height: 32px;
+          background: #3f8dfd;
+          text-align: center;
+          color: #fff;
+          font-size: 16px;
+          border-radius: 8px 0 8px 0;
+        }
+      }
+
+      &__body {
+        .list {
+          .exam-item {
+            height: 65px;
+            background: #fafbfc;
+            border-radius: 8px;
+            overflow: hidden;
+            line-height: 65px;
+            border-top: 1px solid #eee;
+            position: relative;
+
+            &__body {
+              .text {
+                .title {
+                  margin-left: 24px;
+                  font-size: 16px;
+                  font-family: Microsoft YaHei;
+                  font-weight: 400;
+                  color: #333333;
+                }
+
+                .desc {
+                  margin-left: 24px;
+                  color: #666;
+                  font-size: 16px;
+                }
+              }
+
+              .btns-wrap {
+                display: table;
+                position: absolute;
+                right: 0;
+                top: 0;
+                height: 100%;
+                margin-right: 20px;
+
+                .btns {
+                  display: table-cell;
+                  vertical-align: middle;
+                  text-align: center;
+
+                  .btn {
+                    cursor: pointer;
+                    width: 122px;
+                    height: 32px;
+                    padding: 0;
+                    border-radius: 16px;
+                    display: inline-block;
+                    text-align: center;
+                    line-height: 32px;
+                    vertical-align: middle;
+
+                    /deep/ span {
+                      font-size: 16px;
+                    }
+                  }
+
+                  .btn-line {
+                    margin: 0 10px;
+                    overflow: hidden;
+                    vertical-align: middle;
+                    display: inline-block;
+                    background: #ffffff;
+                    border: 1px solid #3f8dfd;
+                    border-radius: 30px;
+                    font-size: 0;
+                    line-height: 0;
+
+                    &__in {
+                      cursor: pointer;
+                      display: inline-block;
+                      padding: 7px 0;
+                      color: #3f8dfd;
+
+                      > div {
+                        text-align: center;
+                        font-size: 16px;
+                        line-height: 16px;
+                        width: 96px;
+                        height: 16px;
+                        border-right: 1px solid #3f8dfd;
+                      }
+
+                      &:nth-last-of-type(1) {
+                        > div {
+                          border: 0;
+                        }
+                      }
+
+                      &:hover {
+                        background: #3f8dfd;
+                        color: #fff;
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  &__footer {
+    .pagination {
+      padding: 30px 0;
+      text-align: center;
+    }
+  }
+}
+</style>

+ 9 - 0
src/pages/person-center/my-bank/index/index.vue

@@ -164,6 +164,15 @@ export default {
       });
     },
     goStudy(item) {
+      let sysTime = this.$tools.timest();
+      if (
+        item.serviceStartTime &&
+        item.serviceEndTime &&
+        (sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime)
+      ) {
+        this.$message.warning("不在学习服务期,不能进入学习");
+        return;
+      }
       this.$router.push({
         path: "/person-center/my-bank/bank-detail/" + item.goodsId,
         query: {

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

@@ -51,7 +51,7 @@
                 listData.applyStatus &&
                 listData.applyStatus.indexOf(item.name) !== -1
               "
-              >非补考学员</el-radio
+              >{{ item.label }}</el-radio
             >
           </el-form-item>
         </div>

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

@@ -74,13 +74,12 @@
                 </div>
                 <div class="btns-wrap">
                   <div class="btns" v-if="item.periodStatus !== 2">
-                    <div
+                    <el-button
+                      type="primary"
                       class="btn"
                       v-if="
                         item.periodStatus === -1 &&
                         !(
-                          (item.interfacePushId > 0 &&
-                            item.officialStatus != 1) ||
                           sysTime <= item.serviceStartTime ||
                           sysTime >= item.serviceEndTime ||
                           (item.classStartTime &&
@@ -95,21 +94,59 @@
                       @click="goCourseDetail(item)"
                     >
                       课程学习
-                    </div>
-                    <div
+                    </el-button>
+                    <el-button
+                      type="primary"
                       class="btn"
-                      v-if="item.periodStatus === 1 && item.applyStatus === 1"
+                      v-if="
+                        item.periodStatus === 1 &&
+                        item.applyStatus === 1 &&
+                        !(
+                          sysTime <= item.serviceStartTime ||
+                          sysTime >= item.serviceEndTime ||
+                          (item.classStartTime &&
+                            sysTime <= item.classStartTime) ||
+                          (item.classEndTime && sysTime >= item.classEndTime) ||
+                          item.learningStatus == 2 ||
+                          item.classStatus == 0 ||
+                          (item.learningStatus == 3 &&
+                            sysTime < item.learningTimeStart)
+                        )
+                      "
                       @click="appointment(item)"
                     >
                       预约考试
-                    </div>
-                    <div
+                    </el-button>
+                    <el-button
+                      type="primary"
+                      class="btn"
+                      v-if="
+                        item.periodStatus === 1 &&
+                        item.beforeStatus === 1 &&
+                        !(
+                          sysTime <= item.serviceStartTime ||
+                          sysTime >= item.serviceEndTime ||
+                          (item.classStartTime &&
+                            sysTime <= item.classStartTime) ||
+                          (item.classEndTime && sysTime >= item.classEndTime) ||
+                          item.learningStatus == 2 ||
+                          item.classStatus == 0 ||
+                          (item.learningStatus == 3 &&
+                            sysTime < item.learningTimeStart)
+                        )
+                      "
+                      @click="appBeforeAddress(item)"
+                    >
+                      进入刷题
+                    </el-button>
+                    <el-button
+                      type="primary"
                       class="btn"
                       v-if="item.periodStatus === 0 && item.rebuildStatus === 0"
                       @click="getcourseperiodcheat(item)"
                     >
                       查看详情
-                    </div>
+                    </el-button>
                     <div
                       class="btn"
                       v-if="item.periodStatus === 0 && item.rebuildStatus === 1"
@@ -177,11 +214,79 @@
       </template>
     </div>
 
+    <el-dialog
+      title="预约考试"
+      :visible.sync="appointModal"
+      width="600px"
+      class="appoint-modal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <div class="appoint-modal__content">
+        <el-radio
+          v-for="(appointChild, appointIndex) in appointItem.applyList"
+          v-model="applyId"
+          :key="appointIndex"
+          :label="appointChild.applyId"
+          >{{ appointChild.applyName }}</el-radio
+        >
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="appointModal = false">取 消</el-button>
+        <el-button type="primary" @click="confirmAppoint">立即预约</el-button>
+      </span>
+    </el-dialog>
+
+    <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>
 
+    <ExercisesModal ref="exercisesModal"></ExercisesModal>
+
     <el-image-viewer
       v-if="showViewer"
       :on-close="closeViewer"
@@ -193,19 +298,34 @@
 <script>
 import ElImageViewer from "element-ui/packages/image/src/image-viewer";
 import RebuildModal from "@/components/rebuildModal";
+import ExercisesModal from "@/components/exercisesModal";
+import { mapGetters, mapActions } from "vuex";
 export default {
   name: "MyClasshour",
   components: {
     RebuildModal,
     ElImageViewer,
+    ExercisesModal,
+  },
+  computed: {
+    ...mapGetters(["sysTime", "userInfo"]),
   },
   data() {
     return {
+      appointItem: {},
+      applyId: "",
+      appointModal: false,
       copyUrl: "http://gdzczx.gdcic.net/",
       showViewer: false,
       rebuildShow: false,
       showDetailModal: false,
+      confirmChecked: false,
+      confirmTimer: null,
+      confirmLoading: false,
+      confirmCount: 10,
+      showConfirm: false,
       activeName: "1",
+      activeItem: {},
       listData: [],
       listData1: [],
       rebuildItems: [],
@@ -216,18 +336,36 @@ export default {
       },
       url: "",
       total: 0,
-      sysTime: 0,
     };
   },
   mounted() {
-    this.sysTime = +this.$tools.timest();
+    this.setSystemTime();
     this.getcourseperiodlistGoods();
   },
   methods: {
+    ...mapActions(["setSystemTime"]),
+    appBeforeAddress(item) {
+      console.log(this.$refs.exercisesModal);
+      this.$refs.exercisesModal.showModal(item);
+    },
     closeViewer() {
       this.showViewer = false;
     },
-    goCourseDetail(item) {
+    async goCourseDetail(item) {
+      this.activeItem = item;
+      var confirmDetail = true;
+      if (item.educationName == "继续教育") {
+        if (
+          item.officialName &&
+          item.businessName == "二级" &&
+          item.projectName == "建造师"
+        ) {
+          confirmDetail = await this.userConfirmInfoDetail(item);
+        }
+      }
+      if (!confirmDetail) {
+        return;
+      }
       this.$router.push({
         path: `/my-course-detail/${item.goodsId}`,
         query: {
@@ -236,6 +374,90 @@ export default {
         },
       });
     },
+
+    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.activeItem.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;
+        });
+    },
+
+    userConfirmInfoDetail(item) {
+      return new Promise((resolve) => {
+        this.$request
+          .userConfirmInfoDetail({
+            orderGoodsId: this.activeItem.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);
+              }
+            }
+          });
+      });
+    },
+
     tabChange(e) {
       console.log(e.name);
       if (this.activeName == e.name) {
@@ -261,9 +483,43 @@ export default {
       }
     },
     appointment(item) {
+      this.applyId = "";
+      this.appointItem = item;
+      this.appointModal = true;
+      // var data = {
+      //   goodsId: item.goodsId,
+      //   gradeId: item.gradeId,
+      // };
+      // this.$request
+      //   .getApplysubscribe(data)
+      //   .then((res) => {
+      //     this.$router.push({
+      //       path: "/person-center/my-classhour/appointment",
+      //       query: {
+      //         goodsId: item.goodsId,
+      //         gradeId: item.gradeId,
+      //         orderGoodsId: item.orderGoodsId,
+      //       },
+      //     });
+      //   })
+      //   .catch((err) => {
+      //     this.$message({
+      //       type: "success",
+      //       message: err.msg,
+      //     });
+      //   });
+    },
+
+    confirmAppoint() {
+      if (!this.applyId) {
+        this.$message.warning("请选择要预约的考试");
+        return;
+      }
       var data = {
-        goodsId: item.goodsId,
-        gradeId: item.gradeId,
+        goodsId: this.appointItem.goodsId,
+        gradeId: this.appointItem.gradeId,
+        applyId: this.applyId,
+        orderGoodsId: this.appointItem.orderGoodsId,
       };
       this.$request
         .getApplysubscribe(data)
@@ -271,15 +527,16 @@ export default {
           this.$router.push({
             path: "/person-center/my-classhour/appointment",
             query: {
-              goodsId: item.goodsId,
-              gradeId: item.gradeId,
-              orderGoodsId: item.orderGoodsId,
+              goodsId: this.appointItem.goodsId,
+              gradeId: this.appointItem.gradeId,
+              orderGoodsId: this.appointItem.orderGoodsId,
+              applyId: this.applyId,
             },
           });
         })
         .catch((err) => {
           this.$message({
-            type: "success",
+            type: "warning",
             message: err.msg,
           });
         });
@@ -487,7 +744,7 @@ export default {
                 margin: 2px 0;
                 width: 122px;
                 height: 32px;
-                background: #3f8dfd;
+                padding: 0;
                 border-radius: 16px;
                 display: inline-block;
                 text-align: center;
@@ -601,5 +858,14 @@ export default {
       text-align: center;
     }
   }
+
+  .appoint-modal {
+    &__content {
+      .el-radio {
+        display: block;
+        margin: 10px 30px 10px 0;
+      }
+    }
+  }
 }
 </style>

+ 93 - 91
src/pages/person-center/my-course/index.vue

@@ -487,7 +487,7 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
+import { mapGetters, mapActions } from "vuex";
 import SelectClassModal from "@/components/selectClassModal";
 import RebuildModal from "@/components/rebuildModal";
 import ExercisesModal from "@/components/exercisesModal";
@@ -528,11 +528,13 @@ export default {
     ...mapGetters(["userInfo"]),
   },
   async mounted() {
+    this.getUserInfo();
     this.sysTime = this.$tools.timest();
     await this.orderUserEduList();
     this.courseGoodsList();
   },
   methods: {
+    ...mapActions(["getUserInfo"]),
     tabChange(e) {
       if (this.activeName == e.name) {
         return;
@@ -707,14 +709,14 @@ export default {
         }
       }
 
-      //内部系统
-      if (item.interfacePushId > 0 && item.officialStatus != 1) {
-        this.$message({
-          type: "warning",
-          message: "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
-        });
-        return;
-      }
+      // //内部系统
+      // if (item.interfacePushId > 0 && item.officialStatus != 1) {
+      //   this.$message({
+      //     type: "warning",
+      //     message: "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
+      //   });
+      //   return;
+      // }
 
       if (!confirmDetail) {
         return;
@@ -730,89 +732,89 @@ export default {
         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((res) => {
-                if (res.rows.length) {
-                  // if (
-                  //   item.officialName &&
-                  //   item.businessName == "二级" &&
-                  //   item.projectName == "建造师"
-                  // ) {
-                  //   this.userConfirmInfoDetail().then((res) => {
-                  //     this.$router.push({
-                  //       path: `/my-course-detail/${item.goodsId}`,
-                  //       query: {
-                  //         gradeId: item.gradeId,
-                  //         orderGoodsId: item.orderGoodsId,
-                  //         courseId: res.rows[0].courseId || "",
-                  //       },
-                  //     });
-                  //   });
-                  // } else {
-                  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: "课程内暂无可以学习的科目",
-                  });
-                }
-              });
-          });
-      } else {
-        this.$request
-          .courseCourseList({
-            pageNum: 1,
-            pageSize: 1,
-            goodsId: item.goodsId,
-            gradeId: item.gradeId,
-          })
-          .then((res) => {
-            if (res.rows.length) {
-              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: "课程内暂无可以学习的科目",
-              });
-            }
+      // 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((res) => {
+              if (res.rows.length) {
+                // if (
+                //   item.officialName &&
+                //   item.businessName == "二级" &&
+                //   item.projectName == "建造师"
+                // ) {
+                //   this.userConfirmInfoDetail().then((res) => {
+                //     this.$router.push({
+                //       path: `/my-course-detail/${item.goodsId}`,
+                //       query: {
+                //         gradeId: item.gradeId,
+                //         orderGoodsId: item.orderGoodsId,
+                //         courseId: res.rows[0].courseId || "",
+                //       },
+                //     });
+                //   });
+                // } else {
+                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: "课程内暂无可以学习的科目",
+                });
+              }
+            });
+        });
+      // } else {
+      //   this.$request
+      //     .courseCourseList({
+      //       pageNum: 1,
+      //       pageSize: 1,
+      //       goodsId: item.goodsId,
+      //       gradeId: item.gradeId,
+      //     })
+      //     .then((res) => {
+      //       if (res.rows.length) {
+      //         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: "课程内暂无可以学习的科目",
+      //         });
+      //       }
+      //     });
+      // }
     },
 
     userConfirmInfoDetail() {

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

@@ -661,15 +661,15 @@ export default {
                 return;
               }
             }
-            //内部系统
-            if (items.interfacePushId > 0 && items.officialStatus != 1) {
-              this.$message({
-                type: "warning",
-                message:
-                  "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
-              });
-              return;
-            }
+            // //内部系统
+            // if (items.interfacePushId > 0 && items.officialStatus != 1) {
+            //   this.$message({
+            //     type: "warning",
+            //     message:
+            //       "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
+            //   });
+            //   return;
+            // }
             if (
               this.sysTime <= items.serviceStartTime ||
               this.sysTime >= items.serviceEndTime
@@ -728,57 +728,57 @@ export default {
               return;
             }
 
-            if (item.educationName == "继续教育") {
-              this.$request
-                .lockLockStatus({
-                  action: "jxjy",
-                })
-                .then((res) => {
-                  //有其他端在操作,不能学习
-                  this.$message({
-                    type: "warning",
-                    message: res.msg,
-                  });
-                })
-                .catch((err) => {
-                  //可以学习
-                  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: "课程内暂无可以学习的科目",
-                        });
-                      }
-                    });
-                });
-            } else {
-              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: "课程内暂无可以学习的科目",
-                    });
-                  }
+            // if (item.educationName == "继续教育") {
+            this.$request
+              .lockLockStatus({
+                action: "jxjy",
+              })
+              .then((res) => {
+                //有其他端在操作,不能学习
+                this.$message({
+                  type: "warning",
+                  message: res.msg,
                 });
-            }
+              })
+              .catch((err) => {
+                //可以学习
+                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: "课程内暂无可以学习的科目",
+                      });
+                    }
+                  });
+              });
+            // } else {
+            //   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: "课程内暂无可以学习的科目",
+            //         });
+            //       }
+            //     });
+            // }
           });
       });
     },

+ 189 - 66
src/pages/person-center/my-mock/index.vue

@@ -41,10 +41,10 @@
                 <div class="text">考试时间</div>
                 <div class="select">
                   <el-date-picker
-                    value-format="yyyy-MM-dd"
                     v-model="examParam.dateRange"
-                    type="daterange"
-                    @change="mockSubscribeListSubscribe"
+                    type="datetimerange"
+                    value-format="timestamp"
+                    @change="mockExamDateChange"
                     placeholder="选择日期"
                   >
                   </el-date-picker>
@@ -53,12 +53,16 @@
               <div class="item clearfix">
                 <div class="text">考试标题</div>
                 <div class="select">
-                  <el-select placeholder="请选择" v-model="title">
+                  <el-select
+                    placeholder="请选择"
+                    v-model="examParam.applyName"
+                    @change="mockSubscribeListSubscribe"
+                  >
                     <el-option
-                      v-for="item in 5"
-                      :key="item"
-                      :label="item"
-                      :value="item"
+                      v-for="(item, index) in listApplyName"
+                      :key="index"
+                      :label="item.applyName"
+                      :value="item.applyId"
                     >
                     </el-option>
                   </el-select>
@@ -74,7 +78,7 @@
               >
                 <template v-if="examParam.mockStatus == 0">
                   <div class="mock-item__header">
-                    <div class="title">{{ item.applyName }}</div>
+                    <div class="title">{{ item.subjectName }}</div>
                     <!-- <div class="time">2022/4/15 9:30:00</div> -->
                   </div>
 
@@ -90,10 +94,10 @@
                         <span class="item__left">专业:</span>
                         <span class="item__right">{{ item.categoryName }}</span>
                       </div>
-                      <div class="item">
+                      <!-- <div class="item">
                         <span class="item__left">科目:</span>
                         <span class="item__right">{{ item.subjectName }}</span>
-                      </div>
+                      </div> -->
                       <div class="item">
                         <span class="item__left">考试时间:</span>
                         <span class="item__right">
@@ -109,7 +113,12 @@
                           >去考试</el-button
                         >
 
-                        <div class="text">考试未开始</div>
+                        <div class="text" v-if="!isStart(item)">考试未开始</div>
+                      </div>
+                      <div class="btn-item" v-else-if="item.handStatus">
+                        <el-button class="btn" disabled type="primary"
+                          >已考试</el-button
+                        >
                       </div>
                       <div class="btn-item" v-else>
                         <el-button
@@ -156,7 +165,7 @@
                     </div>
                     <div class="btn-wrap btn-wrap--over">
                       <template>
-                        <div class="btn-item" v-if="item.reSubcribe == 1">
+                        <div class="btn-item" v-if="item.reSubscribe == 1">
                           <el-button
                             class="btn"
                             plain
@@ -194,7 +203,12 @@
                       </template>
                     </div>
                   </div>
-                  <div class="mock-item__footer">
+                  <div
+                    class="mock-item__footer"
+                    v-if="
+                      item.liveEndTime && item.liveStartTime && item.liveUrl
+                    "
+                  >
                     <div class="text">
                       模考讲解直播时间:{{
                         $tools.timestampToTime(item.liveStartTime, false)
@@ -244,7 +258,13 @@
                     <el-option
                       v-for="(item, index) in businesslist"
                       :key="index"
-                      :label="item.businessName + item.projectName"
+                      :label="
+                        item.educationName +
+                        ':' +
+                        item.businessName +
+                        '-' +
+                        item.projectName
+                      "
                       :value="item.businessId"
                     >
                     </el-option>
@@ -258,12 +278,12 @@
                   <el-select
                     placeholder="请选择"
                     @change="subjectChange"
-                    v-model="appointParam.subjectId"
+                    v-model="appointParam.majorId"
                   >
                     <el-option
                       v-for="(item, index) in sList"
                       :key="index"
-                      :label="item.subjectName"
+                      :label="item.categoryName"
                       :value="item.id"
                     >
                     </el-option>
@@ -275,9 +295,9 @@
                 <div class="select">
                   <el-date-picker
                     @change="mockApplyListApply"
-                    value-format="yyyy-MM-dd"
                     v-model="appointParam.dateRange"
-                    type="daterange"
+                    type="datetimerange"
+                    value-format="timestamp"
                     placeholder="选择日期"
                   >
                   </el-date-picker>
@@ -364,10 +384,10 @@
                 <div class="text">考试时间</div>
                 <div class="select">
                   <el-date-picker
-                    value-format="yyyy-MM-dd"
                     v-model="liveParam.dateRange"
-                    type="daterange"
-                    @change="mockApplyListMockLive"
+                    type="datetimerange"
+                    value-format="timestamp"
+                    @change="mockLiveDateChange"
                     placeholder="选择日期"
                   >
                   </el-date-picker>
@@ -376,12 +396,16 @@
               <div class="item clearfix">
                 <div class="text">考试标题</div>
                 <div class="select">
-                  <el-select placeholder="请选择" v-model="title">
+                  <el-select
+                    placeholder="请选择"
+                    @change="mockApplyListMockLive"
+                    v-model="liveParam.applyName"
+                  >
                     <el-option
-                      v-for="item in 5"
-                      :key="item"
-                      :label="item"
-                      :value="item"
+                      v-for="(item, index) in listLiveName"
+                      :key="index"
+                      :label="item.applyName"
+                      :value="item.applyId"
                     >
                     </el-option>
                   </el-select>
@@ -429,7 +453,7 @@
                   </div>
                 </div>
                 <div class="live-item__body">
-                  <div class="title">{{ item.applyName }}</div>
+                  <div class="title">{{ item.sectionName }}</div>
                   <div class="desc">
                     直播时间:{{
                       $tools.timestampToTime(item.liveStartTime, false)
@@ -507,7 +531,7 @@
 </template>
 
 <script>
-import { mapMutations } from "vuex";
+import { mapMutations, mapActions, mapGetters } from "vuex";
 export default {
   name: "MyOrder",
   data() {
@@ -524,10 +548,11 @@ export default {
         pageNum: 1,
         pageSize: 10,
         businessId: "",
-        subjectId: "",
+        majorId: "",
         total: 0,
       },
       examParam: {
+        applyName: "",
         dateRange: "",
         pageNum: 1,
         pageSize: 10,
@@ -535,6 +560,7 @@ export default {
         total: 0,
       },
       liveParam: {
+        applyName: "",
         dateRange: "",
         pageNum: 1,
         pageSize: 10,
@@ -559,6 +585,9 @@ export default {
       date: "",
       state: 0,
       nowTime: 0,
+      subscribeId: 0,
+      listApplyName: [],
+      listLiveName: [],
       list: [
         {
           label: "模拟考试",
@@ -578,7 +607,10 @@ export default {
       ],
     };
   },
-  mounted() {
+  computed: {
+    ...mapGetters(["sysTime"]),
+  },
+  async mounted() {
     this.nowTime = +this.$tools.timest();
     this.mockSubscribeListSubscribe();
   },
@@ -586,6 +618,43 @@ export default {
     await this.clears();
   },
   methods: {
+    ...mapActions(["setSystemTime"]),
+    mockExamDateChange() {
+      this.mockApplyListApplyName();
+    },
+    mockLiveDateChange() {
+      this.mockLiveListApplyName();
+    },
+    mockLiveListApplyName() {
+      let liveParam = JSON.parse(JSON.stringify(this.liveParam));
+      if (liveParam.dateRange && liveParam.dateRange[0]) {
+        liveParam.startTime = liveParam.dateRange[0].toString().substr(0, 10);
+      }
+
+      if (liveParam.dateRange && liveParam.dateRange[1]) {
+        liveParam.endTime = liveParam.dateRange[1].toString().substr(0, 10);
+      }
+      this.$request.mockApplyListApplyName(liveParam).then((res) => {
+        this.listLiveName = res.rows;
+        this.liveParam.applyName = "";
+        this.mockApplyListMockLive();
+      });
+    },
+    mockApplyListApplyName() {
+      let examParam = JSON.parse(JSON.stringify(this.examParam));
+      if (examParam.dateRange && examParam.dateRange[0]) {
+        examParam.startTime = examParam.dateRange[0].toString().substr(0, 10);
+      }
+
+      if (examParam.dateRange && examParam.dateRange[1]) {
+        examParam.endTime = examParam.dateRange[1].toString().substr(0, 10);
+      }
+      this.$request.mockApplyListApplyName(examParam).then((res) => {
+        this.listApplyName = res.rows;
+        this.examParam.applyName = "";
+        this.mockSubscribeListSubscribe();
+      });
+    },
     async closePlayBackModal() {
       await this.clears();
     },
@@ -601,8 +670,10 @@ export default {
       } else if (item.liveStatus == 2) {
         //回放中
         this.playBackModal = true;
-        this.vid = item.liveUrl;
-        this.loadPlayerScript(this.loadPlayer);
+        this.$nextTick(() => {
+          this.vid = item.recordingUrl;
+          this.loadPlayerScript(this.loadPlayer);
+        });
       } else if (item.liveStatus == 3) {
         //已结束
         this.$message.warning("直播已结束,不能查看回放");
@@ -660,6 +731,7 @@ export default {
           recordId: item.recordId,
           examId: item.examId,
           eachExamId: item.eachExamId,
+          subscribeId: item.subscribeId,
         },
       });
     },
@@ -689,23 +761,31 @@ export default {
       });
     },
     goTest(item) {
-      let nowTime = +this.$tools.timest();
       let startTime = this.$tools.TimeTotimestamp(
         this.$tools.timestampToTime(item.applySiteExamTime) +
           " " +
           item.applySiteStartTime
       );
       let canGo =
-        startTime - nowTime <= 600 &&
-        startTime - nowTime >= (-(item.timeLimit * 60) || 0);
+        startTime - this.nowTime <= 600 &&
+        startTime - this.nowTime >= (-(item.timeLimit * 60) || 0);
 
       return !canGo;
     },
+    isStart(item) {
+      let startTime = this.$tools.TimeTotimestamp(
+        this.$tools.timestampToTime(item.applySiteExamTime) +
+          " " +
+          item.applySiteStartTime
+      );
+
+      return startTime - this.nowTime <= 600;
+    },
     goExamCount(item) {
-      // if (this.goTest(item)) {
-      //   this.$message.warning("不在考试时间");
-      //   return;
-      // }
+      if (this.goTest(item)) {
+        this.$message.warning("不在考试时间");
+        return;
+      }
 
       this.$router.push({
         path: "/mock-countdown",
@@ -715,6 +795,7 @@ export default {
               " " +
               item.applySiteStartTime
           ),
+          mockName: item.applyName,
           limit: item.timeLimit,
           examId: item.examId,
           eachExamId: item.eachExamId,
@@ -750,9 +831,14 @@ export default {
           // mockMajorSubjectId:49
         })
         .then((res) => {
-          this.showItem = item;
-          this.appointModal = true;
-          this.mockApplyListApply();
+          if (res.code == 200) {
+            this.showItem = item;
+            this.subscribeId = res.data;
+            this.appointModal = true;
+            this.mockApplyListApply();
+          } else {
+            this.$message.warning(err.msg);
+          }
         })
         .catch((err) => {
           this.$message.warning(err.msg);
@@ -761,7 +847,16 @@ export default {
     canApply(item) {
       let startTime = item.applyStartTime;
       let endTime = item.applyEndTime;
-      if (this.nowTime >= startTime && this.nowTime <= endTime) {
+      let examTime = item.examTime;
+      console.log(this.sysTime);
+      console.log(startTime);
+      console.log(endTime);
+      console.log(examTime);
+      if (
+        this.sysTime >= startTime &&
+        this.sysTime <= endTime &&
+        this.sysTime < examTime
+      ) {
         return true;
       } else {
         return false;
@@ -773,12 +868,12 @@ export default {
       let projectId = "";
 
       if (projectObj) {
-        projectId.projectId;
+        projectId = projectObj.projectId;
       }
-
       await this.courseMajorList({
         businessId: this.appointParam.businessId,
         projectId: projectId,
+        status: 1,
       });
       this.mockApplyListApply();
     },
@@ -796,10 +891,21 @@ export default {
         showClose: true,
       })
         .then((_) => {
-          console.log("开启");
+          this.mockSubscribeEdit();
         })
         .catch((_) => {});
     },
+
+    mockSubscribeEdit() {
+      this.$request
+        .mockSubscribeEdit({
+          mockRemind: 1,
+          subscribeId: this.subscribeId,
+        })
+        .then((res) => {
+          this.$message.success("开启成功");
+        });
+    },
     mockApplyListApplyBusiness() {
       return new Promise((resolve) => {
         this.$request.mockApplyListApplyBusiness().then(async (res) => {
@@ -820,9 +926,9 @@ export default {
         this.$request.courseMajorList(data).then((res) => {
           if (res.code == 200) {
             self.sList = res.rows;
-            let allItem = { id: "", subjectName: "全部" };
+            let allItem = { id: "", categoryName: "全部" };
             self.sList.unshift(allItem);
-            this.appointParam.subjectId = "";
+            this.appointParam.majorId = "";
 
             resolve();
           }
@@ -839,6 +945,7 @@ export default {
     },
     liveParamCurrentChange(e) {
       this.liveParam.pageNum = e;
+      this.mockLiveListApplyName();
     },
     async tabChange(e) {
       if (this.activeName == e.name) {
@@ -869,13 +976,21 @@ export default {
     mockSubscribeListSubscribe() {
       let examParam = JSON.parse(JSON.stringify(this.examParam));
       if (examParam.dateRange && examParam.dateRange[0]) {
-        examParam.endTime = this.$tools.TimeTotimestamp(examParam.dateRange[0]);
+        examParam.startTime = examParam.dateRange[0].toString().substr(0, 10);
       }
 
       if (examParam.dateRange && examParam.dateRange[1]) {
-        examParam.startTime = this.$tools.TimeTotimestamp(
-          examParam.dateRange[1]
-        );
+        examParam.endTime = examParam.dateRange[1].toString().substr(0, 10);
+      }
+
+      if (this.listApplyName.length) {
+        examParam.applyName = this.listApplyName.find(
+          (item) => examParam.applyName == item.applyId
+        )
+          ? this.listApplyName.find(
+              (item) => examParam.applyName == item.applyId
+            ).applyName
+          : "";
       }
       this.$request.mockSubscribeListSubscribe(examParam).then((res) => {
         this.examList = res.rows;
@@ -883,20 +998,20 @@ export default {
       });
     },
 
-    mockApplyListApply() {
+    async mockApplyListApply() {
       let appointParam = JSON.parse(JSON.stringify(this.appointParam));
       if (appointParam.dateRange && appointParam.dateRange[0]) {
-        appointParam.endTime = this.$tools.TimeTotimestamp(
-          appointParam.dateRange[0]
-        );
+        appointParam.startTime = appointParam.dateRange[0]
+          .toString()
+          .substr(0, 10);
       }
 
       if (appointParam.dateRange && appointParam.dateRange[1]) {
-        appointParam.startTime = this.$tools.TimeTotimestamp(
-          appointParam.dateRange[1]
-        );
+        appointParam.endTime = appointParam.dateRange[1]
+          .toString()
+          .substr(0, 10);
       }
-
+      this.setSystemTime();
       this.$request.mockApplyListApply(appointParam).then((res) => {
         this.mockList = res.rows;
         this.appointParam.total = res.total;
@@ -905,13 +1020,21 @@ export default {
     mockApplyListMockLive() {
       let liveParam = JSON.parse(JSON.stringify(this.liveParam));
       if (liveParam.dateRange && liveParam.dateRange[0]) {
-        liveParam.endTime = this.$tools.TimeTotimestamp(liveParam.dateRange[0]);
+        liveParam.startTime = liveParam.dateRange[0].toString().substr(0, 10);
       }
 
       if (liveParam.dateRange && liveParam.dateRange[1]) {
-        liveParam.startTime = this.$tools.TimeTotimestamp(
-          liveParam.dateRange[1]
-        );
+        liveParam.endTime = liveParam.dateRange[1].toString().substr(0, 10);
+      }
+
+      if (this.listLiveName.length) {
+        liveParam.applyName = this.listLiveName.find(
+          (item) => liveParam.applyName == item.applyId
+        )
+          ? this.listLiveName.find(
+              (item) => liveParam.applyName == item.applyId
+            ).applyName
+          : "";
       }
       this.$request.mockApplyListMockLive(liveParam).then((res) => {
         this.liveList = res.rows;
@@ -1181,7 +1304,7 @@ export default {
           }
 
           .desc {
-            margin-top: 10px;
+            margin-top: 5px;
             font-size: 14px;
             font-family: Microsoft YaHei;
             font-weight: 400;

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

@@ -167,14 +167,14 @@ export default {
         })
         .then(async (res) => {
           let item = res.data;
-          if (item.interfacePushId > 0 && item.officialStatus != 1) {
-            this.$message({
-              type: "warning",
-              message:
-                "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
-            });
-            return;
-          }
+          // if (item.interfacePushId > 0 && item.officialStatus != 1) {
+          //   this.$message({
+          //     type: "warning",
+          //     message:
+          //       "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
+          //   });
+          //   return;
+          // }
           if (
             this.sysTime <= item.serviceStartTime ||
             this.sysTime >= item.serviceEndTime
@@ -235,65 +235,65 @@ export default {
             }
           }
 
-          if (item.educationName == "继续教育") {
-            this.$request
-              .lockLockStatus({
-                action: "jxjy",
-              })
-              .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((res) => {
-                    if (res.rows.length) {
-                      this.go("/my-course-detail/" + sectionItem.goodsId, {
-                        gradeId: sectionItem.gradeId,
-                        orderGoodsId: sectionItem.orderGoodsId,
-                        courseId: sectionItem.courseId,
-                      });
-                    } else {
-                      this.$message({
-                        type: "warning",
-                        message: "课程内暂无可以学习的科目",
-                      });
-                    }
-                  });
+          // if (item.educationName == "继续教育") {
+          this.$request
+            .lockLockStatus({
+              action: "jxjy",
+            })
+            .then((res) => {
+              //有其他端在操作,不能学习
+              this.$message({
+                type: "warning",
+                message: res.msg,
               });
-          } else {
-            this.$request
-              .courseCourseList({
-                pageNum: 1,
-                pageSize: 1,
-                goodsId: item.goodsId,
-                gradeId: item.gradeId,
-              })
-              .then((res) => {
-                if (res.rows.length) {
-                  this.go("/my-course-detail/" + sectionItem.goodsId, {
-                    gradeId: sectionItem.gradeId,
-                    orderGoodsId: sectionItem.orderGoodsId,
-                    courseId: sectionItem.courseId,
-                  });
-                } else {
-                  this.$message({
-                    type: "warning",
-                    message: "课程内暂无可以学习的科目",
-                  });
-                }
-              });
-          }
+            })
+            .catch((err) => {
+              //可以学习
+              this.$request
+                .courseCourseList({
+                  pageNum: 1,
+                  pageSize: 1,
+                  goodsId: item.goodsId,
+                  gradeId: item.gradeId,
+                })
+                .then((res) => {
+                  if (res.rows.length) {
+                    this.go("/my-course-detail/" + sectionItem.goodsId, {
+                      gradeId: sectionItem.gradeId,
+                      orderGoodsId: sectionItem.orderGoodsId,
+                      courseId: sectionItem.courseId,
+                    });
+                  } else {
+                    this.$message({
+                      type: "warning",
+                      message: "课程内暂无可以学习的科目",
+                    });
+                  }
+                });
+            });
+          // } else {
+          //   this.$request
+          //     .courseCourseList({
+          //       pageNum: 1,
+          //       pageSize: 1,
+          //       goodsId: item.goodsId,
+          //       gradeId: item.gradeId,
+          //     })
+          //     .then((res) => {
+          //       if (res.rows.length) {
+          //         this.go("/my-course-detail/" + sectionItem.goodsId, {
+          //           gradeId: sectionItem.gradeId,
+          //           orderGoodsId: sectionItem.orderGoodsId,
+          //           courseId: sectionItem.courseId,
+          //         });
+          //       } else {
+          //         this.$message({
+          //           type: "warning",
+          //           message: "课程内暂无可以学习的科目",
+          //         });
+          //       }
+          //     });
+          // }
         });
     },
     go(path, query) {

+ 136 - 127
src/router/index.js

@@ -508,7 +508,11 @@ const router =  new Router({
           component: resolve => require(['@/pages/person-center/bank-record/index'],resolve),
           name: '做题记录'
         },
-        
+        {
+          path: 'mock-record',
+          component: resolve => require(['@/pages/person-center/mock-record/index'],resolve),
+          name: '模考记录'
+        },
         {
           path: 'my-collect',
           component: resolve => require(['@/pages/person-center/my-collect/index'],resolve),
@@ -526,6 +530,11 @@ const router =  new Router({
           component: resolve => require(['@/pages/person-center/bank-record/record-list/index'],resolve),
           name: '更多记录'
         },
+        {
+          path: 'mock-record-list/:goodsId',
+          component: resolve => require(['@/pages/person-center/mock-record/record-list/index'],resolve),
+          name: '更多模考记录'
+        },
         {
           path: 'my-order',
           component: resolve => require(['@/pages/person-center/my-order/index'],resolve),
@@ -644,155 +653,155 @@ router.beforeEach((to,from,next) => {
         store.dispatch('getUserInfo')
       }
 
-      // // //题库页面要检测是否需要锁定
-      // let isBankLock = bankAdmin.some(item => {
-      //   return to.path.indexOf(item) != -1
-      // })
-      // console.log(isBankLock,'isBankLock')
-      // if(isBankLock) {
+      // //题库页面要检测是否需要锁定
+      let isBankLock = bankAdmin.some(item => {
+        return to.path.indexOf(item) != -1
+      })
+      console.log(isBankLock,'isBankLock')
+      if(isBankLock) {
         
-      //   //没有执行定时器,开启锁定
-      //   if(!canToBank) {
-      //     request
-      //       .lockLockStatus({
-      //         action: "bank",
-      //         uuid:tools.getUuid()
-      //       })
-      //       .then((res) => {
-      //         //有其他端在操作,不能学习
-      //         Message({
-      //           type: "warning",
-      //           message: res.msg,
-      //         });
+        //没有执行定时器,开启锁定
+        if(!canToBank) {
+          request
+            .lockLockStatus({
+              action: "bank",
+              uuid:tools.getUuid()
+            })
+            .then((res) => {
+              //有其他端在操作,不能学习
+              Message({
+                type: "warning",
+                message: res.msg,
+              });
               
-      //         if(from.path=='/') {
-      //           next('/')
-      //         }
+              if(from.path=='/') {
+                next('/')
+              }
 
-      //       }).catch(err => {
-      //         //可以学习,开启锁定
-      //           canToBank = 1;
-      //         request.lockLockAction({
-      //           action:'bank',
-      //           uuid:tools.getUuid()
-      //         }).then(res => {
-      //         })
-      //         canToBank = setInterval(() => {
-      //           request.lockLockAction({
-      //             action:'bank',
-      //             uuid:tools.getUuid()
-      //           }).then(res => {
+            }).catch(err => {
+              //可以学习,开启锁定
+                canToBank = 1;
+              request.lockLockAction({
+                action:'bank',
+                uuid:tools.getUuid()
+              }).then(res => {
+              })
+              canToBank = setInterval(() => {
+                request.lockLockAction({
+                  action:'bank',
+                  uuid:tools.getUuid()
+                }).then(res => {
                   
-      //           })
-      //         }, 10000);
-      //         next()
-      //       })
+                })
+              }, 10000);
+              next()
+            })
 
-      //       return;
-      //   } else {
-      //     //正在执行定时器,可以直接进入
-      //     next()
-      //   }
+            return;
+        } else {
+          //正在执行定时器,可以直接进入
+          next()
+        }
         
-      //   return;
-      // } else {
-      //   //从题库页面离开删除锁定
+        return;
+      } else {
+        //从题库页面离开删除锁定
 
-      //   let isLeaveBank = bankAdmin.some(item => {
-      //     return from.path.indexOf(item) != -1
-      //   })
+        let isLeaveBank = bankAdmin.some(item => {
+          return from.path.indexOf(item) != -1
+        })
 
-      //   if(isLeaveBank) {
+        if(isLeaveBank) {
           
-      //     clearInterval(canToBank)
-      //     canToBank = null;
-      //     request.lockDelLock({
-      //       action:'bank',
-      //       uuid:tools.getUuid()
-      //     }).then(res => {
+          clearInterval(canToBank)
+          canToBank = null;
+          request.lockDelLock({
+            action:'bank',
+            uuid:tools.getUuid()
+          }).then(res => {
             
-      //     })
-      //   }
-      // }
+          })
+        }
+      }
       
-      // let isCourseLock = courseAdmin.some(item => {
-      //   return to.path.indexOf(item) != -1
-      // })
+      let isCourseLock = courseAdmin.some(item => {
+        return to.path.indexOf(item) != -1
+      })
 
-      // console.log(isCourseLock,'isCourseLock')
-      // if(isCourseLock) {
+      console.log(isCourseLock,'isCourseLock')
+      if(isCourseLock) {
         
-      //   //没有执行定时器,开启锁定
-      //   if(!canToCourse) {
+        //没有执行定时器,开启锁定
+        if(!canToCourse) {
           
-      //     request.goodsDetail(to.params.goodsId).then(res => {
-      //       //继续教育锁定
-      //       if(res.data.educationName == '继续教育') {
-      //         request
-      //           .lockLockStatus({
-      //             action: "jxjy",
-      //             uuid:tools.getUuid()
-      //           })
-      //           .then((res) => {
-      //             //有其他端在操作,不能学习
-      //             Message({
-      //               type: "warning",
-      //               message: res.msg,
-      //             });
+          request.goodsDetail(to.params.goodsId).then(res => {
+            //继续教育锁定
+            // if(res.data.educationName == '继续教育') {
+              request
+                .lockLockStatus({
+                  action: "jxjy",
+                  uuid:tools.getUuid()
+                })
+                .then((res) => {
+                  //有其他端在操作,不能学习
+                  Message({
+                    type: "warning",
+                    message: res.msg,
+                  });
                   
-      //             if(from.path=='/') {
-      //               next('/')
-      //             }
+                  if(from.path=='/') {
+                    next('/')
+                  }
 
-      //           }).catch(err => {
-      //             //可以学习,开启锁定
-      //             canToCourse = 1;
-      //             request.lockLockAction({
-      //               action:'jxjy',
-      //               uuid:tools.getUuid()
-      //             }).then(res => {
-      //             })
-      //             canToCourse = setInterval(() => {
-      //               request.lockLockAction({
-      //                 action:'jxjy',
-      //                 uuid:tools.getUuid()
-      //               }).then(res => {
+                }).catch(err => {
+                  //可以学习,开启锁定
+                  canToCourse = 1;
+                  request.lockLockAction({
+                    action:'jxjy',
+                    uuid:tools.getUuid()
+                  }).then(res => {
+                  })
+                  canToCourse = setInterval(() => {
+                    request.lockLockAction({
+                      action:'jxjy',
+                      uuid:tools.getUuid()
+                    }).then(res => {
                       
-      //               })
-      //             }, 10000);
-      //             next()
-      //           })
-      //       } else {
-      //         next()
-      //       }
-      //     })
+                    })
+                  }, 10000);
+                  next()
+                })
+            // } else {
+            //   next()
+            // }
+          })
           
 
-      //       return;
-      //   } else {
-      //     //正在执行定时器,可以直接进入
-      //     next()
-      //   }
+            return;
+        } else {
+          //正在执行定时器,可以直接进入
+          next()
+        }
         
-      //   return;
-      // } else {
-      //   //非题库页面删除锁定
-      //   let isLeaveCouese = courseAdmin.some(item => {
-      //     return from.path.indexOf(item) != -1
-      //   })
+        return;
+      } else {
+        //非题库页面删除锁定
+        let isLeaveCouese = courseAdmin.some(item => {
+          return from.path.indexOf(item) != -1
+        })
 
-      //   if(isLeaveCouese) {
+        if(isLeaveCouese) {
           
-      //     clearInterval(canToCourse)
-      //     canToCourse = null;
-      //     request.lockDelLock({
-      //       action:'jxjy',
-      //       uuid:tools.getUuid()
-      //     }).then(res => {
+          clearInterval(canToCourse)
+          canToCourse = null;
+          request.lockDelLock({
+            action:'jxjy',
+            uuid:tools.getUuid()
+          }).then(res => {
             
-      //     })
-      //   }
-      // }
+          })
+        }
+      }
       
       next()
     } else {

+ 20 - 0
src/store/index.js

@@ -23,9 +23,11 @@ export default new Vuex.Store({
     },//页头配置
     footer: [],//页尾配置
     links: null,//友情链接
+    sysTime:0,
   },
 
   getters: {
+    sysTime: state =>  state.sysTime,
     userInfo: state => state.userInfo,
     token: state => state.token,
     header: state => state.header,
@@ -40,6 +42,9 @@ export default new Vuex.Store({
 
   //操作数据,唯一的通道是mutations
   mutations: {
+    commonSystemTime(state,time) {
+			state.sysTime = time;
+		},
     setCurrentRouter(state,data) {
       state.currentRouter = data;
     },
@@ -86,6 +91,21 @@ export default new Vuex.Store({
 
   //actions,可以来做异步操作,然后提交给mutations,而后再对state(数据)进行操作
   actions: {
+    /**
+		 * 设置系统时间
+		 */
+		setSystemTime({
+			commit
+		}) {
+			return new Promise(resolve => {
+				common.commonSystemTime().then(res => {
+					if(res.code == 200) {
+						commit('commonSystemTime', res.data)
+						resolve()
+					}
+				})
+			})
+		},
     /**
      * 
      * @param {*} context