(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{437:function(e,t,r){},508:function(e,t,r){"use strict";r(437)},584:function(e,t,r){"use strict";r.r(t);r(9),r(12),r(24),r(25);var n=r(4),o=r(3);r(52),r(14),r(179),r(35);function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function l(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(t){Object(n.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var f=["创建者","群组ID","群组名称","管理人员","关联工作","创建时间","最近更新","操作"],d=["nickname","id","name","managers","jobs","create_date","update_date","ctrl"],m={data:function(){return{options:[{value:-1,label:"全部"},{value:0,label:"提交"},{value:1,label:"成功"},{value:2,label:"失败"},{value:3,label:"进行中"}],selectValue:-1,totalCount:0,currentPage:1,tableHeaders:f,tableProps:d,tableData:[],env:"test",isSuper:!1,pageSize:20}},computed:{isTest:function(){return"test"===this.env}},mounted:function(){this.getTableData()},methods:{changeSelect:function(e){this.getTableData()},clickSuper:function(e){var t=this;return Object(o.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.isSuper){r.next=3;break}return t.$message({message:"不是超管, 没有权限"}),r.abrupt("return");case 3:window.open(t.$store.state.domainConfig.siteUrl+"/rooter/loginmember?uid=".concat(e.uid,"&next=/group/").concat(e.id));case 4:case"end":return r.stop()}}),r)})))()},clickUID:function(e){window.open(this.$store.state.domainConfig.siteUrl+"/rooter/user/".concat(e.uid))},tableRowClassName:function(e){var t=e.row,r=(e.rowIndex,"");return"1"===t.status&&(r="success-row"),r},formatTableData:function(data){return data.map((function(i){return l(l({},i),{},{managers:i.managers.map((function(e){return e?e.nickname:""})).join(";"),jobs:Object.keys(i.jobs).map((function(e){var t=i.jobs[e];return t?"".concat(t.nickname,"(").concat(t.id,")"):""})).join(";")})}))},getTableData:function(){var e=arguments,t=this;return Object(o.a)(regeneratorRuntime.mark((function r(){var n,o,data;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.currentPage,t.tableData=[],r.next=4,t.$post("/api/admin/group/list",{page:n,page_size:20});case 4:o=r.sent,data=o.data,t.env=data.current_env,t.isSuper=data.is_super_admin,t.tableData=t.formatTableData(data.list),t.totalCount=Number(data.total),t.totalPage=data.totalPage;case 11:case"end":return r.stop()}}),r)})))()}}},w=(r(508),r(2)),component=Object(w.a)(m,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"withdraw"}},[r("div",{staticClass:"table"},[e.tableData.length?r("el-table",{staticStyle:{width:"100%"},attrs:{border:"",data:e.tableData,"row-class-name":e.tableRowClassName}},e._l(e.tableProps,(function(t,n){return r("el-table-column",{key:n,attrs:{prop:t,label:e.tableHeaders[n]},scopedSlots:e._u([{key:"default",fn:function(n){return["nickname"===t?r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.clickUID(n.row)}}},[e._v(e._s(n.row[t]))]):"ctrl"===t&&"1"!==n.row.status?r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.clickSuper(n.row)}}},[e._v("超管查看")]):r("span",[e._v(e._s(n.row[t]))])]}}],null,!0)})})),1):e._e()],1),e._v(" "),r("el-pagination",{attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:"total, prev, pager, next",total:e.totalCount},on:{"current-change":e.getTableData,"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t}}})],1)}),[],!1,null,"46aa7c5c",null);t.default=component.exports}}]);