| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0ebc"],{"+h1d":function(e,t,a){"use strict";var s={components:{video_course:a("bmyc").a},props:{defaultActive:{type:String,default:""},slideName:{type:String,default:""},slideBottomName:{type:String,default:""},top_style:{type:String,default:""}},data:function(){return{search:{}}},mounted:function(){},methods:{}},i=(a("sxda"),a("KHd+")),r=Object(i.a)(s,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"all"},[a("video_course",{attrs:{defaultActive:e.defaultActive}}),e._v(" "),a("div",{staticStyle:{width:"calc(100% - 150px)"},attrs:{id:"app"}},[e._t("top-other"),e._v(" "),a("div",{staticClass:"top-pane",style:e.top_style},[a("div",{staticClass:"vue-main-title"},[a("div",{staticClass:"vue-main-title-left"}),e._v(" "),a("div",{staticClass:"vue-main-title-content"},[e._v(e._s(e.slideName))]),e._v(" "),e._t("top")],2),e._v(" "),a("div",{staticClass:"vue-search"},[e._t("content")],2)]),e._v(" "),e.slideBottomName?a("div",{staticClass:"table-pane"},[a("div",{staticClass:"vue-main-title"},[a("div",{staticClass:"vue-main-title-left"}),e._v(" "),a("div",{staticClass:"vue-main-title-content"},[e._v(e._s(e.slideBottomName))])]),e._v(" "),a("div",{staticClass:"vue-search"},[e._t("content-bottom")],2)]):e._e(),e._v(" "),e.slideBottomName?a("div",{staticClass:"vue-page"},[e._t("vue-page")],2):e._e(),e._v(" "),e._t("bottom-other")],2)],1)},[],!1,null,"121101e6",null);r.options.__file="slide_cpm.vue";t.a=r.exports},"3M4J":function(e,t,a){"use strict";function s(){for(var e=new Date,t=[],a=1;a<13;a++)for(var s=new Date(e.getFullYear(),a,0).getDate(),i=1;i<s+1;i++){var r=[];r[0]=i+"日",r[1]=a+"月",r[2]=0,t.push(r)}return t.length}function i(e){var t={};return e.reduce(function(e,a){return!t[a.id]&&(t[a.id]=e.push(a)),e},[])}a.d(t,"b",function(){return s}),a.d(t,"a",function(){return i})},E4ZW:function(e,t,a){},EzgT:function(e,t,a){},O7Sl:function(e,t,a){"use strict";var s=a("3M4J"),i={data:function(){return{times:[],timeType:0,days_of_last_year:365}},mounted:function(){this.days_of_last_year=Object(s.b)(),console.log(this.days_of_last_year,"days_of_last_year",Object(s.b)()),this.switchSearchTime(5)},methods:{pickerChangeFn:function(e){console.log(e,"eventevent"),e||(this.timeType=0)},getStartEndTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=864e5*e,a=new Date((new Date).setHours(0,0,0,0)).getTime(),s=new Date((new Date).setHours(23,59,59,999)).getTime(),i=s-t;return[parseInt(a-t),parseInt(e>1?s:i)]},switchSearchTime:function(e){var t=void 0;switch(e){case 1:t=this.getStartEndTime(0);break;case 2:t=this.getStartEndTime(1);break;case 3:t=this.getStartEndTime(7);break;case 4:t=this.getStartEndTime(30);break;case 5:t=this.getStartEndTime(this.days_of_last_year)}this.times=t,this.timeType==e?(this.timeType=0,this.times=[]):this.timeType=e}}},r=(a("aZbm"),a("KHd+")),n=Object(r.a)(i,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Header",{staticClass:"time-list"},[a("el-date-picker",{attrs:{"value-format":"timestamp",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:e.pickerChangeFn},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}}),e._v(" "),a("el-button",{class:1==e.timeType?"button-color left-gap":"active-colors left-gap",attrs:{type:"success",plain:""},on:{click:function(t){e.switchSearchTime(1)}}},[e._v("今")]),e._v(" "),a("el-button",{class:2==e.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(t){e.switchSearchTime(2)}}},[e._v("昨")]),e._v(" "),a("el-button",{class:3==e.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(t){e.switchSearchTime(3)}}},[e._v("近7天")]),e._v(" "),a("el-button",{class:4==e.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(t){e.switchSearchTime(4)}}},[e._v("近30天")]),e._v(" "),a("el-button",{class:5==e.timeType?"button-color":"active-colors",attrs:{type:"success",plain:""},on:{click:function(t){e.switchSearchTime(5)}}},[e._v("近1年")])],1)},[],!1,null,"40c25990",null);n.options.__file="time_card.vue";t.a=n.exports},XM7T:function(e,t,a){"use strict";var s=a("jQ9f");a.n(s).a},aZbm:function(e,t,a){"use strict";var s=a("EzgT");a.n(s).a},jQ9f:function(e,t,a){},sxda:function(e,t,a){"use strict";var s=a("E4ZW");a.n(s).a},xhSJ:function(e,t,a){"use strict";a.r(t);var s=a("14Xm"),i=a.n(s),r=a("QbLZ"),n=a.n(r),l=a("D3Ub"),o=a.n(l),c=a("+h1d"),u=a("O7Sl"),m={components:{slide_cpm:c.a,time_card:u.a},data:function(){return{search:{member_id:"",keyword:"",role:""},roleOptions:[],tableData:[],current_page:1,total:0,per_page:1}},mounted:function(){this.getRoleList(1)},methods:{getRoleList:function(e){var t=this;return o()(i.a.mark(function a(){var s,r,l,o,c;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,$http.pc_post("plugin/wechatVideoCourses/getRoleList",{search:n()({},t.search,{date:[t.$refs.time_card.times?parseInt(t.$refs.time_card.times[0]/1e3):"",t.$refs.time_card.times?parseInt(t.$refs.time_card.times[1]/1e3):""]}),page:e});case 2:if(s=a.sent,r=s.data,l=s.result,o=s.msg,l){for(c in t.roleOptions=[],r.role_level)t.roleOptions.push({value:c,label:r.role_level[c]});t.tableData=r.role_list.data,t.total=r.role_list.total,t.current_page=r.role_list.current_page,t.per_page=r.role_list.per_page}else t.$message.error(o);case 7:case"end":return a.stop()}},a,t)}))()},editRole:function(e){this.$router.push(this.fun.getUrl("videoAdminEditing",{id:e},{}))},deleteRole:function(e){var t=this;this.$confirm("此操作将永久删除该条数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(o()(i.a.mark(function a(){var s,r,n;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,$http.pc_post("plugin/wechatVideoCourses/deleteRole",{role_id:e});case 2:s=a.sent,s.data,r=s.result,n=s.msg,r?(t.$message.success(n),t.getRoleList(1)):t.$message.error(n);case 7:case"end":return a.stop()}},a,t)}))).catch(function(){t.$message({type:"info",message:"已取消删除"})})},export1:function(){var e=this.fun.getRealPCUrl("plugin/wechatVideoCourses/exportRole")+"&search[date]="+[this.$refs.time_card.times?parseInt(this.$refs.time_card.times[0]/1e3):"",this.$refs.time_card.times?parseInt(this.$refs.time_card.times[1]/1e3):""]+"&search[member_id]="+this.search.member_id+"&search[keyword]="+this.search.keyword+"&search[role]="+this.search.role;console.log(e,"111href"),this.download(e,"")},download:function(e,t){var a=document.createElement("a");a.download=t,a.href=e,a.click(),a.remove()}}},d=(a("XM7T"),a("KHd+")),p=Object(d.a)(m,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"video-course"},[a("slide_cpm",{attrs:{defaultActive:"videoRoleManagement",slideName:"角色管理",slideBottomName:"管理列表"}},[a("template",{slot:"top"},[a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus"},on:{click:function(t){e.editRole(0)}}},[e._v("新增管理员")])],1),e._v(" "),a("template",{slot:"content"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"会员ID"},model:{value:e.search.member_id,callback:function(t){e.$set(e.search,"member_id",t)},expression:"search.member_id"}})],1),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"会员昵称/姓名/手机号"},model:{value:e.search.keyword,callback:function(t){e.$set(e.search,"keyword",t)},expression:"search.keyword"}})],1),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择角色"},model:{value:e.search.role,callback:function(t){e.$set(e.search,"role",t)},expression:"search.role"}},e._l(e.roleOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),a("time_card",{ref:"time_card",attrs:{days_of_last_year:"365"}}),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{staticClass:"width-btn",attrs:{type:"primary"},on:{click:function(t){e.getRoleList(1)}}},[e._v("搜索")])],1),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{staticClass:"width-btn",on:{click:e.export1}},[e._v("导出")])],1)],1)],1),e._v(" "),a("template",{slot:"content-bottom"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"id",label:"ID",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"时间",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"member_id",label:"会员ID",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"会员",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"member-box"},[a("img",{attrs:{src:t.row.member.avatar_image,alt:""}}),e._v(" "),a("div",{staticClass:"member-nickname"},[e._v("\n "+e._s(t.row.member.nickname)+"\n ")])])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"role_name",label:"角色",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("i",{staticClass:"el-icon-edit icon-sty",on:{click:function(a){e.editRole(t.row.id)}}}),e._v(" "),a("i",{staticClass:"el-icon-delete icon-sty",on:{click:function(a){e.deleteRole(t.row.id)}}})]}}])})],1)],1),e._v(" "),a("template",{slot:"vue-page"},[a("el-row",[a("el-col",{attrs:{align:"right"}},[a("el-pagination",{attrs:{layout:"prev, pager, next,jumper",total:e.total,"page-size":e.per_page,"current-page":e.current_page,background:""},on:{"current-change":e.getRoleList}})],1)],1)],1)],2)],1)},[],!1,null,"56bc0221",null);p.options.__file="role_management.vue";t.default=p.exports}}]);
|