1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e9eef69"],{"0ab0":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"m-core"},[a("el-form",{staticClass:"searchForm",attrs:{inline:!0},model:{value:t.searchForm,callback:function(e){t.searchForm="string"===typeof e?e.trim():e},expression:"searchForm"}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"学员编号 学员名称"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search(e)}},model:{value:t.searchForm.search,callback:function(e){t.$set(t.searchForm,"search","string"===typeof e?e.trim():e)},expression:"searchForm.search"}})],1),t._v(" "),a("el-form-item",[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:t.searchForm.organIdList,callback:function(e){t.$set(t.searchForm,"organIdList","string"===typeof e?e.trim():e)},expression:"searchForm.organIdList"}},t._l(t.organList,function(t,e){return a("el-option",{key:e,attrs:{label:t.name,value:t.id}})}),1)],1),t._v(" "),a("el-form-item",{attrs:{prop:"buy"}},[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"购买网管课"},model:{value:t.searchForm.buy,callback:function(e){t.$set(t.searchForm,"buy","string"===typeof e?e.trim():e)},expression:"searchForm.buy"}},[a("el-option",{attrs:{label:"是",value:"true"}}),t._v(" "),a("el-option",{attrs:{label:"否",value:"false"}})],1)],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:t.search}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.onReSet}},[t._v("重置")])],1),t._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:t.onExport}},[t._v("导出")])],1)],1),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:t.tableData}},[a("el-table-column",{attrs:{align:"center",prop:"studentId",label:"学员编号"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentName",label:"学员名称"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"organName",label:"所属分部"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"是否购买"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(e.row.buyPractice?"是":"否"))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"lastClassDate",label:"结束日期"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("p",{staticStyle:{position:"relative"}},[t._v(" 结束日期 "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n 免费网管课最后一节课截止日期\n ")]),t._v(" "),a("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#F56C6C"}})])],1)]}},{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(t._f("formatTimer")(e.row.lastClassDate)))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"firstBuyTime",label:"购买日期"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("p",{staticStyle:{position:"relative"}},[t._v(" 购买日期 "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n 付费网管课第一次购买时间\n ")]),t._v(" "),a("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#F56C6C"}})])],1)]}},{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(t._f("formatTimer")(e.row.firstBuyTime)))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"intervalDay",label:"时间差"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("p",{staticStyle:{position:"relative"}},[t._v(" 时间差 "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("\n 付费网管课结束后与购买日期的时间差\n ")]),t._v(" "),a("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#F56C6C"}})])],1)]}},{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(e.row.intervalDay+"天"))])])]}}])})],1),t._v(" "),a("pagination",{attrs:{total:t.rules.total,page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:page":function(e){return t.$set(t.rules,"page",e)},"update:limit":function(e){return t.$set(t.rules,"limit",e)},pagination:t.getList}})],1)],1)},r=[],s=(a("386d"),a("1cc7")),l=a("333d"),o=a("bc3a"),i=a.n(o),c=a("5f87"),u=a("3908"),p=(a("4328"),{components:{pagination:l["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(){this.init()},methods:{init:function(){var t=this;Object(s["U"])().then(function(e){200==e.code&&(t.organList=e.data)}),this.getList()},getList:function(){var t=this,e={page:this.rules.page,rows:this.rules.limit};this.searchForm.search&&(e.search=this.searchForm.search),this.searchForm.buy&&(e.buyPractice=this.searchForm.buy),this.searchForm.organIdList&&(e.organId=this.searchForm.organIdList),Object(s["Pb"])(e).then(function(e){200==e.code&&(t.tableData=e.data.rows,t.rules.total=e.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 t=this,e=this.searchForm,a={buyPractice:e.buy||null,organId:e.organIdList||null,search:e.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(),i()(r).then(function(e){var a=new Blob([e.data],{type:"application/vnd.ms-excel;charset=utf-8"}),n=new Response(a).text();n.then(function(e){if(-1!=e.indexOf("code")){var n=JSON.parse(e);t.$message.error(n.msg)}else{var r=URL.createObjectURL(a),s=document.createElement("a"),l="网管课购买"+(new Date).getTime();s.href=r,s.setAttribute("download",l),document.body.appendChild(s),s.click()}}),u["a"].endLoading()}).catch(function(e){t.$message.error("导出数据失败,请联系管理员"),u["a"].endLoading()})}).catch(function(){})}}}),d=p,m=a("2877"),f=Object(m["a"])(d,n,r,!1,null,"a874604e",null);e["default"]=f.exports},"5af9":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"m-container"},[t._m(0),t._v(" "),a("div",{staticClass:"m-core"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeIndex,callback:function(e){t.activeIndex="string"===typeof e?e.trim():e},expression:"activeIndex"}},[a("el-tab-pane",{attrs:{label:"网管课管理",name:"1"}},["1"===t.activeIndex?a("accompanyList"):t._e()],1),t._v(" "),a("el-tab-pane",{attrs:{label:"网管课购买",name:"2"}},["2"===t.activeIndex?a("accompanyBuys"):t._e()],1)],1)],1)])},r=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("h2",[a("div",{staticClass:"squrt"}),t._v("网管课管理\n ")])}],s=a("2de7"),l=a("0ab0"),o={components:{accompanyList:s["default"],accompanyBuys:l["default"]},data:function(){return{activeIndex:"1"}},created:function(){},mounted:function(){},methods:{handleClick:function(){}}},i=o,c=a("2877"),u=Object(c["a"])(i,n,r,!1,null,"96bfcd78",null);e["default"]=u.exports}}]);
|