17 コミット ee758ed629 ... 353c073985

作者 SHA1 メッセージ 日付
  y595705120 353c073985 修改 3 ヶ月 前
  y595705120 c8ca830a85 15分钟提醒一次 3 ヶ月 前
  y595705120 8bc9c57131 考试成绩 1 年間 前
  y595705120 5ebe812575 建机协会在线练习 1 年間 前
  y595705120 e6f091cb17 考试 1 年間 前
  y595705120 c4c4eaa02c 交易记录 2 年 前
  y595705120 a51cb6f772 学时证明 2 年 前
  y595705120 3681a62a62 一页6个 2 年 前
  y595705120 12166483c7 修改主页 2 年 前
  y595705120 f66c8b0e0a Merge branch 'zherui' of http://git.ndjsxh.cn:10080/ndjsxh/study_sm into zherui 2 年 前
  y595705120 ca62301072 修改index名字 2 年 前
  y595705120 d17e1aa769 修改index名字 2 年 前
  y595705120 ad6e79bff1 毕业证 2 年 前
  y595705120 488b57a2d9 建机协会 2 年 前
  y595705120 c1c99f1f96 网页适配 2 年 前
  y595705120 c17fad69ac study_jj 2 年 前
  y595705120 afb4f7818e 折睿学习页面 2 年 前

+ 1 - 1
config/index.js

@@ -4,7 +4,7 @@
 //
 // const TARGET = "http://study.ndjsxh.cn:8888/"
 // const TARGET = "http://localhost:8000/"
-const TARGET = "https://fjedu.dianpar.com/"
+const TARGET = "http://edu.jjxh.hqedust.com:8888"
 const path = require('path')
 
 module.exports = {

+ 1 - 1
index.html

@@ -8,7 +8,7 @@
     <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
     <!-- <meta name="referrer" content="origin"> -->
 
-    <title>建设从业人员继续教育系统服务平台</title>
+    <title>三明市建设机械设备行业协会</title>
   </head>
   <body style="margin:0px;">
 <!--    <div id="img_float" style="z-index: 101; left: 134px; width: 242px; height: 141px; position: absolute; top: 577px; visibility: visible; cursor: pointer;">

+ 2 - 2
src/App.vue

@@ -7,11 +7,11 @@
     <div class="ng-scope">
       <div class="footer ng-scope" style="z-index: 10">
         <div class="footer-bd">
-          <p>技术支持:福建省哲睿网络科技有限公司 ©2022</p>
+          <p>技术支持:福建鸿锵教育科技有限公司 ©2022 </p>
           <p>
               <img class="beian inline-block" src="./assets/images/beian_hashc9b229c96d.png" alt="">
               <a href="http://beian.miit.gov.cn/" target="_blank">
-                网站备案:闽ICP备0000000号
+                网站备案:闽ICP备19021760号-2
               </a>
            </p>
         </div>

+ 6 - 0
src/assets/css/base.css

@@ -224,6 +224,12 @@ button:focus {
 .w840 {
    width: 840px;
 }
+.w220 {
+   width: 220px;
+}
+.w245 {
+   width: 245px;
+}
 
 .post-nav  {
   margin-left: -20px;

+ 1 - 1
src/assets/css/main.css

@@ -221,7 +221,7 @@ a, span {
 }
 
 .m-right-block {
-  width: 1009px;
+  width: 1024px;
   margin: 0 auto;
   min-height: 700px;
   background: #fff;

+ 7 - 7
src/containers/center/class/train/index.vue

@@ -14,17 +14,17 @@
                 <i class="el-icon-check text-xl"></i>
               </el-tag>
             </div>
-            <div class="flex py-2 px-4  items-center justify-between">
-              <span style="height: 36px;" class="flex items-center justify-between">{{item.name}}</span>
-              <el-button type="text" @click="gotoPlay(item.courseId)">进入学习</el-button>
+            <div class="flex py-4 px-2 items-center justify-between">
+              <span style="width: 250px;overflow: hidden;">{{item.name}}</span>
+              <span style="color: #409EFF;width: 80px;" @click="gotoPlay(item.courseId)">进入学习</span>
             </div>
             <div class="py-2 px-6 text-sm flex">
-              <div class="w-1/2 text-left">{{item.type}}</div>
+              <div class="w-1/2 text-left">获得: {{item.getXs/10}}学时</div>
               <div class="w-1/2  text-right">年度: {{item.nd||'2022'}}</div>
             </div>
-            <div class="py-2 px-6 text-sm">
+<!--            <div class="py-2 px-6 text-sm">
               获得: {{item.getXs/10}}学时
-            </div>
+            </div> -->
             <div class="py-2 px-6 text-sm">
               总共: {{item.totalXs/10}}学时
             </div>
@@ -81,7 +81,7 @@
     data() {
       return {
         page: 1,
-        size: 12,
+        size: 6,
         total: 1,
         list: [],
         menus:{},

+ 13 - 0
src/containers/center/exam/components/util.js

@@ -56,3 +56,16 @@ export function getSelect( answers ){
   }
   return select
 }
+
+
+export function filterSelect( select ){
+  const mapData ={'1':'A','2':'B','3':'C','4':'D','5':'E','6':'F'}
+  const mlist = (''+select).split('');
+  let data = []
+  for( let i in mlist){
+    let nstr = mapData[mlist[i]]
+    if( nstr) data.push(nstr)
+  }
+  if( data.length <1) return "空"
+  return data.join(',')
+}

+ 12 - 4
src/containers/center/exam/index.css

@@ -9,7 +9,6 @@
   margin-top: 30px;
 }
 
-
 .answer-item {
   padding: 8px;
 }
@@ -77,6 +76,15 @@
 .finish {
   background-color: #add8e6 !important;
 }
+
+.correct {
+  background-color: #67c23acc !important;
+}
+
+.error {
+  background-color: #e7969659 !important;
+}
+
 .el-radio__inner{
   border: 1px solid #1c1c1d;
   border-radius: 100%;
@@ -99,11 +107,11 @@
   margin: 50px auto;
   font-size: 16px;
   font-weight: 900;
-  margin-top: 50px;
+  margin-top: 40px;
 }
 .select-item{
   padding: 0px !important;
   margin: 1px;
-  margin-top: 5px;
-  height: 36px;
+  margin-top: 2px;
+  height: 30px;
 }

+ 82 - 19
src/containers/center/exam/index.vue

@@ -8,12 +8,16 @@
                 <div slot="header" class="clearfix">
                   <span>第{{currentQuestion.index+1}}题({{currentQuestion.type|getType}})</span>
 
-                  <span style="float: right;">
+                  <span style="float: right;" v-if="!finishExamFlag">
                     <span> 剩余时间: <span class="ltime">{{end.h}}: {{end.m}}:{{end.s}}</span> </span>
+                    <el-button  type="danger" @click="submitPaper" class="ml20">交卷</el-button>
+                  </span>
 
-                    <el-button type="danger" @click="submitPaper" class="ml20">交卷</el-button>
-
+                  <span style="float: right;" v-else>
+                    <span> 我的成绩: <span class="ltime">{{info.score}} 分</span> </span>
+                    <el-button  type="primary" @click="leavePage" class="ml20">离开</el-button>
                   </span>
+
                 </div>
 
                 <div class="q-single">
@@ -24,7 +28,7 @@
 
                   <div class="answer" v-if="currentQuestion.type==1">
                     <div class="answer-item" v-for="(item,index) in currentQuestion.choice" :key="index">
-                      <el-radio v-model="radio" :label="index+1">
+                      <el-radio v-model="radio" :label="index+1" :disabled="finishExamFlag">
                         <span class="answer-title">{{transformChar[index]+'、 '+item}}</span>
                       </el-radio>
                     </div>
@@ -33,7 +37,7 @@
                   <!-- 当选题 -->
                   <div class="answer" v-if="currentQuestion.type==2">
                     <div class="answer-item" v-for="(item,index) in currentQuestion.choice" :key="index">
-                      <el-radio v-model="radio" :label="index+1">
+                      <el-radio v-model="radio" :label="index+1" :disabled="finishExamFlag">
                         <span class="answer-title">{{transformChar[index]+'、 '+item}}</span>
                       </el-radio>
                     </div>
@@ -42,12 +46,23 @@
                   <!-- 多选题 -->
                   <div class="answer" v-if="currentQuestion.type==3">
                     <div class="answer-item" v-for="(item,index) in currentQuestion.choice" :key="index">
-                       <el-checkbox  v-model="checked[index]" :label="index+1">
+                       <el-checkbox  v-model="checked[index]" :label="index+1" :disabled="finishExamFlag">
                           <span class="answer-title">{{transformChar[index]+'、 '+item}}</span>
                        </el-checkbox>
                     </div>
                   </div>
 
+                  <div class="p20" v-if="finishExamFlag">
+                    <p>
+                      答案:
+                      <span class="ml20">{{currentQuestion.result|filterSelect}}</span>
+                      <span class="ml20" > 我答案:</span>
+                      <span class="ml20" :style="{color:currentQuestion.correct?'green':'red'}"> {{(commitMap[currentQuestion.id]||'空')|filterSelect}}</span>
+                      <span class="ml20" > 结果:</span>
+                      <span class="ml20" v-if="currentQuestion.correct" style="color:green">正确</span>
+                      <span class="ml20" v-else style="color:red">错误</span>
+                    </p>
+                  </div>
 
                   <div class="mark" >
                     <el-checkbox v-model="currentQuestion.marked" @change="changeMark" :checked="currentQuestion.marked">
@@ -69,7 +84,7 @@
               <div>
                 <h3 class="p10">单项选择题</h3>
                 <el-row :gutter="24" class="ml20">
-                  <el-col :span="4" v-for="(item,index) in info.answers" :key="index" class="select-item" v-if="item.type==2">
+                  <el-col :span="3" v-for="(item,index) in info.answers" :key="index" class="select-item" v-if="item.type==2">
                     <el-button :class="'b-grid '+getStyle(index)" @click="gotoQuestion(index)" >
                        {{index+1}}
                        <span class="red">
@@ -81,7 +96,7 @@
 
                <h3 class="p10">多选题</h3>
                 <el-row :gutter="24" class="ml20">
-                  <el-col :span="4" v-for="(item,index) in info.answers"   :key="index" class="select-item" v-if="item.type==3">
+                  <el-col :span="3" v-for="(item,index) in info.answers"   :key="index" class="select-item" v-if="item.type==3">
                     <el-button :class="'b-grid '+getStyle(index)" @click="gotoQuestion(index)" >
                        {{index+1}}
                        <span class="red">
@@ -93,7 +108,7 @@
 
                 <h3 class="p10">判断题</h3>
                 <el-row :gutter="24" class="ml20">
-                  <el-col :span="4" v-for="(item,index) in info.answers"  :key="index" class="select-item" v-if="item.type==1">
+                  <el-col :span="3" v-for="(item,index) in info.answers"  :key="index" class="select-item" v-if="item.type==1">
                     <el-button :class="'b-grid '+getStyle(index)" @click="gotoQuestion(index)" >
                        {{index+1}}
                        <span class="red">
@@ -108,7 +123,7 @@
         </el-row>
      </div>
 
-    <my-dialog style="margin-top:20vh" :dialogVisible="dialogVisible" :info="info" :start="start" :end="end" @leavePage="leavePage" >
+    <my-dialog style="margin-top:20vh" :dialogVisible="dialogVisible" :info="info" :start="start" :end="end" @leavePage="finishExam" >
 
 
     </my-dialog>
@@ -119,7 +134,7 @@
 import { Message, MessageBox } from "element-ui";
 import {httpServer } from "@/components/httpServer/httpServer.js";
 import md5 from 'js-md5';
-import { getTime, packTime, time2str, saveExam, getExam,getSelect,delExam } from "./components/util.js";
+import { getTime, packTime, time2str, saveExam, getExam,getSelect,delExam,filterSelect } from "./components/util.js";
 import headline from "./components/headline.vue";
 import myDialog from "./components/my-dialog.vue";
 const defAnswer = [false,false,false,false,false];
@@ -133,16 +148,18 @@ export default {
     getType( val ){
       const d = {1:'判断题', 2:'单选题', 3:'多选题'}
       return d[val]
-    }
+    },
+    filterSelect
   },
   data() {
     return {
       uuid:0,
       examId:0,
+      finishExamFlag: false,
       startExam: false,
       dialogVisible: false,
       info: {},
-      currentQuestion: {index:0, choice: [], marked: false},
+      currentQuestion: {index:0, choice: [], marked: false,correct:false},
       questionList: [],
       questionLen: 0,
       questionType: '单选题',
@@ -206,13 +223,15 @@ export default {
       this.currentQuestion.marked = !!item.marked
     },
     loadQuestion( index ) {
+      let examId = this.info.examId;
       let item = this.questionList[index];
       item.index = index;
-      if( !item.title ){
+      let reloadFlag = (this.info.endTime>0 && item.result===0) || !item.title;
+      if( reloadFlag ){
         let {id} = item;
-        httpServer("course.loadAnswer", {id} ).then(res => {
+        httpServer("course.loadAnswer", {id, examId} ).then(res => {
           if( res.code != 200) return;
-          Object.assign( item, res.data)
+          Object.assign( item, res.data, {id})
           this.doLoadQuestion( item )
         })
       }else{
@@ -227,9 +246,13 @@ export default {
     getStyle: function(i) {
       let item = this.questionList[i];
       let select = getSelect( item.answer )
+      if( this.info.endTime >0 ){
+        return item.correct?'correct':'error';
+      }
       return select ? "finish" : "unfinish";
     },
     checkCommit( ){
+      if( this.info.endTime ) return;
       let {id, answer, exmaId} = this.currentQuestion
       let select = getSelect(answer);
       if( !select ) return
@@ -239,6 +262,31 @@ export default {
         this.commitMap[id] = select;
       })
     },
+    updateResult( resultList ){
+      let results = {};
+      for( let i in resultList){
+        let item = resultList[i]
+        results[item.answerId] = item;
+      }
+      for( let index in this.questionList){
+        let question = this.questionList[index];
+        if( question.answerId>0){
+          let result = results[question.answerId]
+          if(result){
+            question.result = result.answer
+            question.correct = !!result.correct
+            this.questionList[index] = question
+            this.commitMap[question.id] =  result.result;
+          }
+        }
+      }
+      saveExam( this.info, this.questionList );
+    },
+    finishExam(){
+      this.timer &&  window.clearInterval(this.timer);
+      this.finishExamFlag = true;
+      this.dialogVisible = false;
+    },
     leavePage(){
       let courseId = this.info.courseId
       this.timer &&  window.clearInterval(this.timer);
@@ -261,7 +309,6 @@ export default {
             done();
             instance.confirmButtonLoading = false;
             that.dialogVisible = true;
-
           } else{
             done();
           }
@@ -276,8 +323,10 @@ export default {
           let { score, useTime } = res.data;
           this.info.score = score;
           this.info.useTime = useTime;
+          this.info.endTime = parseInt(Date.now()/1000);
           this.info.isFinish = 1;
           this.timer &&  window.clearInterval(this.timer);
+          this.updateResult( res.data.result ||[])
         }
       });
     },
@@ -298,10 +347,14 @@ export default {
     doStartExam( info ){
       this.info = info
       this.questionList = info.answers
+      for( let i in this.questionList){
+        let question = this.questionList[i]
+        if( question.answer ) this.commitMap[question.id] = getSelect( question.answer )
+      }
+      this.finishExamFlag = info.endTime>0;
       this.loadQuestion(0);
       this.startTime = info.startTime;
-      saveExam( this.info, this.questionList );
-      this.initTimer();
+      !this.finishExamFlag && this.initTimer();
     }
   },
   destroyed(){
@@ -337,6 +390,7 @@ export default {
       if (this.currentQuestion){
         this.currentQuestion.answer = answer;
         this.questionList[ this.currentQuestion.index].answer = answer
+        saveExam( this.info, this.questionList)
         this.checkCommit()
        }
     },
@@ -345,6 +399,7 @@ export default {
       if (this.currentQuestion) {
         this.currentQuestion.answer = answer;
         this.questionList[ this.currentQuestion.index].answer = answer
+        saveExam( this.info, this.questionList)
         this.checkCommit()
       }
     }
@@ -355,4 +410,12 @@ export default {
 <style lang="css">
   @import url("./index.css");
   @import url("../../../assets/css/base.css");
+  .el-radio__input.is-disabled+span.el-radio__label {
+    color: #333;
+    cursor: not-allowed;
+  }
+  .el-checkbox__input.is-disabled+span.el-checkbox__label {
+    color: #333;
+    cursor: not-allowed;
+}
 </style>

+ 3 - 3
src/containers/center/home/index.vue

@@ -6,10 +6,10 @@
         <div class="text-xl leading-10 pb-4 text-blue">
           <p>最近学习课程</p>
         </div>
-        <div class="clear mt20">
-          <el-row :gutter="12" v-if="list && list.length > 0" >
+        <div class="clear mt10">
+          <el-row :gutter="12" v-if="list && list.length > 0">
             <el-col  v-for="item in list" :key="item.courseId"  :span="8">
-              <el-card class="mt20">
+              <el-card>
                 <div slot="header" class="clearfix">
                   <span>{{item.name}}</span>
                   <el-button style="float: right; padding: 3px 0" @click="gotoPlay(item.courseId)" type="text">前往</el-button>

+ 27 - 132
src/containers/center/market/index.vue

@@ -5,10 +5,16 @@
         <p>推荐课程</p>
       </div>
 
-      <el-tabs @tab-click="handleClick">
+      <!-- <el-tabs @tab-click="handleClick">
         <template  v-for="item in typeList" >
           <el-tab-pane v-if="item.isOpen" :key="item.id" :label="item.name"></el-tab-pane>
         </template>
+      </el-tabs> -->
+
+      <el-tabs @tab-click="handleClick">
+        <template >
+          <el-tab-pane  label="三明市建设机械设备行业协会特种作业操作人员岗位培训课程"></el-tab-pane>
+        </template>
       </el-tabs>
 
       <!-- <ul class="pt-line mt20">
@@ -28,20 +34,22 @@
               <el-tag class="absolute right-2 top-2" v-else-if="!item.is_pass">在学习中</el-tag>
               <el-tag class="absolute right-2 top-2" type="success" v-else>已经完成</el-tag>
             </div>
-            <div class="flex py-2 px-4  items-center justify-between">
+            <div class="flex py-4 px-4  items-center justify-between">
               <span>{{item.name}}</span>
-              <el-button type="text" @click="gotoPlay(item.course_id)" v-if="item.is_pay==1">进入学习</el-button>
-              <el-button type="text" @click="goPay(index)" v-else-if="item.is_pay==2 || !!item.buyImg">补充材料</el-button>
-              <el-button type="text" @click="goPay(index)" v-else>购买课程</el-button>
+              <span style="color: #409EFF;" @click="gotoPlay(item.course_id)" v-if="item.is_pay==1">进入学习</span>
+              <span style="color: #409EFF;" @click="goPay(index)" v-else-if="item.is_pay==2 || !!item.buyImg">补充材料</span>
+              <span style="color: #409EFF;" @click="goPay(index)" v-else>购买课程</span>
             </div>
             <div class="py-2 px-6 text-sm flex">
-              <div class="w-1/2 text-left">{{item.type}}</div>
+              <div class="w-1/2 text-left">学时: {{item.xs/10}}</div>
               <div class="w-1/2  text-right">年度: {{item.nd||'2022'}}</div>
             </div>
             <div class="py-2 px-6 text-sm flex">
-              <div class="w-1/2">费用: ¥{{item.fee/100}}元</div>
-              <div class="w-1/2 text-right">学时: {{item.xs/10}}</div>
             </div>
+        <!--    <div class="py-2 px-6 text-sm flex">
+              <div class="w-1/2">费用: ¥{{item.fee/100}}元</div>
+              <div class="w-1/2">学时: {{item.xs/10}}</div>
+            </div> -->
           </el-card>
         </el-col>
       </el-row>
@@ -49,60 +57,12 @@
         暂无信息
       </div>
 
-      <!-- <ul class="m-course-list clear mt10 classlist" v-if="total>0">
-        <li v-for="(item,index) in list" :key="item.course_id" class="pt-sola mt20 pb10">
-          <div>
-            <span v-if="item.isFinish==1" class="p-ico2 ico-passed"></span>
-            <div class="img">
-              <img :src="item.tb">
-              <div class="year-label ng-binding">
-                <span v-if="item.is_pay==0 && item.buyImg =='' && item.payNo == ''">
-                  还未购买
-                </span>
-                <span v-else-if="item.is_pay==0" style="background-color: orange;">
-                  等待审核
-                </span>
-                <span v-else-if="item.is_pay==2" style="background-color: #78335F;">申请驳回</span>
-                <span v-else-if="!item.is_pass" style="background-color: blue;padding: 2px;border-radius: 2px;">在学习中</span>
-                <span v-else style="background-color: green;padding: 2px;border-radius: 2px;">已经完成</span>
-              </div>
-
-              <div class="hover-block">
-                <div class="mask-bg"></div>
-                <el-button @click="gotoPlay(item.course_id)" v-if="item.is_pay==1" class="ui-btn">进入学习</el-button>
-
-                <el-button @click="goPay(index)" v-else-if="item.is_pay==2 || !!item.buyImg" class="ui-btn btn-o">补充材料</el-button>
-                <el-button @click="goPay(index)" v-else class="ui-btn btn-o">购买课程</el-button>
-              </div>
-            </div>
-
-            <div class="tit"><a>{{item.name}}</a></div>
-            <div class="info">
-              <p class="w1"><span class="p-ico c1"></span> {{item.type}}</p>
-              <p class="w2"><span class="p-ico c2"></span>{{item.nd||'2020'}}</p>
-              <p class="w1">
-                <span class="p-ico c5"></span> ¥{{item.fee/100}}元
-              </p>
-              <p class="w2">
-                <span class="p-ico c3"></span> {{item.xs/10}}学时
-              </p>
-            </div>
-          </div>
-        </li>
-      </ul> -->
-
       <el-pagination  v-if="total" class="m-pages" @current-change="handleCurrentChange" :current-page="page" :page-size="size"
         layout="total, prev, pager, next" :total="total">
       </el-pagination>
 
     </div>
 
-    <el-dialog class="fc tc" :visible.sync="loginDialog" :close-on-click-modal="false" width="500px" @close="loginDialog=false">
-      <div class="login-dialog m-login">
-        <un-login @login="login"></un-login>
-      </div>
-    </el-dialog>
-
 
     <el-dialog title="申请开通课程"  :visible.sync="buyCourseDialog" :append-to-body="true"
     width="800px" top="20px" align="center">
@@ -170,69 +130,9 @@
             <el-button @click="buyCourse" type="primary">确 定</el-button>
           </el-form-item>
         </el-row>
-
       </el-form>
-
-    </el-dialog>
-
-
-
-    <el-dialog title="承诺书" class="fc tc" :visible.sync="commitmentDialog">
-
-        <div>
-          <div v-if="type=='施工现场专业人员'">
-            <div class="commitment-header"> 致:三明市城市建设项目服务中心 </div>
-            <div class="tl commitment">
-                {{promise.promise_edu}}
-            </div>
-            <div class="commitment-footer">
-              特此诺书!
-            </div>
-          </div>
-
-          <div v-else-if="type=='建筑施工企业特种作业人员'">
-            <div class="tl commitment">
-              {{promise.promise_special}}
-            </div>
-
-          </div>
-
-
-          <div v-else-if="type=='园林绿化技术工人'">
-            <div class="tl commitment">
-              {{promise.promise_plant}}
-            </div>
-          </div>
-
-          <div v-else>
-            <div class="tl commitment">
-              {{promise.promise_other}}
-            </div>
-          </div>
-
-
-          <div class="tl commitment-content mt20">
-            <el-radio-group v-model="isCommitment">
-              <el-row class="mt10">
-                <el-radio :label="true">本人作出上述承诺</el-radio>
-              </el-row>
-              <el-row class="mt10">
-                <el-radio :label="false">本人不作出上述承诺</el-radio>
-              </el-row>
-            </el-radio-group>
-          </div>
-
-          <span slot="footer" class="dialog-footer">
-            <el-button @click="commitmentDialog = false">取 消</el-button>
-            <el-button type="primary" :disabled="isCommitment?false:true" @click="buyCourseDialog=true">确 定</el-button>
-          </span>
-        </div>
-
     </el-dialog>
 
-    <el-dialog append-to-body close-on-click-modal :visible.sync="showImgDialog" style="margin-top: 0px;" :width="width">
-      <img :src="imgUrl" @load="onLoad" alt="" />
-    </el-dialog>
   </div>
 </template>
 
@@ -263,7 +163,7 @@
     data() {
       return {
         page: 1,
-        size: 9,
+        size: 6,
         total: 0,
         stage: 0,
         isCompanyPay: 0,
@@ -363,10 +263,16 @@
       }
     },
     beforeMount() {
-      this.type = this.$route.query.type||'施工现场专业人员'
+      this.type = this.$route.query.type
       if (!this.type && this.typeList.length > 0) {
-        this.type = this.typeList[0].name
-        this.getData()
+        for( let i in this.typeList){
+          let item = this.typeList[i];
+          if( item.isOpen ==1){
+            this.type = item.name
+            this.getData()
+            return;
+          }
+        }
       }
     },
     beforeDestroy() {
@@ -374,7 +280,7 @@
     },
     methods: {
       handleClick(tab){
-        this.type = tab.label;
+        // this.type = tab.label;
       },
       showImg(url) {
         if (!url) return;
@@ -438,23 +344,12 @@
         this.buyForm = Object.assign({}, item)
         this.buyForm.company = this.userInfo.company;
         this.buyForm.temp = item;
-
-        // 绕开检查
-        // this.stage = 2;
-        // this.isCompanyPay = 0;
-        // this.isCommitment=''
-        // this.buyForm.rzCode = item.rzCode;
-        // this.buyForm.company = 'ssss';
-        // this.buyForm.courseName = item.courseName;
-        // this.commitmentDialog = true;
-        // 检查
         httpServer("weixin.docheckpay", {
           courseId: item.course_id
         }).then((res) => {
           if (res.code == 200) {
             this.stage = 2;
             this.isCompanyPay = 0;
-            this.isCommitment=''
             Object.assign( this.buyForm, res.data);
             this.commitmentDialog = true;
           }

+ 9 - 13
src/containers/center/myOrder/index.vue

@@ -8,36 +8,36 @@
 
         <el-table v-loading="listLoading" :data="list" border fit highlight-current-row>
 
-          <el-table-column label="交易订单" >
+          <el-table-column label="交易订单" width="110" align="center">
             <template slot-scope="{row}">
               <span>{{row.id}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="培训内容" >
+          <el-table-column label="培训内容" align="center">
             <template slot-scope="{row}">
               <span>{{row.name}}</span>
             </template>
           </el-table-column>
 
-          <el-table-column label="证书类型" >
+          <el-table-column label="证书类型" align="center">
             <template slot-scope="{row}">
-              <span>{{row.type}}-{{row.nd}}</span>
+              <span>{{row.type}}</span>
             </template>
           </el-table-column>
 
-          <el-table-column label="学">
+          <el-table-column label="学习年度" align="center" width="110">
             <template slot-scope="{row}">
-              <span>{{row.totalXs/10}}</span>
+              <span>{{row.nd}}</span>
             </template>
           </el-table-column>
 
-          <el-table-column label="金额(元)">
+          <el-table-column label="学时" align="center" width="110">
             <template slot-scope="{row}">
-              <span>{{ row.fee|money }} </span>
+              <span>{{row.totalXs/10}}</span>
             </template>
           </el-table-column>
 
-          <el-table-column label="订单状态" min-width="120">
+          <el-table-column label="订单状态" align="center" width="110">
             <template slot-scope="{row}">
               <span v-if="row.isPay==1" style="color: green;">支付完成</span>
               <span v-if="row.isPay==0" >待审核</span>
@@ -47,10 +47,6 @@
             </template>
           </el-table-column>
         </el-table>
-        <div class="mb10 mt20 text-xs text-right text-red-400">
-          <span class="p-ico2 worm-ico-o"></span>
-          注:未付款的订单设置3小时时限,3小时过后未付的订单就不再显示。
-        </div>
 
         <el-pagination
           class="m-pages"

+ 17 - 21
src/containers/center/play/components/media.vue

@@ -30,6 +30,7 @@
         tickNum: 0,
         prevTime:0,
         isReady:false,
+        onblurTime: 0,
         onPlay: false
       }
     },
@@ -44,24 +45,7 @@
         }
       }
     },
-    props: {
-      media:{
-        type: Object,
-        default: ()=>{
-          return {id: '', percent:0}
-        }
-      },
-      dialog:{
-        type: Boolean,
-        default: true
-      },
-      options: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      }
-    },
+    props: ['media', 'dialog', 'options'],
     beforeDestroy() {
       if (this.timer) {
         clearInterval(this.timer); //关闭
@@ -74,7 +58,7 @@
     },
     created() {
       this.timer = setInterval(this.tick, 5 * 1000);
-      // this.startMonitor();
+      this.startMonitor();
     },
     methods: {
       playerReadied(player) {
@@ -123,6 +107,7 @@
         this.onPlay = false
       },
       doPlay(){
+        this.updateBlurtime()
         if( !this.$refs.videoPlayer || !this.$refs.videoPlayer.player ) return;
         if( !this.dialog ) return this.doPause();
         let myPlayer = this.$refs.videoPlayer.player;
@@ -133,13 +118,18 @@
       onPlayerStart() {
         this.onPlay = true
       },
+      updateBlurtime(){
+         this.onblurTime = Date.now() + 15*60 * 1000
+      },
       startMonitor() {
         let that = this
         window.onblur = function() {
-          that.doPause()
+          that.updateBlurtime()
+          // that.doPause()
         }
         window.onfocus = function () {
-          that.doPlay()
+          that.updateBlurtime()
+          // that.doPlay()
         }
       },
       tickWait(){
@@ -164,9 +154,15 @@
       tick( force = false) {
         let media = this.media;
         this.tickNum ++
+        console.log("tick", this.onblurTime )
+        if( this.onblurTime < Date.now() ){
+          this.tickWait();
+          return
+        }
         // 已经完成
         if( this.media.isFinish )  return;
 
+
         // 主动暂停
         let myPlayer = this.$refs.videoPlayer.player;
         let curTimes = parseInt(myPlayer.currentTime());

+ 65 - 57
src/containers/center/play/index.vue

@@ -2,51 +2,51 @@
   <div class="m-right-block fr mh576">
 
     <el-row class="p20">
-
-      <el-col :lg="16" :md="16" :span="16">
-        <div class="flex">
-          <img :src="tpl.tb" style="height: 150px;" />
-          <div style="margin-left: 20px;margin-top: -8px;">
-            <div v-if="tpl.examGroupId>0">
-              <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" v-if="tpl.examGroupId==0">学完所有课程,即可打印学时证明</p>
-
-              <div>
-                <el-button type="primary" class="mt10" style="font-size: 14px;" @click="startExam"
-                  v-if="tpl.examGroupId>0">
-                  参加考试
-                </el-button>
-                <el-button type="primary" class="mt10" style="font-size: 14px;" @click="printCert">
-                  学时证明
-                </el-button>
-              </div>
-            </div>
-            <div v-else>
-              <p class="mt10">岗位类别:{{tpl.type}} </p>
-              <p class="mt10">报考岗位:{{tpl.name}} </p>
-              <p class="mt10">学习年度:{{tpl.nd}} </p>
-              <el-button type="warning" class="mt20" style="font-size: 14px;" @click="printCert">
-                打印学时证明
-              </el-button>
-            </div>
-          </div>
+      <el-col :span="6">
+        <img :src="tpl.tb" width="200px" style="border-radius: 20px;" />
+      </el-col>
+      <el-col :span="6">
+        <div>
+          <p style="font-size: 24px;"> 课程信息 </p>
+          <p class="mt10">岗位名称:{{tpl.name}} </p>
+          <p class="mt10">课程学时:<strong style="color: red;">{{tpl.xs/10}} </strong>学时
+          </p>
+          <p class="mt10" v-if="tpl.examGroupId">课程年度:
+            <strong style="color: red;">{{tpl.nd}} </strong>
+          </p>
         </div>
       </el-col>
-
-      <el-col :lg="4" :md="4" :span="4">
-        <el-progress class="mprocess" type="circle" :width="150" :format="formatFinish" :stroke-width="18"
-          :percentage="info.percent">
-        </el-progress>
-
+      <el-col :span="6">
+        <div>
+          <p style="font-size: 24px;"> 学习信息 </p>
+          <p class="mt10">学习情况:
+            完成 <strong style="color: red;">{{info.getXs/10}} </strong>
+            共计 <strong style="color: red;">{{info.totalXs/10}}</strong>
+          </p>
+          <p class="mt10" v-if="tpl.examGroupId">最高分数:
+            <strong style="color: red;">{{info.score}} </strong>
+            分
+          </p>
+          <p class="mt10" v-if="tpl.examGroupId">开始时间:
+            <strong style="color: red;">{{info.startDate}} </strong>
+          </p>
+        </div>
       </el-col>
 
-      <el-col :lg="4" :md="4" :span="4">
-        <el-progress class="mprocess" type="circle" :width="150" :format="formatMedia" :stroke-width="18"
-          :percentage="0">
-        </el-progress>
+      <el-col :span="6">
+          <p>
+          <el-button type="primary" class="mt10" style="font-size: 14px;"  @click="startExam" v-if="tpl.examGroupId>0">
+            模拟练习
+          </el-button>
+</p><p>
+          <el-button type="success" class="mt10" style="font-size: 14px;"  @click="startExamTest" v-if="tpl.examGroupId>0">
+            在线练习
+          </el-button>
+</p><p>
+          <el-button type="warning" class="mt10" style="font-size: 14px;"  @click="printCert">
+            学时证明
+          </el-button>
+          </p>
       </el-col>
 
     </el-row>
@@ -85,8 +85,8 @@
             <el-table-column label="学习进度" prop="useTime" align="left" width="220">
               <template v-slot="{row}">
                 <span style="display: flex;">
-                  <el-progress type="line" style="width: 120px;" :stroke-width="26" :text-inside="true"
-                    :show-text="false" :percentage="row.percent" :class="row.percent|showProgressColor">
+                  <el-progress type="line" style="width: 120px;" :stroke-width="26" :text-inside="true" :show-text="false"
+                    :percentage="row.percent" :class="row.percent|showProgressColor">
                   </el-progress>
                   <span style="margin-left: 10px;"> {{row.percent}}% </span>
                 </span>
@@ -110,8 +110,8 @@
     <el-dialog class="fc tc media-dialog" :visible.sync="mediaDialog" append-to-body top="50px" :title="media.name"
       :close-on-click-modal="false" width="640px">
 
-      <Media :options="options" :dialog="mediaDialog" :media="media" :duration="info.duration"
-        @close="mediaDialog=false" @update="update">
+      <Media :options="options" :dialog="mediaDialog" :media="media" :course="info"  @close="mediaDialog=false"
+        @update="update">
       </Media>
       <span slot="footer" class="dialog-footer mt5">
         <el-button type="warning" @click="mediaDialog=false">退出播放</el-button>
@@ -135,6 +135,15 @@
       </div>
     </el-dialog>
 
+    <el-dialog class="previewDialog" :visible.sync="testExamDalog"
+      :title="'在线练习-'+tpl.name"
+       center
+       style="color:red"
+       top="50px" width="1024px"
+       @close="testExamDalog=false">
+       <ICourseAnswerTest :info="info" :tpl="tpl" :groupId="examGroupId" > </ICourseAnswerTest>
+     </el-dialog>
+
   </div>
 </template>
 
@@ -144,6 +153,7 @@
   } from "@/components/httpServer/httpServer.js";
   import Media from "./components/media.vue";
   import ExamList from "./components/ExamList.vue";
+  import ICourseAnswerTest from "./components/iCourseAnswerTest.vue";
   import {
     getPercent
   } from '@/utils/index.js'
@@ -156,17 +166,16 @@
     data() {
       return {
         courseId: 0,
+        examGroupId:0,
         show: 1,
         mediaDialog: false,
         mediaType: 'hls',
         mediaUrl: '',
         editRzcode: false,
+        testExamDalog: false,
         info: {
           score: 0,
-          percent: 0,
-          fcount: 0,
-          tcount: 0,
-          tpercent: 0
+          percent: 0
         },
         tpl: {},
         media: {},
@@ -199,6 +208,7 @@
     },
     components: {
       Media,
+      ICourseAnswerTest,
       ExamList
     },
     beforeMount() {
@@ -247,6 +257,10 @@
         delExam()
         this.$router.push(`/center/exam/${courseId}`);
       },
+      startExamTest( ){
+        this.examGroupId = this.tpl.examGroupId;
+        this.testExamDalog = true;
+      },
       printCert() {
         if (this.info.getXs < this.info.totalXs) {
           this.$message.errorMsg("课程还未完成", 2)
@@ -300,11 +314,7 @@
           axs
         } = this.info;
         if (!axs) axs = 1;
-        return `学时:${gxs}/${axs}`;
-      },
-      formatMedia() {
-        let info = this.info
-        return `视频:${info.fcount}/${info.tcount}`;
+        return `获得${gxs}学时, 总共${axs}学时`;
       },
       formatExam() {
         let {
@@ -382,9 +392,7 @@
           data,
           code
         }) => {
-          console.log("media", data)
-          this.mediaUrl = data.mediaUrl
-          item.position = data.position || 0
+          this.mediaUrl = data
           this.mediaType = 'hls';
           this.options.sources = [{
             src: this.mediaUrl,

+ 2 - 2
src/containers/center/setting/index.vue

@@ -72,13 +72,13 @@
                     </el-form-item>
                   </li>
                   <li>
-                    <el-form-item label="毕业">
+                    <el-form-item label="毕业">
                       <img :src="userInfo.graduateImg" :onerror="errorImg" class="setting-img" @click="showImg(userInfo.graduateImg)">
                       <do-upload @onFinish="setGraduateImg" placeholder="上传毕业证"> </do-upload>
                     </el-form-item>
                   </li>
                   <li class="txt-r">
-                    <span class="l-t"></span>注:<i></i>只有头像、性别、毕业可以修改
+                    <span class="l-t"></span>注:<i></i>只有头像、性别、毕业可以修改
                   </li>
                   <li class="mt20">
                     <span class="l-t"></span>

+ 7 - 23
src/containers/center/sign/index.vue

@@ -7,34 +7,23 @@
       <div  class="ng-scope">
 
         <el-table v-loading="listLoading" :data="list" border fit highlight-current-row>
-          <el-table-column label="培训内容" align="center" width="100" >
+          <el-table-column label="培训内容" align="center"  min-width="120">
             <template slot-scope="{row}">
               <span>{{row.name}}</span>
             </template>
           </el-table-column>
 
-          <el-table-column label="证书类型" align="center" width="150">
+          <el-table-column label="学习年度" align="center" >
             <template slot-scope="{row}">
-              <span>{{row.type}}【{{row.nd}}</span>
+              <span>{{row.nd}}</span>
             </template>
           </el-table-column>
 
-          <el-table-column label="证书编号"  align="center" width="160">
-            <template slot-scope="{row}">
-              <span>{{row.rzCode||'---'}}</span>
-            </template>
-          </el-table-column>
-
-          <el-table-column label="学时" width="80" align="center">
-            <template slot-scope="{row}">
-              <span>{{row.totalXs/10}}</span>
-            </template>
-          </el-table-column>
 
 
-          <el-table-column label="费用(元)" align="center" width="80">
+          <el-table-column label="学时" align="center">
             <template slot-scope="{row}">
-              <span>¥{{ row.fee/100 }}</span>
+              <span>{{row.totalXs/10}}</span>
             </template>
           </el-table-column>
 
@@ -47,17 +36,12 @@
 
           <el-table-column label="操作" fixed="right" align="center" min-width="80">
             <template slot-scope="{row}">
-              <el-button v-if="row.signUrl" @click="showSign(row.signUrl )" type="primary" size="small">打印证书</el-button>
-              <el-button v-else  @click="printCert( row )" type="warning" size="small">生成证书</el-button>
+              <el-button v-if="row.signUrl" @click="showSign(row.signUrl )" type="primary" size="small">打印学时证明</el-button>
+              <el-button v-else  @click="printCert( row )" type="warning" size="small">生成学时证明</el-button>
             </template>
           </el-table-column>
         </el-table>
 
-        <div class="mb10 mt20 text-xs text-right text-red-400">
-          <span class="p-ico2 worm-ico-o"></span>
-          注:<span class="txt-o"></span>拥有证书编号才能打印证书
-        </div>
-
         <el-pagination
           class="m-pages"
             @current-change="handleCurrentChange"

+ 82 - 25
src/containers/login/components/friendlink/friendlink.vue

@@ -1,46 +1,103 @@
 <template>
-  <div class="youlian_mian">
-    <div class="friendship">
-      <ul>
-        <a href="http://www.mohurd.gov.cn/" target="_blank" style="height: 69px;overflow: hidden;">
+  <div>
+    <div>
+      <el-row :gutter="20">
+        <el-col :span="6" class="py-4 px-2" v-for="(item, index) in links" :key="index">
+          <el-button class="p20" style="width: 100%; border-radius: 10px;font-weight: 900;font-size: 16px;"
+            @click="goto(item.link)" :type="item.type">
+            {{ item.name }}
+          </el-button>
+        </el-col>
+      </el-row>
+
+      <!--  <ul>
+        <a href="http://220.160.52.164:9081/portalWeb/webPortal/toIndexPage" target="_blank" >
           <li>
-            <img alt=""  src="/static/images/friendlink/zhujianbu.png" />
+            <img alt=""  src="/static/images/friendlink/福建省建设从业人员综合服务平台.jpg" />
           </li>
         </a>
-        <a href="http://rcgz.mohurd.gov.cn" target="_blank"  style="height: 69px;overflow: hidden;">
+
+
+        <a href="http://zjj.sm.gov.cn/" target="_blank" >
           <li>
-            <img alt=""
-              src="/static/images/friendlink/congyeguanli.png" />
+            <img alt="" src="/static/images/friendlink/三明市住房和城乡建设局.jpg"  />
           </li>
         </a>
 
-        <a href="http://220.160.52.164:9081/portalWeb/webPortal/toIndexPage" target="_blank" style="height: 69px;overflow: hidden;">
+        <a href="http://110.83.229.16:8123/gaia/peelLogin.html" target="_blank" >
           <li>
-            <img alt="" src="/static/images/friendlink/fjjscyry.png"  />
+            <img alt=""
+              src="/static/images/friendlink/三明市住房和城乡建设行政审批系统.jpg" />
           </li>
         </a>
 
-        <a href="http://zjj.sm.gov.cn/" target="_blank" style="height: 69px;overflow: hidden;">
+
+
+        <a href="https://sm.hqedust.com" target="_blank" >
           <li>
-            <img src="/static/images/friendlink/sm.png" />
+            <img src="/static/images/friendlink/三明市建设人才服务中心.jpg" />
           </li>
         </a>
-      </ul>
+      </ul> -->
     </div>
   </div>
 </template>
 
+<script>
+  export default {
+    data() {
+      return {
+        links: [{
+            name: "福建省建设从业人员综合服务平台",
+            link: "http://220.160.52.164:9081/portalWeb/webPortal/toIndexPage",
+            type:"primary"
+          },
+          {
+            name: "三明市住房和城乡建设局",
+            link: "http://zjj.sm.gov.cn/",
+            type:"primary"
+          },
+          {
+            name: "三明市住房和城乡建设行政审批系统",
+            link: "http://110.83.229.16:8123/gaia/peelLogin.html",
+            type:"primary"
+          },
+          {
+            name: "三明市建设人才服务中心",
+            link: "https://sm.hqedust.com",
+            type:"primary"
+          }
+        ],
+      }
+    },
+    methods: {
+      goto(link){
+        window.open( link, '_brank')
+      }
+    }
+  }
+</script>
 <style scoped>
-.friendship {
-  margin-top:20px;
-  height: 100px;
-}
-.friendship ul {
-  display: flex;
-  justify-content: space-between;
-}
-.friendship ul li img {
-  /* width: 100%; */
-  width: 280px;
-}
+  .friendship {
+    margin-top: 20px;
+    height: 100px;
+  }
+
+  .friendship ul {
+    display: flex;
+    justify-content: space-between;
+  }
+
+  .friendship ul a {
+    /* height: 70px; */
+    padding: 8px;
+
+    /* overflow: hidden; */
+  }
+
+  .friendship ul li img {
+    /* width: 100%; */
+    border-radius: 5px;
+    width: 260px;
+  }
 </style>

+ 1 - 1
src/containers/login/components/unLogin.vue

@@ -7,7 +7,7 @@
         <div class="p-4">
           <el-form class="form">
             <el-form-item>
-              <el-input placeholder="手机号" v-model="username">
+              <el-input placeholder="手机号|身份证" v-model="username">
                 <template slot="prepend"><i class="el-icon-user"></i></template>
               </el-input>
             </el-form-item>

+ 7 - 0
src/containers/login/login.vue

@@ -39,6 +39,13 @@
           </el-table-column>
         </el-table>
       </div>
+
+    </div>
+    <div class="p-wrap-full ng-scope mt30">
+      <div class="title-box mt5">
+        <h1 class="title" style="font-size: 20px;color: #3876da">友情链接</h1>
+      </div>
+      <friendlink></friendlink>
     </div>
     <el-dialog
       class="fc tc login-dialog"

+ 3 - 2
src/containers/post/info.vue

@@ -3,8 +3,9 @@
     <navbar :user="userInfo"></navbar>
     <div style="width: 1094px;background-color: white;margin: 0 auto; border-radius: 10px;">
       <div class="postDialog">
-        <h1 class="tc mt20" style="font-size: 50px; color: #000000;">
-        {{postInfo.title}}
+        <h1 class="tc mt20" style="font-size: 35px; color: #000000;">
+          {{postInfo.title}}
+          <el-button type="text" class="ml20" @click="$router.go(-1)">返回</el-button>
         </h1>
         <h2 class="tc mt20" style="font-size: 30px;">
           发布时间:{{postInfo.publishTime}}

+ 1 - 1
src/main.js

@@ -12,7 +12,7 @@ import { store } from '@/store/index'
 import md5 from 'js-md5';
 Vue.prototype.$md5 = md5;
 
-import '@babel/polyfill/noConflict'
+import '@babel/polyfill'
 require('es6-promise').polyfill()
 
 import './icons' // icon

+ 4 - 4
src/settings.js

@@ -1,11 +1,11 @@
 module.exports = {
-  title: '福建省哲睿网络科技有限公司'
+  title: '三明市建设机械设备行业协会'
   ,exam:{
-    username:'福建省哲睿网络科技有限公司'
+    username:'三明市建设机械设备行业协会'
     ,bankName: '中国银行厦门市分行'
     ,bankNo:'414360427410'
-    ,promise:'本人自愿选择参加福建省哲睿网络科技有限公司组织的施工现场专业人员岗位培训,对报名相关条件、提交的材料及收费情况均已知晓!且所提交的材料真实有效,如有存在虚假,所导致的一切后果由本人承担。'
+    ,promise:'本人自愿选择参加建设从业人员继续教育系统服务平台组织的施工现场专业人员岗位培训,对报名相关条件、提交的材料及收费情况均已知晓!且所提交的材料真实有效,如有存在虚假,所导致的一切后果由本人承担。'
   }
   ,email:'1015067257@qq.com'
   ,outLink: 'http://220.160.52.164:9081/portalWeb/fwZhcx/toFwZhcxPage?code=zscx'
-}
+}

+ 8 - 1
src/tailwind.css

@@ -510,6 +510,9 @@ Ensure the default browser behavior of the `hidden` attribute.
 .top-2 {
   top: 0.5rem;
 }
+.top-4 {
+  top: 1rem;
+}
 
 .right-2 {
   right: 0.5rem;
@@ -705,6 +708,10 @@ Ensure the default browser behavior of the `hidden` attribute.
   padding-top: 0.5rem;
   padding-bottom: 0.5rem;
 }
+.py-4 {
+  padding-top: 1rem;
+  padding-bottom: 1rem;
+}
 
 .px-4 {
   padding-left: 1rem;
@@ -887,4 +894,4 @@ Ensure the default browser behavior of the `hidden` attribute.
 .hover\:text-blue-light:hover {
   --tw-text-opacity: 1;
   color: rgb(85 132 209 / var(--tw-text-opacity));
-}
+}

+ 1 - 1
sync.bat

@@ -1,2 +1,2 @@
-go run build.go -dir=study_sm
+go run build.go -dir=study_jj
 pause