Преглед на файлове

过期不能继续学习

y595705120 преди 2 години
родител
ревизия
870970ccb8

+ 1 - 1
src/App.vue

@@ -28,7 +28,7 @@
   export default {
     name: 'App',
     methods:{
-      ...mapActions("cache", ["loadTypeList"]),
+      ...mapActions("user", ["loadTypeList"]),
     },
     created(){
       this.loadTypeList()

+ 5 - 0
src/containers/center/class/train/index.vue

@@ -6,6 +6,9 @@
     <div class="right-block-bd ng-scope" ui-view="myStudyContent" style="position: relative;">
       <div class="panel-tit clear">
         <p class="fl">课程</p>
+        <div class="tc">
+          <strong class="tc" style="color: red;font-size: 1.2rem;">{{setting.noticeMsg}}</strong>
+        </div>
       </div>
 
       <ul class="m-course-list clear mt10 classlist" v-if="total>0">
@@ -49,6 +52,7 @@
 <script>
   import { httpServer} from "@/components/httpServer/httpServer.js";
   import { getMediaOptions} from "@/utils/index.js";
+  import setting from '@/setting';
   export default {
     name: "Index",
     data() {
@@ -61,6 +65,7 @@
         info:{},
         options:{},
         media:{},
+        setting,
         playDialog: false,
         listLoading: false
       };

+ 4 - 1
src/containers/center/exam/index.vue

@@ -327,7 +327,10 @@ export default {
     let that = this;
     //
     httpServer("course.StartExam", {courseId, groupId} ).then(res => {
-      if( res.code != 200) return;
+      if( res.code != 200) {
+        this.$router.go(-1)
+        return;
+      };
       let info = res.data||{}
       info.questionList = info.answers.map( v =>{
         v.marked = false

+ 7 - 0
src/containers/center/home/index.vue

@@ -26,6 +26,11 @@
             <p class="fs15 mt10">班级培训合格,即可以下载学时证明</p>
           </div>
         </div>
+
+        <div class="tc mt20 clear">
+          <strong class="tc" style="color: red;font-size: 1.2rem;">{{setting.noticeMsg}}</strong>
+        </div>
+
         <div class="panel-tit mt30 clear">
           <p class="fl">最近学习课程</p>
         </div>
@@ -58,6 +63,7 @@
   import {
     httpServer
   } from "@/components/httpServer/httpServer.js";
+  import setting from '@/setting';
   export default {
     name: "Index",
     data() {
@@ -67,6 +73,7 @@
         total: 1,
         media: {},
         list: [],
+        setting
       };
     },
     beforeMount() {

+ 4 - 5
src/containers/center/market/index.vue

@@ -26,12 +26,11 @@
         </div>
       </div>
 
-      <ul class="pt-line mt20">
-        <li :span="6" v-for="item in typeList" style="width: 25%;float: left;" :key="item.id" v-if="item.isOpen">
+      <el-row class="pt-line mt20">
+        <el-col :span="6" v-for="item in typeList"  :key="item.id" v-if="item.isOpen">
           <span :class="{active:item.name==type }" class="nav-btn w220" @click="type=item.name">{{item.name}} </span>
-        </li>
-      </ul>
-
+        </el-col>
+      </el-row>
       <div class="mt10" v-if="type=='施工现场专业人员'">
         <p style="color: red;font-size: 16px;">
           报名对象为:2020年度及以后由培训单位核发的和2021年度换发的“电子培训合格证”且每年度需参加继续教育人员

+ 17 - 4
src/containers/center/play/components/iCourseInfo.vue

@@ -44,8 +44,13 @@
         <div>
           <p style="font-size: 24px;"> 说明 </p>
           <p class="mt10" >岗位名称:{{tpl.name}} </p>
-          <p class="mt10" v-if="tpl.examGroupId>0" >考试不限次数,获得60分即合格</p>
-
+          <p class="mt10">
+            学习截至时间:
+            <strong style="color: red;">
+            {{info.startDate|add80Date}}
+            </strong>
+          </p>
+          <p class="mt10" style="color: red;" v-if="tpl.examGroupId>0" >报名成功,80天内完成学习与考试</p>
           <p class="mt10" v-if="tpl.examGroupId==0" >学完所有课程,即可打印学时证明</p>
 
           <div>
@@ -62,13 +67,21 @@
     </el-row>
     </template>
 
-    <script>
+  <script>
+  import { toDate } from "@/utils/date";
   export default {
     name: "Index",
     data() {
       return {
       }
     },
+    filters:{
+      add80Date( date ){
+        let val = new Date(date).getTime() + 80*86400*1000;
+        return toDate( val )
+
+      }
+    },
     props:['tpl', 'info'],
      methods: {
          startExam(){
@@ -92,4 +105,4 @@
       }
      }
   }
-  </script>
+  </script>

+ 17 - 1
src/containers/center/play/components/iCourseInfoTest.vue

@@ -27,6 +27,15 @@
           <span style="padding:0 2rem;color: red;">
             考试开始,三天内必须完成
           </span>
+          <span style="padding:0 2rem;color: red;">
+            报名成功,80天内完成学习
+          </span>
+        </p>
+        <p class="mt10">
+          学习截至时间:
+          <strong style="color: red;">
+          {{info.startDate|add80Date}}
+          </strong>
         </p>
         <p class="mt10">
           剩余考试时间:
@@ -78,7 +87,7 @@
 
 <script>
   import setting from '@/setting';
-  import { getTime,packTime } from "@/utils/date";
+  import { getTime,packTime,toDate } from "@/utils/date";
   export default {
     name: "iCourseInfoTest",
     data() {
@@ -100,6 +109,13 @@
     created(){
       this.initTimer()
     },
+    filters:{
+      add80Date( date ){
+        let val = new Date(date).getTime() + 80*86400*1000;
+        return toDate( val )
+
+      }
+    },
     methods: {
       initTimer() {
         if (this.timer) {

+ 3 - 2
src/containers/center/play/index.vue

@@ -104,9 +104,9 @@
   import Media from "./components/media.vue";
   import ExamList from "./components/ExamList.vue";
   import ICourseInfo from "./components/iCourseInfo.vue";
-   import ICourseInfoTest from "./components/iCourseInfoTest.vue";
+  import ICourseInfoTest from "./components/iCourseInfoTest.vue";
   import {getPercent} from '@/utils/index.js'
-   import {delExam} from '../exam/components/util.js'
+  import {delExam} from '../exam/components/util.js'
   import md5 from 'js-md5';
   export default {
     name: "Index",
@@ -200,6 +200,7 @@
       },
       startExam( groupId ){
         let courseId = this.courseId
+        let endDate = new Date( )
         delExam()
         this.$router.push({path:`/center/exam/${courseId}`, query:{groupId}});
       },

+ 1 - 0
src/setting.js

@@ -9,5 +9,6 @@ var examList  = {
   
   module.exports = {
     courseName: "检测试验人员",
+    noticeMsg:'温馨提醒:80天内完成学习与考试才能换证',
     examList
   }

+ 1 - 1
src/utils/date.js

@@ -39,7 +39,7 @@ export function toDatetime(times ) {
 
 export function toDate(times ) {
 	if( !times) return "2020-01-01"
-    if(Number(times)) times = times*1000;
+    if(Number(times) && times < 3656594008) times = times*1000;
     var d = new Date(times).Format("yyyy-MM-dd");
     return d.toLocaleString();
 }