y595705120 před 10 měsíci
rodič
revize
779c45bc84

+ 1 - 0
.gitignore

@@ -12,3 +12,4 @@ yarn-error.log*
 *.ntvs*
 *.njsproj
 *.sln
+/publish

+ 1 - 1
config/index.js

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

+ 135 - 0
src/assets/css/exam.css

@@ -0,0 +1,135 @@
+[v-cloak] {
+  display: none;
+}
+.center {
+  text-align: center;
+}
+.card-header {
+  padding: 10px;
+  margin-top: 30px;
+}
+
+
+.answer-item {
+  padding: 8px;
+  width: 100%;
+}
+
+.answer-title{
+  font-size: 15px;
+  word-wrap:break-word;
+  word-break:normal;
+  white-space:normal;
+  white-space: normal;
+}
+
+
+.el-radio, .el-radio__input{
+  word-wrap:break-word;
+  word-break:normal;
+  white-space: normal;
+}
+
+.el-radio__label{
+  font-size: 15px !important;
+  line-height:150%;
+  letter-spacing: 1px;
+}
+.mark{
+  position:absolute;
+  bottom: 70px;
+  left: 20px;
+}
+.select {
+  background-color: #7FBAE4 !important;
+}
+
+.question {
+  padding: 4px 0;
+  min-height: 100px;
+}
+.question span{
+  padding-left: 20px;
+}
+
+.exam-content {
+  margin: 0 auto;
+  font-size: 17px;
+  margin-top: 40px;
+}
+
+.exam-content .box-card {
+  position: relative;
+  padding: 10px;
+  margin: 10px;
+  min-height: 660px;
+  padding-bottom: 100px;
+}
+
+.page-ctrl{
+  position:absolute;
+  bottom: 40px;
+  right: 40px;
+  padding: 3px 0;
+}
+
+.b-grid {
+  width: 100%;
+  padding: 8px !important;
+  text-align: center !important;
+  background-color: #ffffff;
+}
+.finish {
+  background-color: #add8e6 !important;
+}
+.el-radio__inner{
+  border: 1px solid #1c1c1d;
+  border-radius: 100%;
+  background-color: #FFF;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+.red {
+  color: red;
+}
+
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  content: "";
+}
+
+.card-select {
+  margin: 10px auto;
+  font-size: 16px;
+  font-weight: 900;
+  margin-top: 50px;
+}
+.select-item{
+  padding: 0px !important;
+  margin: 1px;
+  margin-top: 5px;
+  height: 36px;
+}
+
+.show-true{
+  font-weight: 900;
+  color: green;
+  padding: 1rem;
+}
+.show-false{
+  font-weight: 900;
+  color: red;
+  padding: 1rem;
+}
+.w130{
+  width: 130px;
+}
+
+.n-select{
+ -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}

binární
src/assets/logo.png


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

@@ -38,7 +38,7 @@
       },
       maxs:{
         type: Number,
-        default: 200,
+        default: 20000,
       },
     },
     data() {

+ 1 - 1
src/containers/center/center.vue

@@ -42,7 +42,7 @@ export default {
 </script>
 <style lang="css">
   .m-right-block .right-block-bd {
-    padding: 13px 20px;
+    padding: 12px 16px;
   }
 
 </style>

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

@@ -15,7 +15,7 @@
               </el-tag>
             </div>
             <div class="flex py-2 px-4  items-center justify-between">
-              <span>{{item.name}}</span>
+              <span style="height: 36px;" class="flex items-center justify-between">{{item.name}}</span>
               <el-button type="text" @click="gotoPlay(item.courseId)">进入学习</el-button>
             </div>
             <div class="py-2 px-6 text-sm flex">

+ 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 mt10">
-          <el-row :gutter="12" v-if="list && list.length > 0">
+        <div class="clear mt20">
+          <el-row :gutter="12" v-if="list && list.length > 0" >
             <el-col  v-for="item in list" :key="item.courseId"  :span="8">
-              <el-card>
+              <el-card class="mt20">
                 <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>

+ 292 - 0
src/containers/center/play/components/iCourseAnswerTest.vue

@@ -0,0 +1,292 @@
+<template>
+  <div >
+    <ul class="pt-line" style="background-color: #EBEEF5;">
+      <li style="width: 25%;float: left" :class="{activeTest:1==type }">
+        <span @click="type=1"  class="nav-btn-test w245"  > 判断题</span>
+      </li>
+      <li style="width: 25%;float: left" :class="{activeTest:2==type }" >
+        <span @click="type=2" class="nav-btn-test w245" > 单选题</span>
+      </li>
+      <li style="width: 25%;float: left" :class="{activeTest:3==type }">
+        <span @click="type=3"  class="nav-btn-test w245"> 多选题</span>
+      </li>
+      <li style="width: 25%;float: left"  :class="{activeTest:4==type }" v-if="counter[4]>0">
+        <span @click="type=4" class="nav-btn-test w245"> 案例题</span>
+      </li>
+    </ul>
+    <div class="clear"></div>
+
+    <div style="display: flex;margin-top: 16px;">
+
+      <div style="width: 300px;">
+        <el-row :gutter="24" style="height: 600px;overflow-y: scroll;margin-left: 10px;">
+          <el-col :span="4" v-for="cidx in counter[type]" class="select-item" :key="cidx">
+            <el-button class="b-grid" @click="gotoQuestion(cidx-1)" :class="{active:index-1==cidx, 'finish':finishMap[type][cidx-1]}">
+              {{cidx}}
+            </el-button>
+          </el-col>
+        </el-row>
+      </div>
+      </ul>
+
+      <el-card style="width: 750px;min-height: 400px;text-align: left;">
+        <div slot="header" class="clearfix">
+          <span>第{{index+1}}题({{currentQuestion.type|getType}})</span>
+        </div>
+        <div class="q-single n-select">
+          <div class="question">
+            题目 : <span v-html="currentQuestion.title"></span>
+          </div>
+          <!-- 当选题 -->
+          <div class="answer" v-if="currentQuestion.type<3">
+            <el-radio-group v-model="currentQuestion.answer" @change="selectRadio">
+              <el-radio class="answer-item" v-for="(item,choiceIdx) in currentQuestion.choice" :label="choiceIdx+1"
+                :key="choiceIdx">
+                <span class="answer-title">{{transformChar[choiceIdx]+'、 '+item}}</span>
+              </el-radio>
+            </el-radio-group>
+            <div class="mt10" v-if="finish">
+              <span v-html="getReult(currentQuestion)"></span>
+            </div>
+          </div>
+
+          <!-- 多选题 -->
+          <div class="answer" v-if="currentQuestion.type==3">
+            <el-checkbox-group v-model="currentQuestion.answer" @change="selectCheckBox">
+              <el-checkbox v-for="(item,choiceIdx) in currentQuestion.choice" :label="choiceIdx+1" :key="choiceIdx"
+                class="answer-item">
+                {{transformChar[choiceIdx]+'、 '+item}}
+              </el-checkbox>
+            </el-checkbox-group>
+
+
+            <div class="mt10 " v-if="finish">
+              <span v-html="getReult(currentQuestion)"></span>
+            </div>
+          </div>
+
+          <!-- 案例题 -->
+          <div class="answer" v-if="currentQuestion.type==4">
+            <div v-for="(child,cidx) in currentQuestion.child" :key="child.id">
+              {{cidx+1}}[{{child.type|getType}}]: <span v-html="child.title"></span>
+
+              <div class="answer" v-if="child.type==3">
+                <el-checkbox-group v-model="answers['answer'+cidx]" @change="(e)=>{selectCheckBox(e,cidx)}">
+                  <el-checkbox v-for="(item,choiceIdx) in child.choice" :label="choiceIdx+1" :key="choiceIdx" class="answer-item">
+                    {{transformChar[choiceIdx]+'、'+item}}
+                  </el-checkbox>
+                </el-checkbox-group>
+                <div class="mt10" v-if="finish">
+                  <span v-html="getReult(child)"></span>
+                </div>
+              </div>
+
+              <div class="answer" v-else>
+                <el-radio-group v-model="answers['answer'+cidx]" @change="(e)=>{selectRadio(e, cidx)}">
+                  <el-radio class="answer-item" v-for="(item,choiceIdx) in child.choice" :label="choiceIdx+1" :key="choiceIdx">
+                    <span class="answer-title">{{transformChar[choiceIdx]+'、 '+item}}</span>
+                  </el-radio>
+                </el-radio-group>
+                <div class="mt10" v-if="finish">
+                  <span v-html="getReult(child)"></span>
+                </div>
+              </div>
+
+            </div>
+          </div>
+        </div>
+        <div class="tc" v-if="!finish">
+          <el-button type="primary" @click="submitQustion" >完成</el-button>
+        </div>
+        <div class="tc" v-else>
+          <el-button type="primary" :disabled="index<1" @click="prevQuestion" >上一题</el-button>
+          <el-button type="primary" :disabled="index>=counter[type]" @click="nextQuestion">下一题</el-button>
+        </div>
+      </el-card>
+    </div>
+
+  </div>
+</template>
+
+<script>
+  import {
+    httpServer
+  } from "@/components/httpServer/httpServer.js";
+  import {
+    getSelect
+  } from "@/containers/center/exam/components/util.js";
+  export default {
+    data() {
+      return {
+        index: 0,
+        id: 0,
+        type: 1,
+        finish: false,
+        transformChar: ["A", "B", "C", "D", "E"],
+        currentQuestion: {
+          child: [],
+          choice: []
+        },
+        finishMap:{1:{},2:{},3:{},4:{}},
+        answers: {
+          answerlist: [],
+          answer: '',
+          answer0: '',
+          answer1: '',
+          answer2: '',
+          answer3: '',
+          answer4: '',
+        },
+        counter: {
+          1: 200,
+          2: 400,
+          3: 100,
+          4: 30
+        }
+      }
+    },
+    props: ['info', 'tpl', 'groupId'],
+    mounted() {
+      this.id = this.info.id || 0;
+      console.log("groupId", this.groupId)
+      this.loadPaperInfo()
+    },
+    watch: {
+      type() {
+        this.index = 0;
+        this.loadAnswer();
+      }
+    },
+    filters: {
+      getType(val) {
+        const d = {
+          1: '判断题',
+          2: '单选题',
+          3: '多选题',
+          4: '案例题'
+        }
+        return d[val]
+      }
+    },
+    methods: {
+      submitQustion() {
+        let param = {
+          id: this.id,
+          groupId: this.groupId,
+          type: this.type,
+          index: this.index,
+        }
+        this.finish = true
+      },
+      showResult(index) {
+        let val = '' + index;
+        val = val.replaceAll('1', 'A').replaceAll('2', 'B').replaceAll('3', 'C').replaceAll('4', 'D').replaceAll('5',
+          'E');
+        return val.split('').join(',')
+      },
+      getReult(item) {
+        let select = getSelect(item.answer);
+        let result = this.showResult(item.result)
+        if (select == item.result) {
+          return `正确答案:<span class="show-true">${result}</span>`
+        } else {
+          return `正确答案:<span class="show-false">${result}</span>`
+        }
+      },
+      prevQuestion() {
+        if (this.index < 1) return;
+        this.index--
+        this.loadAnswer()
+      },
+      nextQuestion() {
+        this.index++
+        this.loadAnswer()
+      },
+      gotoQuestion(index) {
+        this.index = index
+        this.loadAnswer()
+      },
+      selectRadio(value, cidx) {
+        if (this.currentQuestion.type == 4) {
+          this.currentQuestion.child[cidx].answer = value;
+        }
+        this.currentQuestion.answer = value;
+        this.$forceUpdate()
+      },
+      selectCheckBox(value, cidx) {
+        if (this.currentQuestion.type == 4) {
+          this.currentQuestion.child[cidx].answer = value;
+        }
+        this.currentQuestion.answer = value;
+        this.$forceUpdate()
+      },
+      doLoadQuestion(item) {
+        item.choice = [];
+        for (let i = 0; i < 6; i++) {
+          let mkey = "answer" + i
+          if (item[mkey]) item.choice.push(item[mkey]);
+        }
+        item.answer = [];
+        if (item.type == 4) {
+          for (let i in item.child) {
+            let child = item.child[i]
+            child.choice = [];
+            child.answer = [];
+            this.answers['answer' + i] = child.answer;
+            for (let i = 0; i < 6; i++) {
+              let mkey = "answer" + i
+              if (child[mkey]) child.choice.push(child[mkey]);
+            }
+          }
+        } else {
+          item.child = []
+        }
+        this.finish = false
+        this.currentQuestion = item
+      },
+      loadPaperInfo(){
+        let param = {
+          groupId: this.groupId,
+        }
+        httpServer("course.loadPaperInfo", param).then(res => {
+          if (res.code != 200) return;
+          this.counter[1] = res.data.count1||0;
+          this.counter[2] = res.data.count2||0;
+          this.counter[3] = res.data.count3||0;
+          this.counter[4] = res.data.count4||0;
+          this.loadAnswer()
+        })
+      },
+      loadAnswer() {
+        let param = {
+          id: this.id,
+          groupId: this.groupId,
+          type: this.type,
+          index: this.index,
+        }
+        httpServer("course.loadPaperAnswer", param).then(res => {
+          if (res.code != 200) return;
+          if (this.index == 0) this.index = res.data.index;
+          this.finishMap[this.type][this.index] = true
+          this.doLoadQuestion(res.data.info || {})
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="css">
+  @import url("../../../../assets/css/exam.css");
+  .activeTest{
+    color: blue;
+    background-color: #3290D4;
+  }
+  .nav-btn-test {
+    border: 1px;
+    font-size: 16px;
+    font-weight: 600;
+    padding: 12px;
+    border: 1px solid #EBEEF5;
+    text-align: center;
+  }
+</style>

+ 45 - 40
src/containers/center/play/index.vue

@@ -2,49 +2,15 @@
   <div class="m-right-block fr mh576">
 
     <el-row class="p20">
-      <el-col :lg="6" :md="6" :span="6">
-        <el-progress
-          class="mprocess"
-          type="circle"
-          :width="150"
-          :format="formatFinish"
-          :stroke-width="18"
-          :percentage="info.percent"
-          >
-        </el-progress>
-
-      </el-col>
-
-      <el-col :lg="6"  :md="6" :span="6">
-        <el-progress v-if="tpl.examGroupId>0"
-           class="mprocess"
-           type="circle"
-           :width="150"
-           :format="formatExam"
-           :stroke-width="18"
-           :percentage="info.score"
-           >
-        </el-progress>
-
-        <el-progress v-else
-           class="mprocess"
-           type="circle"
-           :width="150"
-           :format="formatString('--')"
-           :stroke-width="18"
-           :percentage="0"
-           >
-        </el-progress>
-      </el-col>
 
       <el-col :lg="6" :md="6" :span="6">
-        <img src="../../../assets/wxapp.jpg"  width="150px"  />
+        <img :src="tpl.tb" style="height: 150px;" />
       </el-col>
 
       <el-col :lg="6" :md="6" :span="6">
-        <div>
+        <div v-if="tpl.examGroupId>0">
           <p style="font-size: 24px;"> 说明 </p>
-          <p class="mt10" >岗位名称:{{tpl.name}} </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>
@@ -58,8 +24,41 @@
               </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>
+      </el-col>
+
+      <el-col :lg="6" :md="6" :span="6">
+        <el-progress
+          class="mprocess"
+          type="circle"
+          :width="150"
+          :format="formatFinish"
+          :stroke-width="18"
+          :percentage="info.percent"
+          >
+        </el-progress>
+
       </el-col>
 
+      <el-col :lg="6" :md="6" :span="6">
+        <el-progress
+           class="mprocess"
+           type="circle"
+           :width="150"
+           :format="formatMedia"
+           :stroke-width="18"
+           :percentage="0"
+           >
+        </el-progress>
+       </el-col>
+
     </el-row>
 
     <div class="right-block-bd ng-scope" ui-view="myStudyContent" style="position: relative;">
@@ -184,7 +183,7 @@
         mediaType:'hls',
         mediaUrl:'',
         editRzcode: false,
-        info: {score:0, percent:0},
+        info: {score:0, percent:0,fcount:0,tcount:0,tpercent:0},
         tpl:{},
         media:{},
         options:{
@@ -295,7 +294,11 @@
       formatFinish() {
         let {gxs,axs} = this.info;
         if( !axs ) axs = 1;
-        return `获得${gxs}学时, 总共${axs}学时`;
+        return `学时:${gxs}/${axs}`;
+      },
+      formatMedia() {
+        let info = this.info
+        return `视频:${info.fcount}/${info.tcount}`;
       },
       formatExam() {
         let {score} = this.info
@@ -362,7 +365,9 @@
         this.media = item;
         this.media.index = index
         httpServer('course.GetMedia', {id:item.id}).then( ({data, code}) => {
-          this.mediaUrl = data
+          console.log("media", data)
+          this.mediaUrl = data.mediaUrl
+          item.position = data.position||0
           this.mediaType = 'hls';
           this.options.sources = [{src:this.mediaUrl,type: "application/x-mpegURL"}];
           this.options.playtimes = item.position;

+ 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'
+import '@babel/polyfill/noConflict'
 require('es6-promise').polyfill()
 
 import './icons' // icon

+ 3 - 3
src/settings.js

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

binární
static/images/friendlink/三明市住房和城乡建设局.jpg


binární
static/images/friendlink/三明市住房和城乡建设行政审批系统.jpg


binární
static/images/friendlink/三明市建设人才服务中心.jpg


binární
static/images/friendlink/福建省建设从业人员综合服务平台.jpg