1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e9c1361"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(t,e,n){var s=r(),l=t-s,i=20,c=0;e="undefined"===typeof e?500:e;var u=function t(){c+=i;var r=Math.easeInOutQuad(c,s,l,e);o(r),c<e?a(t):n&&"function"===typeof n&&n()};u()}},"0ab0":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("save-form",{staticClass:"searchForm",attrs:{inline:!0,"save-key":"accompanyBuys",model:t.searchForm},on:{submit:t.search,reset:t.onReSet,"update:model":function(e){t.searchForm=e}}},[n("el-form-item",[n("el-input",{attrs:{clearable:"",placeholder:"学员编号/学员名称"},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(" "),n("el-form-item",[n("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.selects.branchs,(function(t,e){return n("el-option",{key:e,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),n("el-form-item",{attrs:{prop:"buy"}},[n("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"}},[n("el-option",{attrs:{label:"是",value:"true"}}),t._v(" "),n("el-option",{attrs:{label:"否",value:"false"}})],1)],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{"native-type":"submit",type:"danger"}},[t._v("搜索")]),t._v(" "),n("el-button",{attrs:{"native-type":"reset",type:"primary"}},[t._v("重置")])],1),t._v(" "),n("el-form-item",[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/studentBuyPractice",expression:"'export/studentBuyPractice'"}],attrs:{type:"primary"},on:{click:t.onExport}},[t._v("导出")])],1)],1),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:t.tableData}},[n("el-table-column",{attrs:{align:"center",prop:"studentId",label:"学员编号"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("copy-text",[t._v(t._s(e.row.studentId))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"studentName",label:"学员名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("copy-text",[t._v(t._s(e.row.studentName))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"organName",label:"所属分部"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("copy-text",[t._v(t._s(e.row.organName))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"是否购买"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",[n("p",[t._v(t._s(e.row.buyPractice?"是":"否"))])])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"lastClassDate",label:"结束日期"},scopedSlots:t._u([{key:"header",fn:function(e){return[n("p",{staticStyle:{position:"relative"}},[t._v("\n 结束日期\n "),n("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("免费网管课最后一节课截止日期")]),t._v(" "),n("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1)]}},{key:"default",fn:function(e){return[n("div",[n("p",[t._v(t._s(t._f("formatTimer")(e.row.lastClassDate)))])])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"firstBuyTime",label:"购买日期"},scopedSlots:t._u([{key:"header",fn:function(e){return[n("p",{staticStyle:{position:"relative"}},[t._v("\n 购买日期\n "),n("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("付费网管课第一次购买时间")]),t._v(" "),n("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1)]}},{key:"default",fn:function(e){return[n("div",[n("p",[t._v(t._s(t._f("formatTimer")(e.row.firstBuyTime)))])])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"intervalDay",label:"时间差"},scopedSlots:t._u([{key:"header",fn:function(e){return[n("p",{staticStyle:{position:"relative"}},[t._v("\n 时间差\n "),n("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[n("div",{attrs:{slot:"content"},slot:"content"},[t._v("付费网管课结束后与购买日期的时间差")]),t._v(" "),n("i",{staticClass:"el-icon-question",staticStyle:{"font-size":"18px",color:"#f56c6c"}})])],1)]}},{key:"default",fn:function(e){return[n("div",[n("p",[t._v(t._s(e.row.intervalDay+"天"))])])]}}])})],1),t._v(" "),n("pagination",{attrs:{sync:"",total:t.rules.total,"save-key":"accompanyBuys",page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:total":function(e){return t.$set(t.rules,"total",e)},"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)},o=[],r=(n("386d"),n("1cc7")),s=n("333d"),l=n("bc3a"),i=n.n(l),c=n("5f87"),u=n("3908"),p=(n("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(){this.init()},computed:{saveKey:function(){return this.$route.path+"/2"}},methods:{init:function(){this.$store.dispatch("setBranchs"),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(r["lc"])(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,n={buyPractice:e.buy||null,organId:e.organIdList||null,search:e.search||null},a="/api-web/export/studentBuyPractice",o={method:"POST",headers:{Authorization:Object(c["b"])(),tenantId:Object(c["a"])()},params:n,url:a,responseType:"blob"};this.$confirm("您确定导出报表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){u["a"].startLoading(),i()(o).then((function(e){var n=new Blob([e.data],{type:"application/vnd.ms-excel;charset=utf-8"}),a=new Response(n).text();a.then((function(e){if(-1!=e.indexOf("code")){var a=JSON.parse(e);if(403==a.code)return t.$message.error("登录过期,请重新登录!"),void setTimeout((function(){t.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);t.$message.error(a.msg)}else{var o=URL.createObjectURL(n),r=document.createElement("a"),s="网管课购买"+(new Date).getTime()+".xls";r.href=o,r.setAttribute("download",s),document.body.appendChild(r),r.click()}})),u["a"].endLoading()})).catch((function(e){t.$message.error("导出数据失败,请联系管理员"),u["a"].endLoading()}))})).catch((function(){}))}}}),d=p,m=n("2877"),f=Object(m["a"])(d,a,o,!1,null,"2688e53c",null);e["default"]=f.exports}}]);
|