chunk-0d113272.ea09ebd7.js 8.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0d113272"],{d11c:function(t,e,s){"use strict";s("ec4a")},d684:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page",class:{"padding-one":0==t.storetype&&"全部"!=t.activeType,"padding-threw":0==t.storetype&&"全部"==t.activeType,"padding-two":2==t.storetype}},[1==t.type?a("div",{staticClass:"wzh-tab flex-row justify-around"},t._l(t.tab,(function(e){return a("div",{key:e.type,class:e.type==t.storetype?"flex-sub wzh-tab-item active":"flex-sub wzh-tab-item",on:{click:function(s){return t.handleTab(e.type)}}},[t._v(" "+t._s(e.name)+" ")])})),0):t._e(),0==t.storetype?[a("div",{staticClass:"searchEle flex-row align-center justify-center"},[a("div",{staticClass:"searchTab flex-row align-center justify-center"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.keyword,expression:"keyword"}],staticClass:"searchIpt flex-sub",attrs:{type:"text",placeholder:"请输入关键字搜索"},domProps:{value:t.keyword},on:{input:function(e){e.target.composing||(t.keyword=e.target.value)}}}),a("div",{staticClass:"searchline"}),a("img",{staticClass:"searchIcon",attrs:{src:s("50ea"),width:"18px",height:"18px",alt:""},on:{click:t.search}})])]),a("div",{staticClass:"leftClassCate scroll_content"},t._l(t.classCate,(function(e){return a("div",{key:e.id,staticClass:"classCateItem flex-row align-center justify-center color333 font28",class:{activeType:t.activeType==e.name},on:{click:function(s){return t.switchClass(e.id,e.name)}}},[a("span",{staticClass:"ellipsis"},[t._v(t._s(e.name))])])})),0),a("div",{directives:[{name:"show",rawName:"v-show",value:"全部"!=t.activeType,expression:"activeType != '全部'"}],staticClass:"subSearchTab"},t._l(t.subClasslist,(function(e){return a("div",{key:e.id,staticClass:"subSearchItem flex-row align-center justify-center",class:{activeSub:e.name==t.subLabel},on:{click:function(s){return t.switchSubClass(e)}}},[a("span",{staticClass:"ellipsis"},[t._v(t._s(e.name))])])})),0),a("div",{staticClass:"rightClassCourse",class:{height216:"全部"==t.activeType,height296:"全部"!=t.activeType}},[a("mescroll-vue",{ref:"wordListBox",staticClass:"customerBoxmescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp},on:{init:t.mescrollInit}},[t._l(t.trainlist,(function(e,s){return a("div",{key:s,staticClass:"classCourseItem flex-row",on:{click:function(s){return t.traintap(e.id)}}},[a("div",{staticClass:"classImage"},[a("img",{attrs:{src:e.cover+"?x-oss-process=image/resize,w_300",width:"100%",height:"100%",alt:""}})]),a("div",{staticClass:"classContent flex-sub flex-column"},[a("div",{staticClass:"classTitle flex-sub"},[a("span",{staticClass:"ellipsis"},[t._v(t._s(e.title))])]),a("div",{staticClass:"flex-sub flex-row align-center"},[a("span",{directives:[{name:"show",rawName:"v-show",value:"compulsory"==e.category,expression:"item.category == 'compulsory'"}],staticClass:"compulsory"},[t._v("必修")]),a("span",{directives:[{name:"show",rawName:"v-show",value:"elective"==e.category,expression:"item.category == 'elective'"}],staticClass:"elective"},[t._v("选修")]),a("span",{staticClass:"ml20 color999 font20"},[t._v(t._s(e.course_num)+"节课件 | "+t._s("order"==e.type?"顺序学习":"自由学习"))])]),a("div",{staticClass:"flex-sub color999 font20 flex-row align-center"},[t._v(" 更新时间:"+t._s(e.addtime?e.addtime.split(" ")[0]:"--")+" ")])])])})),a("nonedata",{attrs:{len:t.trainlist.length,datashow:t.datashow}})],2)],1)]:[a("mescroll-vue",{ref:"wordListBox",staticClass:"customerBoxmescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp},on:{init:t.mescrollInit}},[a("div",{staticClass:"listBoxStyle"},t._l(t.trainlist,(function(e){return a("div",{key:e.id,staticClass:"everytraincourse clearfix",on:{click:function(s){return t.traintap(e.id)}}},[a("img",{directives:[{name:"show",rawName:"v-show",value:e.cover,expression:"item.cover"}],staticClass:"trainimg pull-left",attrs:{src:e.cover+"?x-oss-process=image/resize,w_200",alt:""}}),a("img",{directives:[{name:"show",rawName:"v-show",value:!e.cover,expression:"!item.cover"}],staticClass:"trainimg pull-left",attrs:{src:t.$store.state.imgUrl+"/xcx/nonedata.jpg?x-oss-process=image/resize,w_200"}}),a("div",{staticClass:"rightcontentbox pull-left relative"},[a("div",{staticClass:"fontfpr font32 color384855 lh40 coursetitle ellipsisTwo"},[t._v(" "+t._s(e.title)+" ")]),a("div",{staticClass:"clearfix absolute otherbox fontfpr font28 color666 lh40"},[a("div",{staticClass:"pull-left width40"},[t._v(t._s(e.course_num)+"节课程")]),a("span",{staticClass:"absolute"}),a("div",{staticClass:"pull-left width60 clearfix personimgbox"},[a("div",{directives:[{name:"show",rawName:"v-show",value:0==e.headimgurl.length,expression:"item.headimgurl.length == 0"}],staticClass:"pull-right"},[t._v(" 暂无学员学习 ")]),t._l(e.headimgurl,(function(t,e){return a("img",{key:e,staticClass:"pull-right",attrs:{src:t}})})),e.headimgurl.length>5?a("span",{staticClass:"pull-right"},[t._v("...")]):t._e()],2)])]),"compulsory"==e.category?a("div",{staticClass:"fixed-right-top"},[t._v(" "+t._s("compulsory"==e.category?"必修":"")+" ")]):t._e()])})),0),a("nonedata",{attrs:{len:t.trainlist.length,datashow:t.datashow}})],1)],a("wzhload",{directives:[{name:"show",rawName:"v-show",value:t.loadFlag,expression:"loadFlag"}]})],2)},i=[],l=(s("b0c0"),s("ac1f"),s("5319"),s("99af"),s("9df2")),o=s("8d6b"),r=s("a92e"),n=s("18a0"),c=s.n(n),u={components:{MescrollVue:o["a"],nonedata:r["a"]},name:"traincourse",data:function(){return{activeType:"全部",keyword:"",subLabel:"全部",tab:[{name:"当前店面",type:"0"},{name:"其他店面",type:"2"}],classCate:[],subClasslist:[{name:"全部",id:""}],loadFlag:!0,type:1,storetype:0,trainlist:[],datashow:!1,mescroll:null,mescrollDown:{},mescrollUp:{callback:this.trainfun,page:{num:0,size:10},htmlLoading:"",htmlNodata:"",noMoreSize:0},scrollTop:0}},created:function(){var t=this.getQueryStringArgs(window.location.href);t.type?this.type=t.type:this.type=this.$route.query.type,2==this.type&&(this.storetype=1,document.title="集团培训")},mounted:function(){this.getTrainClassType()},methods:{handleTab:function(t){this.datashow=!1,this.trainlist=[],this.storetype=t,this.activeType="全部",this.subLabel="全部",this.mescroll.resetUpScroll(),this.subClasslist=[{name:"全部",id:""}]},switchClass:function(t,e){this.activeType=e,this.subLabel="全部",this.mescroll.resetUpScroll(),t?this.getClassLabels(t):this.subClasslist=[{name:"全部",id:""}]},switchSubClass:function(t){this.subLabel=t.name,this.mescroll.resetUpScroll()},search:function(){this.mescroll.resetUpScroll()},getTrainClassType:function(){var t=this;Object(l["o"])({}).then((function(e){0==e.data.code&&(t.classCate=e.data.data,t.classCate.unshift({name:"全部",id:""}))}))},getClassLabels:function(t){var e=this;Object(l["p"])({pid:t}).then((function(t){0==t.data.code&&(e.subClasslist=t.data.data,e.subClasslist.unshift({name:"全部",id:""}))}))},getQueryStringArgs:function(t){t=null==t?window.location.href:t;var e=t.substring(t.lastIndexOf("?")+1),s={},a=/([^?&=]+)=([^?&=]*)/g;return e.replace(a,(function(t,e,a){var i=decodeURIComponent(e),l=decodeURIComponent(a);return l=String(l),s[i]=l,t})),s},mescrollInit:function(t){this.mescroll=t},trainfun:function(t,e){var s=this,a={};a="0"!=this.storetype||2==this.type?{page:t.num,from_type:2==this.type?1:this.storetype}:{page:t.num,from_type:2==this.type?1:this.storetype,cate:"全部"==this.activeType?"":this.activeType,keyword:this.keyword,label:"全部"==this.subLabel?"":this.subLabel},Object(l["G"])(a).then((function(a){s.datashow=!0,s.loadFlag=!1,0==a.data.code&&(1===t.num&&(s.trainlist=[]),s.datashow=!0,s.trainlist=s.trainlist.concat(a.data.data),s.$nextTick((function(){e.endSuccess(a.data.data.length)})))}))},traintap:function(t){c.a.miniProgram.navigateTo({url:"/index/pages/course/course?cid="+t})}},deactivated:function(){this.scrollTop=this.mescroll.preScrollY},beforeRouteEnter:function(t,e,s){null==e.name||"school"==e.name?t.meta.isBack=!0:t.meta.isBack=!1,s()},activated:function(){var t=this;if(this.$route.meta.isBack){this.loadFlag=!0,t.trainlist=[],t.datashow=!1;var e=this.getQueryStringArgs(window.location.href);e.type?this.type=e.type:this.type=this.$route.query.type,2==this.type?(this.storetype=1,document.title="集团培训"):this.storetype=0,t.mescroll.resetUpScroll()}else this.mescroll.scrollTo(this.scrollTop,2)}},d=u,h=(s("d11c"),s("2877")),p=Object(h["a"])(d,a,i,!1,null,"2f2ef884",null);e["default"]=p.exports},ec4a:function(t,e,s){}}]);