chunk-5e9eef69.6d162881.js 8.4 KB

1
  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",[a("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}}},[a("el-form-item",[a("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(" "),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.selects.branchs,(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:{"native-type":"submit",type:"danger"}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"}},[t._v("重置")])],1),t._v(" "),a("el-form-item",[a("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(" "),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:"学员编号"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("copy-text",[t._v(t._s(e.row.studentId))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentName",label:"学员名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("copy-text",[t._v(t._s(e.row.studentName))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"organName",label:"所属分部"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("copy-text",[t._v(t._s(e.row.organName))])]}}])}),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("\n 结束日期\n "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("免费网管课最后一节课截止日期")]),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("\n 购买日期\n "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("付费网管课第一次购买时间")]),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("\n 时间差\n "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("付费网管课结束后与购买日期的时间差")]),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:{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)},r=[],s=(a("386d"),a("1cc7")),o=a("333d"),l=a("bc3a"),i=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(){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(s["mc"])(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["b"])(),tenantId: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);if(403==n.code)return t.$message.error("登录过期,请重新登录!"),void setTimeout((function(){t.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);t.$message.error(n.msg)}else{var r=URL.createObjectURL(a),s=document.createElement("a"),o="网管课购买"+(new Date).getTime()+".xls";s.href=r,s.setAttribute("download",o),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,"2688e53c",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("tab-router",{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:"网管课管理",lazy:"",name:"1"}},["1"===t.activeIndex?a("accompanyList"):t._e()],1),t._v(" "),a("el-tab-pane",{attrs:{label:"网管课购买",lazy:"",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 网管课管理\n ")])}],s=a("2de7"),o=a("0ab0"),l={components:{accompanyList:s["default"],accompanyBuys:o["default"]},data:function(){return{activeIndex:"1"}},created:function(){},mounted:function(){},methods:{handleClick:function(t){}}},i=l,c=a("2877"),u=Object(c["a"])(i,n,r,!1,null,"1baaae66",null);e["default"]=u.exports}}]);