chunk-5e9eef69.2674d7b8.js 6.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e9eef69"],{"0ab0":function(e,t,a){"use strict";a.r(t);var r=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)},n=[],l=(a("386d"),a("1cc7")),s=a("333d"),i=a("bc3a"),o=a.n(i),c=a("5f87"),u=a("3908"),m=(a("4328"),{components:{pagination:s["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(l["P"])().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(l["Ib"])(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},r="/api-web/export/studentBuyPractice",n={method:"POST",headers:{Authorization:Object(c["a"])()},params:a,url:r,responseType:"blob"};this.$confirm("您确定导出报表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){u["a"].startLoading(),o()(n).then((function(t){var a=new Blob([t.data],{type:"application/vnd.ms-excel;charset=utf-8"}),r=new Response(a).text();r.then((function(t){if(-1!=t.indexOf("code")){var r=JSON.parse(t);e.$message.error(r.msg)}else{var n=URL.createObjectURL(a),l=document.createElement("a"),s="网管课购买"+(new Date).getTime();l.href=n,l.setAttribute("download",s),document.body.appendChild(l),l.click()}})),u["a"].endLoading()})).catch((function(t){e.$message.error("导出数据失败,请联系管理员"),u["a"].endLoading()}))})).catch((function(){}))}}}),p=m,d=a("2877"),f=Object(d["a"])(p,r,n,!1,null,"32ffb3f1",null);t["default"]=f.exports},"5af9":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[e._m(0),e._v(" "),a("div",{staticClass:"m-core"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeIndex,callback:function(t){e.activeIndex="string"===typeof t?t.trim():t},expression:"activeIndex"}},[a("el-tab-pane",{attrs:{label:"网管课管理",name:"1"}},[a("accompanyList")],1),e._v(" "),a("el-tab-pane",{attrs:{label:"网管课购买",name:"2"}},[a("accompanyBuys")],1)],1)],1)])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("网管课管理\n ")])}],l=a("2de7"),s=a("0ab0"),i={components:{accompanyList:l["default"],accompanyBuys:s["default"]},data:function(){return{activeIndex:"1"}},created:function(){},mounted:function(){},methods:{handleClick:function(){}}},o=i,c=a("2877"),u=Object(c["a"])(o,r,n,!1,null,"2fb14d46",null);t["default"]=u.exports}}]);