654a1d7af03db6d4fc49.js 4.7 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[47],{440:function(t,e,r){},491:function(t,e,r){"use strict";var n=r(440);r.n(n).a},545:function(t,e,r){"use strict";r.r(e);r(31),r(11),r(7),r(4),r(22),r(187),r(30);var n=r(3),o=r(9);function c(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}var l=["用户ID","昵称","会员类型","开始时间","到期时间","取消时间","操作人员","最新购买","累计月数","累计金额","当前状态","操作"],d=["uid","nickname","type_name","start_date","end_date","cancel_date","operator_name","pay_date","total_month","total_price","status_name","action"],f={data:function(){return{listData:{},titleInfo:{},totalCount:0,currentPage:1,pageSize:20,tableHeaders:l,tableProps:d,tableData:[]}},computed:{whole:function(){return this.listData.whole||{}}},mounted:function(){this.getTableData()},filters:{toDate:function(t){return new Date(1e3*t).toLocaleDateString()},projectLink:function(i){var t=i.entity_type,link="javascript:void(0)";return"1"===t?link=this.$store.state.domainConfig.siteUrl+"/rooter/outsourceitem/".concat(i.entity_id,">"):"3"===t&&(link=this.$store.state.domainConfig.siteUrl+"/rooter/wagedetails?job_id=".concat(i.entity_id)),link}},methods:{clickUID:function(t){var e=t.uid;window.open(this.$store.state.domainConfig.siteUrl+"/rooter/user/".concat(e))},changePagination:function(){this.getTableData()},formatTableData:function(data){return data.map((function(i){return function(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(e){Object(o.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}({},i)}))},getTableData:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r,data,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.tableData=[],t.currentPage,e.next=4,t.$post("/api/admin/vip/getVips",{page:t.currentPage,page_size:t.page_size});case 4:r=e.sent,data=r.data,data.current_env,n=data.list,t.listData=data,t.tableData=n,t.totalCount=Number(data.total),t.totalPage=data.pages;case 12:case"end":return e.stop()}}),e)})))()},cancelUserVip:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.$post("/api/admin/vip/cancelVips",{uid:t.uid});case 2:(n=r.sent).status>0&&e.$message({message:n.info,type:"success"}),e.getTableData();case 5:case"end":return r.stop()}}),r)})))()}}},_=(r(491),r(2)),component=Object(_.a)(f,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"vip-manager"}},[r("div",{staticClass:"title"},[t._v("会员数:正常"+t._s(t.whole.total_normal)+", 过期"+t._s(t.whole.total_overdue)+"; 初创版会员: 正常"+t._s(t.whole.company_normal)+", 过期"+t._s(t.whole.company_overdue)+";企业版会员: 正常"+t._s(t.whole.premium_normal)+", 过期"+t._s(t.whole.premius_overdue)+";开发者会员: 正常"+t._s(t.whole.person_normal)+", 过期"+t._s(t.whole.person_overdue))]),t._v(" "),r("div",{staticClass:"table"},[t.tableData.length?r("el-table",{staticStyle:{width:"100%"},attrs:{border:"",data:t.tableData}},t._l(t.tableProps,(function(e,n){return r("el-table-column",{key:n,attrs:{prop:e,label:t.tableHeaders[n]},scopedSlots:t._u([{key:"default",fn:function(n){return["uid"===e?r("el-button",{staticClass:"ctrls",attrs:{type:"text"},on:{click:function(e){return t.clickUID(n.row)}}},[t._v(t._s(n.row[e]))]):"operator_name"===e?r("el-button",{staticClass:"ctrls",attrs:{type:"text"},on:{click:function(e){return t.clickUID({uid:n.row.operator_id})}}},[t._v(t._s(n.row[e]))]):"action"===e?[0!=n.row.status?r("el-button",{attrs:{type:"text"},on:{click:function(e){return t.cancelUserVip(n.row)}}},[t._v("取消会员")]):t._e()]:r("span",[t._v(t._s(n.row[e]))])]}}],null,!0)})})),1):t._e()],1),t._v(" "),r("div",{staticClass:"order-footer",staticStyle:{"margin-top":"20px"}},[r("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.totalCount},on:{"current-change":t.changePagination,"size-change":t.changePageSize,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e}}})],1)])}),[],!1,null,"7e56b3dd",null);e.default=component.exports}}]);