webpackJsonp([4],{"3cXf":function(s,t,e){s.exports={default:e("L+o2"),__esModule:!0}},"L+o2":function(s,t,e){var a=e("ZuHZ"),l=a.JSON||(a.JSON={stringify:JSON.stringify});s.exports=function(s){return l.stringify.apply(l,arguments)}},fbhI:function(s,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e("3cXf"),l=e.n(a),i=e("zVNV"),c={data:function(){return{state:{},allClass:[],active:null,id:null,classes:null,show:!1,loading:!0}},methods:{setClasses:function(s,t,e){var a=this;this.classes=t,this.id=s,this.$store.ready(function(i){localStorage["classes_"+i.userId]=t,localStorage["id_"+i.userId]=s,e&&(localStorage.childsClass=l()(e)),a.active=s,a.$router.push({name:"ExamBank",query:{categoryid:s}})})},getAllPaperCategory:function(){var s=this;Object(i.a)({apptoken:s.state.appToken}).then(function(t){t.result?(s.allClass=t.data,localStorage.allClass=l()(t.data),s.allClass.map(function(s){if(s.childs.length){var t=0;s.childs.map(function(s){if(s.childs.length)return t;t++}),t==s.childs.length?s.noChilds=!0:s.noChilds=!1}}),s.loading=!1):setTimeout(function(){s.loading=!1},1500)})}},created:function(){},activated:function(){var s=this;s.$store.ready(function(t){1==s.$route.query.reselect?(s.show=!0,s.getAllPaperCategory()):(s.state=t,localStorage["classes_"+t.userId]||s.state.isexamjump?s.$router.push({name:"ExamBank",query:{categoryid:localStorage["id_"+t.userId]||0}}):(s.show=!0,s.getAllPaperCategory(),localStorage["classes_"+t.userId]&&(s.classes=localStorage["classes_"+t.userId]),localStorage["id_"+t.userId]&&(s.id=localStorage["id_"+t.userId],s.active=localStorage["id_"+t.userId])))})}},n={render:function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("div",[s.loading?e("div",{staticClass:"loading"},[s._m(0)]):s._e(),s._v(" "),e("div",{staticClass:"userexam-select"},[s._m(1),s._v(" "),s.show?e("div",{staticStyle:{width:"100%"}},s._l(s.allClass,function(t,a){return e("div",{key:a,staticClass:"userexam-select__item"},[e("div",{staticClass:"userexam-select__top"},[e("p",[s._v(s._s(t.categoryname))])]),s._v(" "),e("div",{staticClass:"userexam-select__bottom"},[e("li",{staticClass:"clearfix",class:t.noChilds?"inline mr20":""},[e("el-button",{staticClass:"fl",class:t.noChilds?"no-childs":"second-class",staticStyle:{padding:"10px 34px"},attrs:{round:"",size:"medium",type:"text"},on:{click:function(e){return s.setClasses(t.categoryid,t.categoryname,t.childs)}}},[s._v("全部")])],1),s._v(" "),s._l(t.childs,function(a,l){return e("li",{key:l,staticClass:"clearfix",class:t.noChilds?"inline mr20":""},[e("el-button",{staticClass:"fl",class:t.noChilds?"no-childs":"second-class",attrs:{round:"",size:"medium",type:"text"},on:{click:function(t){return s.setClasses(a.categoryid,a.categoryname,a.childs)}}},[s._v(s._s(a.categoryname))]),s._v(" "),a.childs&&a.childs.length?e("div",{staticClass:"third-class"},[e("div",{staticClass:"third-class-box"},s._l(a.childs,function(t,a){return e("el-button",{key:a,class:{userexamActive:s.active==t.categoryid},attrs:{round:"",size:"medium"},on:{click:function(e){return s.setClasses(t.categoryid,t.categoryname,t.childs)}}},[s._v(s._s(t.categoryname))])}),1)]):s._e()],1)})],2)])}),0):s._e()])])},staticRenderFns:[function(){var s=this.$createElement,t=this._self._c||s;return t("span",{staticClass:"load-con"},[t("i",{staticClass:"el-icon-loading"}),this._v("正在加载")])},function(){var s=this.$createElement,t=this._self._c||s;return t("div",{staticClass:"userexam-select__title"},[t("p",[this._v("选择考试分类")])])}]};var r=e("C7Lr")(c,n,!1,function(s){e("yE/r")},"data-v-19e1049e",null);t.default=r.exports},"yE/r":function(s,t){}});