1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e8a10b0"],{"02f3":function(t,n,e){"use strict";e("c61f")},1175:function(t,n,e){},"12ac":function(t,n,e){"use strict";var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"question"},[e("span",[t._v(t._s(t.typestr)+"题")]),e("span",[e("span",{staticStyle:{color:"red"}},[t._v(t._s(t.nowidx))]),t._v("/"+t._s(t.len))])])},o=[],i=(e("a9e3"),{props:{len:{type:Number,default:0},nowidx:{type:Number,default:0},typestr:{type:String,default:""}},data:function(){return{}}}),r=i,s=(e("daf5"),e("2877")),c=Object(s["a"])(r,a,o,!1,null,"11f6b433",null);n["a"]=c.exports},2241:function(t,n,e){"use strict";var a,o=e("1988"),i=e("8bbf"),r=e.n(i),s=e("2638"),c=e.n(s),u=e("d282"),l=e("ea8e"),d=e("b1d2"),f=e("6605"),p=e("b650"),m=e("9884"),h=Object(u["a"])("goods-action"),b=h[0],v=h[1],g=b({mixins:[Object(m["b"])("vanGoodsAction")],props:{safeAreaInsetBottom:{type:Boolean,default:!0}},render:function(){var t=arguments[0];return t("div",{class:v({unfit:!this.safeAreaInsetBottom})},[this.slots()])}}),O=e("48f4"),j=Object(u["a"])("goods-action-button"),w=j[0],x=j[1],y=w({mixins:[Object(m["a"])("vanGoodsAction")],props:Object(o["a"])({},O["c"],{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean}),computed:{isFirst:function(){var t=this.parent&&this.parent.children[this.index-1];return!t||t.$options.name!==this.$options.name},isLast:function(){var t=this.parent&&this.parent.children[this.index+1];return!t||t.$options.name!==this.$options.name}},methods:{onClick:function(t){this.$emit("click",t),Object(O["b"])(this.$router,this)}},render:function(){var t=arguments[0];return t(p["a"],{class:x([{first:this.isFirst,last:this.isLast},this.type]),attrs:{size:"large",type:this.type,icon:this.icon,color:this.color,loading:this.loading,disabled:this.disabled},on:{click:this.onClick}},[this.slots()||this.text])}}),_=Object(u["a"])("dialog"),C=_[0],k=_[1],B=_[2],I=C({mixins:[Object(f["a"])()],props:{title:String,theme:String,width:[Number,String],message:String,className:null,callback:Function,beforeClose:Function,messageAlign:String,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showCancelButton:Boolean,overlay:{type:Boolean,default:!0},allowHtml:{type:Boolean,default:!0},transition:{type:String,default:"van-dialog-bounce"},showConfirmButton:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!1}},data:function(){return{loading:{confirm:!1,cancel:!1}}},methods:{onClickOverlay:function(){this.handleAction("overlay")},handleAction:function(t){var n=this;this.$emit(t),this.value&&(this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,(function(e){!1!==e&&n.loading[t]&&n.onClose(t),n.loading.confirm=!1,n.loading.cancel=!1}))):this.onClose(t))},onClose:function(t){this.close(),this.callback&&this.callback(t)},onOpened:function(){this.$emit("opened")},onClosed:function(){this.$emit("closed")},genRoundButtons:function(){var t=this,n=this.$createElement;return n(g,{class:k("footer")},[this.showCancelButton&&n(y,{attrs:{size:"large",type:"warning",text:this.cancelButtonText||B("cancel"),color:this.cancelButtonColor,loading:this.loading.cancel},class:k("cancel"),on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&n(y,{attrs:{size:"large",type:"danger",text:this.confirmButtonText||B("confirm"),color:this.confirmButtonColor,loading:this.loading.confirm},class:k("confirm"),on:{click:function(){t.handleAction("confirm")}}})])},genButtons:function(){var t,n=this,e=this.$createElement,a=this.showCancelButton&&this.showConfirmButton;return e("div",{class:[d["e"],k("footer")]},[this.showCancelButton&&e(p["a"],{attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||B("cancel")},class:k("cancel"),style:{color:this.cancelButtonColor},on:{click:function(){n.handleAction("cancel")}}}),this.showConfirmButton&&e(p["a"],{attrs:{size:"large",loading:this.loading.confirm,text:this.confirmButtonText||B("confirm")},class:[k("confirm"),(t={},t[d["c"]]=a,t)],style:{color:this.confirmButtonColor},on:{click:function(){n.handleAction("confirm")}}})])},genContent:function(t,n){var e=this.$createElement;if(n)return e("div",{class:k("content")},[n]);var a=this.message,o=this.messageAlign;if(a){var i,r,s={class:k("message",(i={"has-title":t},i[o]=o,i)),domProps:(r={},r[this.allowHtml?"innerHTML":"textContent"]=a,r)};return e("div",{class:k("content",{isolated:!t})},[e("div",c()([{},s]))])}}},render:function(){var t=arguments[0];if(this.shouldRender){var n=this.message,e=this.slots(),a=this.slots("title")||this.title,o=a&&t("div",{class:k("header",{isolated:!n&&!e})},[a]);return t("transition",{attrs:{name:this.transition},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[t("div",{directives:[{name:"show",value:this.value}],attrs:{role:"dialog","aria-labelledby":this.title||n},class:[k([this.theme]),this.className],style:{width:Object(l["a"])(this.width)}},[o,this.genContent(a,e),"round-button"===this.theme?this.genRoundButtons():this.genButtons()])])}}}),$=e("a142");function S(t){return document.body.contains(t)}function T(){a&&a.$destroy(),a=new(r.a.extend(I))({el:document.createElement("div"),propsData:{lazyRender:!1}}),a.$on("input",(function(t){a.value=t}))}function A(t){return $["g"]?Promise.resolve():new Promise((function(n,e){a&&S(a.$el)||T(),Object(o["a"])(a,A.currentOptions,t,{resolve:n,reject:e})}))}A.defaultOptions={value:!0,title:"",width:"",theme:null,message:"",overlay:!0,className:"",allowHtml:!0,lockScroll:!0,transition:"van-dialog-bounce",beforeClose:null,overlayClass:"",overlayStyle:null,messageAlign:"",getContainer:"body",cancelButtonText:"",cancelButtonColor:null,confirmButtonText:"",confirmButtonColor:null,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1,callback:function(t){a["confirm"===t?"resolve":"reject"](t)}},A.alert=A,A.confirm=function(t){return A(Object(o["a"])({showCancelButton:!0},t))},A.close=function(){a&&(a.value=!1)},A.setDefaultOptions=function(t){Object(o["a"])(A.currentOptions,t)},A.resetDefaultOptions=function(){A.currentOptions=Object(o["a"])({},A.defaultOptions)},A.resetDefaultOptions(),A.install=function(){r.a.use(I)},A.Component=I,r.a.prototype.$dialog=A;n["a"]=A},"2fcb":function(t,n,e){},3533:function(t,n,e){},"4cf9":function(t,n,e){},"66b9":function(t,n,e){"use strict";e("68ef"),e("9d70"),e("3743"),e("e3b3"),e("bc1b")},"8ab8":function(t,n,e){"use strict";e("9037")},9037:function(t,n,e){},"996c":function(t,n,e){"use strict";e.r(n);var a,o=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"page"},[e("div",{staticClass:"timebox center colorfff font28 bold"},[t._v(t._s(t.downtime))]),t._l(t.paperInfo.questions,(function(n,a){return e("div",{directives:[{name:"show",rawName:"v-show",value:t.nowidx==a,expression:"nowidx==index"}],key:n.id},[e("question-type",{attrs:{len:t.paperInfo.questions.length,nowidx:1*a+1,typestr:n.type}}),e("div",{staticClass:"question-item lh44"},[e("div",{staticClass:"fon24 clearfix questiontit"},[e("div",{staticClass:"pull-left",domProps:{innerHTML:t._s(n.ask)}}),e("div",{staticClass:"pull-right"},[t._v("("+t._s(n.pivot.score)+"分)")])]),e("div",{staticClass:"imgbox clearfix"},t._l(n.imgs,(function(n,a){return e("img",{key:a,staticClass:"pull-left",attrs:{src:n},on:{click:function(e){return t.lookTap(n)}}})})),0),e("div",{staticClass:"padding-tb-sm"},["判断"==n.type?e("van-radio-group",{model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"item.value"}},[e("van-radio",{attrs:{name:"正确"}},[t._v("A 正确")]),e("van-radio",{attrs:{name:"错误"}},[t._v("B 错误")])],1):t._e(),"单选"==n.type?e("van-radio-group",{model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"item.value"}},t._l(n.content,(function(n,a){return e("div",{key:a,staticClass:"flex xm-danxuan"},[e("div",[e("van-radio",{attrs:{name:a}})],1),e("div",[e("div",{staticClass:"fontW700"},[t._v(t._s(a))]),e("div",{domProps:{innerHTML:t._s(n)},on:{click:function(e){return t.viewImage(e,n)}}})])])})),0):t._e(),"多选"==n.type?e("van-checkbox-group",{model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"item.value"}},t._l(n.content,(function(n,a){return e("div",{key:a,staticClass:"flex xm-danxuan"},[e("div",[e("van-checkbox",{attrs:{name:a}})],1),e("div",[e("div",{staticClass:"fontW700"},[t._v(t._s(a))]),e("div",{domProps:{innerHTML:t._s(n)},on:{click:function(e){return t.viewImage(e,n)}}})])])})),0):t._e(),"简答"==n.type?e("van-field",{staticStyle:{border:"1px solid #ececec",width:"100%",height:"5rem"},attrs:{type:"textarea",placeholder:"请输入您的答案"},model:{value:n.value,callback:function(e){t.$set(n,"value",e)},expression:"item.value"}}):t._e()],1)])],1)})),e("div",{staticClass:"footer"},[e("div",{staticClass:"flex-row"},[e("van-button",{staticClass:"flex-1",attrs:{plain:"",type:"info"},on:{click:t.preasktap}},[t._v("上一题")]),e("van-button",{staticClass:"flex-1",staticStyle:{"border-left":"none"},attrs:{plain:"",type:"info"},on:{click:t.nextap}},[t._v("下一题")])],1),e("div",{staticClass:"flex-row margin-top-sm"},[e("van-button",{staticClass:"flex-1 bg249efb colorfff",staticStyle:{border:"none"},attrs:{type:"info"},on:{click:t.submitasktap}},[t._v("交卷 ")])],1)]),e("wzhload",{directives:[{name:"show",rawName:"v-show",value:t.loadFlag,expression:"loadFlag"}]})],2)},i=[],r=e("f3f3"),s=e("fc11"),c=(e("4662"),e("28a2")),u=(e("e17f"),e("2241")),l=(e("be7f"),e("565f")),d=(e("66b9"),e("b650")),f=(e("4ddd"),e("9f14")),p=(e("a44c"),e("e27c")),m=(e("b0c0"),e("d81d"),e("ac1f"),e("1276"),e("b64b"),e("d3b7"),e("159b"),e("a15b"),e("12ac")),h=e("9df2"),b=(e("18a0"),""),v={components:(a={},Object(s["a"])(a,p["a"].name,p["a"]),Object(s["a"])(a,f["a"].name,f["a"]),Object(s["a"])(a,d["a"].name,d["a"]),Object(s["a"])(a,l["a"].name,l["a"]),Object(s["a"])(a,u["a"].name,u["a"]),Object(s["a"])(a,c["a"].Component.name,c["a"].Component),Object(s["a"])(a,"questionType",m["a"]),a),data:function(){return{pid:"",paperInfo:{},loadFlag:!0,answerobj:{},nowidx:0,downtime:"",from:""}},created:function(){this.pid=this.$route.params.pid,this.from=this.$route.params.from||"0",this.testdetail()},mounted:function(){},methods:{lookTap:function(t){Object(c["a"])([t])},viewImage:function(t,n){"img"===t.target.localName&&Object(c["a"])([t.target.src])},testdetail:function(){var t=this,n=this,e={employee_id:n.$store.state.empid,paperid:n.pid};Object(h["w"])(e).then((function(e){0==e.data.code&&(document.title=e.data.paperInfo.name,n.paperInfo=e.data.paperInfo,t.answerobj=e.data.paperInfo.answer||{},n.paperInfo.questions=n.paperInfo.questions.map((function(n){return"多选"==n.type?Object(r["a"])(Object(r["a"])({},n),{},{value:t.answerobj[n.id]?t.answerobj[n.id].split(","):[]}):Object(r["a"])(Object(r["a"])({},n),{},{value:t.answerobj[n.id]||""})})),t.setPaperTime(),t.setNowIndex(),n.$nextTick((function(){n.startap(),n.countdown()}))),n.loadFlag=!1}))},setPaperTime:function(){if(""!=this.paperInfo.startmaketime&&null!=this.paperInfo.startmaketime&&void 0!=this.paperInfo.startmaketime)if(this.paperInfo.startmaketime>0){var t=this.paperInfo.startmaketime;this.paperInfo.duringtime=Math.floor(t/60)}else this.$toast("考试已结束!!!")},setNowIndex:function(){var t=this,n=Object.keys(this.answerobj);this.paperInfo.questions.forEach((function(e,a){n.length&&n[n.length-1]==e.id&&(t.nowidx=a)}))},countdown:function(){var t=this,n=Math.floor(t.paperInfo.duringtime),e=60*t.paperInfo.duringtime%60;t.downtime=n+":"+e;setInterval((function(){e<=1?0==n?(e="00",t.loadFlag=!0,t.timesub()):(n-=1,e=59):e-=1,t.downtime=n+":"+e}),1e3)},preasktap:function(){var t=this.nowidx;if(0==t)return this.$toast("已经到第一题了!"),!1;t-=1,this.nowidx=t},setSigleAnswer:function(t,n){var e=this,a="多选"==this.paperInfo.questions[t].type?this.paperInfo.questions[t].value.join(","):this.paperInfo.questions[t].value;Object(h["y"])({paper_id:this.pid,question:this.paperInfo.questions[t].id,answer:a}).then((function(t){if(0==t.data.code){if("submit"==n){var a={paper_id:e.pid};Object(h["u"])(a).then((function(t){e.loadFlag=!1,"0"==t.data.code&&(e.$toast(t.data.msg),setTimeout((function(){e.$router.go(-1)}),1500))})).catch((function(t){e.loadFlag=!1}))}}else e.loadFlag=!1,e.$toast(t.data.msg),setTimeout((function(){e.$router.go(-1)}),1500)})).catch((function(t){e.loadFlag=!1}))},nextap:function(){var t=this.nowidx;if(this.setSigleAnswer(t),t==this.paperInfo.questions.length-1)return this.$toast("已经到最后一题了!"),!1;t=1*t+1,this.nowidx=t},startap:function(){var t=this,n=new Date,e=n.getFullYear(),a=n.getMonth(),o=n.getDate(),i=n.getHours(),r=n.getMinutes(),s=n.getSeconds();a=1*a+1,e+"-"+a+"-"+o+" "+i+":"+r+":"+s;var c=setInterval((function(){var e=n.getFullYear(),a=n.getMonth(),o=n.getDate(),i=n.getHours(),r=n.getMinutes(),s=n.getSeconds();a=1*a+1,b=e+"-"+a+"-"+o+" "+i+":"+r+":"+s,new Date(b).getTime()>=new Date(t.paperInfo.endtime).getTime()&&(t.from||(clearInterval(c),t.loadFlag=!0,t.timesub()))}),1e3)},submitasktap:function(){var t=this,n=this,e=this.paperInfo.questions,a=this.answerobj,o=[];e.forEach((function(t){"多选"==t.type?a[t.id]=t.value.join(","):a[t.id]=t.value}));var i=setTimeout((function(){clearTimeout(i);for(var r=0;r<e.length;r++)a[e[r].id]||o.push(r+1);if(0!=o.length)return u["a"].confirm({title:"交卷提示",message:"您的第"+o.join("、")+"题没有做,是否现在交卷?",confirmButtonColor:"#28A1FF",confirmButtonText:"确定",cancelButtonText:"再想想"}).then((function(){n.loadFlag=!0,n.timesub()})).catch((function(){})),!1;t.loadFlag=!0,t.timesub()}),100)},timesub:function(){this.setSigleAnswer(this.nowidx,"submit")}}},g=v,O=(e("02f3"),e("8ab8"),e("2877")),j=Object(O["a"])(g,o,i,!1,null,"18ee5862",null);n["default"]=j.exports},"9df2":function(t,n,e){"use strict";e.d(n,"v",(function(){return o})),e.d(n,"G",(function(){return i})),e.d(n,"c",(function(){return r})),e.d(n,"H",(function(){return s})),e.d(n,"M",(function(){return c})),e.d(n,"A",(function(){return u})),e.d(n,"e",(function(){return l})),e.d(n,"u",(function(){return d})),e.d(n,"t",(function(){return f})),e.d(n,"n",(function(){return p})),e.d(n,"j",(function(){return m})),e.d(n,"m",(function(){return h})),e.d(n,"i",(function(){return b})),e.d(n,"w",(function(){return v})),e.d(n,"x",(function(){return g})),e.d(n,"K",(function(){return O})),e.d(n,"s",(function(){return j})),e.d(n,"f",(function(){return w})),e.d(n,"a",(function(){return x})),e.d(n,"g",(function(){return y})),e.d(n,"J",(function(){return _})),e.d(n,"I",(function(){return C})),e.d(n,"E",(function(){return k})),e.d(n,"D",(function(){return B})),e.d(n,"C",(function(){return I})),e.d(n,"B",(function(){return $})),e.d(n,"l",(function(){return S})),e.d(n,"z",(function(){return T})),e.d(n,"L",(function(){return A})),e.d(n,"b",(function(){return F})),e.d(n,"h",(function(){return q})),e.d(n,"o",(function(){return D})),e.d(n,"p",(function(){return L})),e.d(n,"d",(function(){return M})),e.d(n,"y",(function(){return N})),e.d(n,"F",(function(){return P})),e.d(n,"q",(function(){return E})),e.d(n,"r",(function(){return H})),e.d(n,"k",(function(){return z}));var a=e("b775");function o(t){return Object(a["a"])({url:"/api/train/new",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/api/train/trainClassList",method:"post",data:t})}function r(t){return Object(a["a"])({url:"/api/train/classDetail",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/api/train/trainCourseList",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/api/train/watch_feel",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/api/train/thumbing",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/api/train/commentAdd",method:"post",data:t})}function d(t){return Object(a["a"])({url:"/api/exam/submitPaper",method:"post",data:t})}function f(t){return Object(a["a"])({url:"/api/exam/get_questions",method:"post",data:t})}function p(t){return Object(a["a"])({url:"/api/exam/ranking",method:"post",data:t})}function m(t){return Object(a["a"])({url:"/api/train/courseDetail",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/api/train/doneLogging",method:"post",data:t})}function b(t){return Object(a["a"])({url:"/client/train/courseDetail",method:"post",data:t})}function v(t){return Object(a["a"])({url:"/api/exam/paperdetail",method:"post",data:t})}function g(t){return Object(a["a"])({url:"/api/exam/paperlist",method:"post",data:t})}function O(t){return Object(a["a"])({url:"/api/exam/treat_correct_paper",method:"post",data:t})}function j(t){return Object(a["a"])({url:"/api/exam/get_papers",method:"post",data:t})}function w(t){return Object(a["a"])({url:"/api/exam/correct_papers_log",method:"post",data:t})}function x(t){return Object(a["a"])({url:"/api/exam/all_correct_papers",method:"post",data:t})}function y(t){return Object(a["a"])({url:"/api/exam/correct_papers_question_list",method:"post",data:t})}function _(t){return Object(a["a"])({url:"/api/train/all_complete",method:"post",data:t})}function C(t){return Object(a["a"])({url:"/api/train/all_org",method:"post",data:t})}function k(t){return Object(a["a"])({url:"/api/camp/read",method:"post",data:t})}function B(t){return Object(a["a"])({url:"/api/camp/plan",method:"post",data:t})}function I(t){return Object(a["a"])({url:"/api/camp/list",method:"post",data:t})}function $(t){return Object(a["a"])({url:"/api/camp/approve",method:"post",data:t})}function S(t){return Object(a["a"])({url:"/api/day_study/study",method:"post",data:t})}function T(t){return Object(a["a"])({url:"/api/day_study/setting",method:"post",data:t})}function A(t){return Object(a["a"])({url:"/api/day_study/update_study",method:"post",data:t})}function F(t){return Object(a["a"])({url:"/api/day_study/change_study_long",method:"post",data:t})}function q(t){return Object(a["a"])({url:"/api/train/coureseView",method:"post",data:t})}function D(t){return Object(a["a"])({url:"/api/train/get_train_class_cate",method:"post",data:t})}function L(t){return Object(a["a"])({url:"/api/train/get_train_class_label",method:"post",data:t})}function M(t){return Object(a["a"])({url:"/api/train/classView",method:"post",data:t})}function N(t){return Object(a["a"])({url:"/api/exam/answer",method:"post",data:t})}function P(t){return Object(a["a"])({url:"/client/train/trainClassList",method:"post",data:t})}function E(t){return Object(a["a"])({url:"/client/train/get_train_class_cate",method:"post",data:t})}function H(t){return Object(a["a"])({url:"/client/train/get_train_class_label",method:"post",data:t})}function z(t){return Object(a["a"])({url:"/client/index/signUp",method:"post",data:t})}},a15b:function(t,n,e){"use strict";var a=e("23e7"),o=e("e330"),i=e("44ad"),r=e("fc6a"),s=e("a640"),c=o([].join),u=i!=Object,l=s("join",",");a({target:"Array",proto:!0,forced:u||!l},{join:function(t){return c(r(this),void 0===t?",":t)}})},c61f:function(t,n,e){},d81d:function(t,n,e){"use strict";var a=e("23e7"),o=e("b727").map,i=e("1dde"),r=i("map");a({target:"Array",proto:!0,forced:!r},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},daf5:function(t,n,e){"use strict";e("3533")},e17f:function(t,n,e){"use strict";e("68ef"),e("a71a"),e("9d70"),e("3743"),e("4d75"),e("e3b3"),e("bc1b"),e("1175"),e("4cf9"),e("2fcb")}}]);
|