chunk-53974364.11d007f8.js 8.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-53974364"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,a,n){return e/=n/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,a){var o=i(),l=e-o,s=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=s;var i=Math.easeInOutQuad(c,o,l,t);r(i),c<t?n(e):a&&"function"===typeof a&&a()};u()}},"0ab0":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-core"},[a("el-form",{staticClass:"searchForm",attrs:{inline:!0},model:{value:e.searchForm,callback:function(t){e.searchForm="string"===typeof t?t.trim():t},expression:"searchForm"}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"学员编号 学员名称"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organIdList,callback:function(t){e.$set(e.searchForm,"organIdList","string"===typeof t?t.trim():t)},expression:"searchForm.organIdList"}},e._l(e.organList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"buy"}},[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"购买网管课"},model:{value:e.searchForm.buy,callback:function(t){e.$set(e.searchForm,"buy","string"===typeof t?t.trim():t)},expression:"searchForm.buy"}},[a("el-option",{attrs:{label:"是",value:"true"}}),e._v(" "),a("el-option",{attrs:{label:"否",value:"false"}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1),e._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/studentBuyPractice",expression:"'export/studentBuyPractice'"}],staticStyle:{"background-color":"#14928a",border:"1px solid #14928a"},attrs:{type:"primary"},on:{click:e.onExport}},[e._v("导出")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableData}},[a("el-table-column",{attrs:{align:"center",prop:"studentId",label:"学员编号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentName",label:"学员名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"organName",label:"所属分部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"是否购买"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(t.row.buyPractice?"是":"否"))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"lastClassDate",label:"结束日期"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(e._f("formatTimer")(t.row.lastClassDate)))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"firstBuyTime",label:"购买日期"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(e._f("formatTimer")(t.row.firstBuyTime)))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"intervalDay",label:"时间差"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(t.row.intervalDay+"天"))])])]}}])})],1),e._v(" "),a("pagination",{attrs:{total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1)],1)},r=[],i=(a("386d"),a("1cc7")),o=a("333d"),l=a("bc3a"),s=a.n(l),c=a("5f87"),u=a("3908"),p=(a("4328"),{components:{pagination:o["a"]},data:function(){return{searchForm:{search:null,buy:null,organIdList:null},tableData:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},created:function(){},mounted:function(){this.init()},activated:function(){},methods:{init:function(){var e=this;Object(i["R"])().then((function(t){200==t.code&&(e.organList=t.data)})),this.getList()},getList:function(){var e=this,t={page:this.rules.page,rows:this.rules.limit};this.searchForm.search&&(t.search=this.searchForm.search),this.searchForm.buy&&(t.buyPractice=this.searchForm.buy),this.searchForm.organIdList&&(t.organId=this.searchForm.organIdList),Object(i["Kb"])(t).then((function(t){200==t.code&&(e.tableData=t.data.rows,e.rules.total=t.data.total)}))},search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.searchForm={search:null,buy:null,organIdList:null},this.search()},onExport:function(){var e=this,t=this.searchForm,a={buyPractice:t.buy||null,organId:t.organIdList||null,search:t.search||null},n="/api-web/export/studentBuyPractice",r={method:"POST",headers:{Authorization:Object(c["a"])()},params:a,url:n,responseType:"blob"};this.$confirm("您确定导出报表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){u["a"].startLoading(),s()(r).then((function(t){var a=new Blob([t.data],{type:"application/vnd.ms-excel;charset=utf-8"}),n=new Response(a).text();n.then((function(t){if(-1!=t.indexOf("code")){var n=JSON.parse(t);e.$message.error(n.msg)}else{var r=URL.createObjectURL(a),i=document.createElement("a"),o="网管课购买"+(new Date).getTime();i.href=r,i.setAttribute("download",o),document.body.appendChild(i),i.click()}})),u["a"].endLoading()})).catch((function(t){e.$message.error("导出数据失败,请联系管理员"),u["a"].endLoading()}))})).catch((function(){}))}}}),d=p,m=a("2877"),f=Object(m["a"])(d,n,r,!1,null,"32ffb3f1",null);t["default"]=f.exports},"333d":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[a("el-pagination",e._b({attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},r=[],i=(a("c5f6"),a("09f4")),o={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&Object(i["a"])(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&Object(i["a"])(0,800)}}},l=o,s=(a("c0b9"),a("2877")),c=Object(s["a"])(l,n,r,!1,null,"31cb099a",null);t["a"]=c.exports},c0b9:function(e,t,a){"use strict";var n=a("de4e"),r=a.n(n);r.a},de4e:function(e,t,a){}}]);