webpackJsonp([17],{iXC8:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var s=e("zVNV"),i={name:"ExamBank",data:()=>({showList:!0,showNodata:!1,pageCount:0,page:0,classes:"未选择",searchText:"",value:null,size:9,readonly:!0,paperList:[],difficulty:[0],onshow:!1,allClass:[],active:null,id:null,typeData:[],typeId:0,showSort:!1,paperid:0,categoryid:0,loading:!1}),methods:{openSort(t,a){this.showSort=!0,this.paperid=t,this.categoryid=a},closeSort(){this.showSort=!1},onClickLeft(){this.$router.go(-1)},getExamList(t){this.$router.push(t)},open(){this.$router.push({name:"ExamSelect"})},newClass(t){this.classes=t},sidebar(t){this.typeId=t,this.getPaperList()},getPaperList(t=1){this.loading||(this.onshow=!1,this.loading=!0,Object(s.j)({categoryid:this.$route.query.categoryid,typeid:this.typeId,page:t,pagesize:10}).then(a=>{if(1==a.result)for(var e in this.paperList=this.paperList.concat(a.data),this.page=t,this.pageCount=a.pagecount,this.showList=!0,this.showNodata=!1,this.difficulty=[],this.paperList)this.difficulty.push((0==this.paperList[e].paper_level?1:1==this.paperList[e].paper_level&&2)||2==this.paperList[e].paper_level&&3);else this.showList=!1,this.showNodata=!0,this.page=0,this.pageCount=0;this.loading=!1}))},getAllPaperCategory(){Object(s.c)({}).then(t=>{this.allClass=t.data,localStorage.allClass=JSON.stringify(t.data)})}},created(){Object(s.d)().then(t=>{1==t.result&&(this.typeData=t.data)}),localStorage.classes&&(this.classes=localStorage.classes),this.getAllPaperCategory()},activated(){document.title="套卷练习",this.paperList=[],this.getPaperList()}},o={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ks-page-scroll-container",{attrs:{page:t.page,"page-count":t.pageCount},on:{"page-change":t.getPaperList}},[e("div",{staticClass:"examBank"},[e("van-nav-bar",{attrs:{title:"套卷练习","left-arrow":""},on:{"click-left":t.onClickLeft}}),t._v(" "),t.typeData.length>0?e("div",{staticClass:"examBank-nav"},[e("span",{class:{active:0==t.typeid},on:{click:function(a){return t.sidebar(0)}}},[t._v("全部试卷")]),t._v(" "),t._l(t.typeData,function(a,s){return e("span",{key:s,class:{active:t.typeid==a.typeid},on:{click:function(e){return t.sidebar(a.typeid)}}},[t._v(t._s(a.typename))])})],2):t._e(),t._v(" "),e("div",{staticClass:"examBank-item"},[t._l(t.paperList,function(a,s){return e("div",{directives:[{name:"show",rawName:"v-show",value:t.showList,expression:"showList"}],key:s,staticClass:"examBank-box"},[e("div",{staticClass:"examBank-box_top"},[e("div",{staticClass:"examBank-box_title"},[e("ul",[e("li",[t._v(t._s(a.title))])])]),t._v(" "),-1==a.sumscore?e("div",{staticClass:"examBank-box_score"},[t._v("- -")]):e("div",{staticClass:"examBank-box_score"},[t._v(t._s(a.sumscore)+"分")])]),t._v(" "),e("div",{staticClass:"examBank-box_bottom"},[e("div",{staticClass:"examBank-box_difficulty"},[e("div",[t._v(t._s(a.studentcount)+"人参考")]),t._v(" "),e("div",{staticClass:"difficulty-flex"},[e("span",[t._v("难度")]),t._v(" "),e("van-rate",{attrs:{size:t.size,color:"#ff795c",readonly:t.readonly,count:3},model:{value:t.difficulty[s],callback:function(a){t.$set(t.difficulty,s,a)},expression:"difficulty[index]"}})],1)]),t._v(" "),0!=a.is_repractice?e("router-link",{staticClass:"examBank-box_again",attrs:{to:{name:"PaperInfo",query:{paperid:a.paperid,categoryid:a.categoryid}},tag:"div"}},[t._v("\n            "+t._s(-1==a.is_repractice?"开始练习":2==a.is_repractice?"继续练习":"重新练习")+"\n          ")]):t._e()],1)])}),t._v(" "),t.showNodata?e("Nodata"):t._e()],2),t._v(" "),t.onshow?e("Popup",{attrs:{"all-class":t.allClass},on:{classes:t.newClass}}):t._e(),t._v(" "),t.showSort?e("sort",{attrs:{paperid:t.paperid,categoryid:t.categoryid},on:{closeSort:t.closeSort}}):t._e()],1)])},staticRenderFns:[]};var r=e("C7Lr")(i,o,!1,function(t){e("xg80")},"data-v-60a60fe6",null);a.default=r.exports},xg80:function(t,a){}});