webpackJsonp([17],{CSLK:function(t,e){},eZJA:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("P9l9"),o={name:"userList",data:function(){return{requestProject:"gic-authcenter",searchInput:"",tableData:[],currentPage:1,pageSize:10,totalCount:0,loading:!1}},mounted:function(){this.init()},methods:{init:function(){var t=this.$route.query.tabId;this.$emit("showTab",t),this.getList()},getList:function(){var t=this;this.loading=!0;var e={requestProject:this.requestProject,currentPage:this.currentPage,pageSize:this.pageSize,search:this.searchInput};Object(n.b)("/gic-authcenter/user",e).then(function(e){var a=e.data;t.loading=!1,0==a.errorCode?(t.tableData=a.result?a.result:[],t.totalCount=a.totalCount):t.$message.error(a.message)}).catch(function(t){console.log(t)})},handleCurrentChange:function(t){this.currentPage=t,this.getList()},handleSizeChange:function(t){this.pageSize=t,this.getList()},searchList:function(){this.currentPage=1,this.getList()},delAuthority:function(t,e){var a=this;this.$confirm("是否要删除选中的用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var o={requestProject:a.requestProject};Object(n.a)("/gic-authcenter/user/"+t.loginName,o).then(function(t){var n=t.data;0==n.errorCode?(a.totalCount--,a.tableData.splice(e,1),0==a.tableData.length&&(a.currentPage>1?(a.currentPage--,a.getList()):a.totalCount>0&&a.getList()),a.$message.success("删除成功")):a.$message.error(n.message)})}).catch(function(t){console.log(t)})},addUserBtn:function(t,e){"add"==t?this.$router.push({path:"/addUser",query:{tabId:this.$route.query.tabId}}):"edit"==t&&this.$router.push({path:"/addUser",query:{loginName:e.loginName,tabId:this.$route.query.tabId}})}},components:{}},r={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"my-right-content"},[n("div",{staticClass:"search-wrap clearfix"},[n("el-input",{staticClass:"fl",attrs:{"prefix-icon":"el-icon-search",placeholder:"请输入内容",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchList(e)}},model:{value:t.searchInput,callback:function(e){t.searchInput=e},expression:"searchInput"}}),t._v(" "),n("el-button",{staticClass:"fr",attrs:{type:"primary"},on:{click:function(e){return t.addUserBtn("add")}}},[t._v("新增用户")])],1),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"table-no-line-wrap",attrs:{data:t.tableData,"max-height":"550"}},[n("el-table-column",{attrs:{prop:"loginName",label:"用户名","show-overflow-tooltip":""}}),t._v(" "),n("el-table-column",{attrs:{prop:"employeeNumber",label:"工号","show-overflow-tooltip":""}}),t._v(" "),n("el-table-column",{attrs:{prop:"realName",label:"姓名","show-overflow-tooltip":""}}),t._v(" "),n("el-table-column",{attrs:{prop:"sex",label:"性别"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.sex?n("span",[t._v("女")]):1==e.row.sex?n("span",[t._v("男")]):n("span",[t._v("未知")])]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"departmentName",label:"部门名称","show-overflow-tooltip":""}}),t._v(" "),n("el-table-column",{attrs:{prop:"position",label:"职位","show-overflow-tooltip":""}}),t._v(" "),n("el-table-column",{attrs:{prop:"email",label:"邮箱","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n        "+t._s(e.row.email?e.row.email:"--")+"\n      ")]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"userMobile",label:"手机号码","show-overflow-tooltip":""}}),t._v(" "),n("el-table-column",{attrs:{prop:"opr",label:"操作",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text"},on:{click:function(a){return t.addUserBtn("edit",e.row)}}},[t._v("编辑")]),t._v(" "),n("el-button",{attrs:{type:"text"},on:{click:function(a){return t.delAuthority(e.row,e.$index)}}},[t._v("删除")])]}}])}),t._v(" "),n("template",{slot:"empty"},[n("div",{staticClass:"no-data-wrap"},[n("div",{staticClass:"no-data-icon"},[n("img",{attrs:{src:a("8Td+"),alt:""}})]),t._v(" "),n("p",[t._v("暂无数据")])])])],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.totalCount>0,expression:"totalCount > 0"}],staticClass:"pagination"},[n("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var s=a("VU/8")(o,r,!1,function(t){a("CSLK")},"data-v-43a7013d",null);e.default=s.exports}});
//# sourceMappingURL=17.361b0fa77a8271459a33.1558087223141.js.map