webpackJsonp([67],{yxLS:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Dd8w"),l=a.n(n),i=a("Pfph"),o={name:"roleManage",data:function(){return{loading:!1,params:{page_no:1,page_size:10},tableData:""}},mounted:function(){this.GET_RoleList()},methods:{handlePageSizeChange:function(e){this.params.page_size=e,this.GET_RoleList()},handlePageCurrentChange:function(e){this.params.page_no=e,this.GET_RoleList()},handleAddRole:function(){this.$router.push({name:"roleManageAdd",params:{id:0,callback:this.GET_RoleList}})},handleEditRole:function(e){this.$router.push({name:"roleManageEdit",params:{id:e.role_id,callback:this.GET_RoleList}})},handleDeleteRole:function(e){var t=this;this.$confirm("确定要删除这个角色吗？","提示",{type:"warning"}).then(function(){i.d(e.role_id).then(function(){t.$message.success("删除成功！"),t.GET_RoleList()})}).catch(function(){})},searchEvent:function(e){this.params=l()({},this.params,{keyword:e}),this.params.page_no=1,this.GET_RoleList()},GET_RoleList:function(){var e=this;this.loading=!0,i.j(this.params).then(function(t){e.loading=!1,e.tableData=t}).catch(function(){e.loading=!1})}}},s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("en-table-layout",{attrs:{tableData:e.tableData.data,loading:e.loading}},[a("div",{staticClass:"inner-toolbar",attrs:{slot:"toolbar"},slot:"toolbar"},[a("div",{staticClass:"toolbar-btns"},[e.checkPermission(["roleManage:add"])?a("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:e.handleAddRole}},[e._v("添加")]):e._e()],1),e._v(" "),a("div",{staticClass:"toolbar-search"},[a("en-table-search",{attrs:{placeholder:"请输入关键字"},on:{search:e.searchEvent}})],1)]),e._v(" "),a("template",{slot:"table-columns"},[a("el-table-column",{attrs:{prop:"role_name",label:"角色名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"role_describe",label:"角色描述"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.checkPermission(["roleManage:edit"])?a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(a){return e.handleEditRole(t.row)}}},[e._v("编辑")]):e._e(),e._v(" "),e.checkPermission(["roleManage:del"])?a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return e.handleDeleteRole(t.row)}}},[e._v("删除")]):e._e()]}}])})],1),e._v(" "),e.tableData?a("el-pagination",{attrs:{slot:"pagination","current-page":e.tableData.page_no,"page-sizes":[10,20,50,100],"page-size":e.tableData.page_size,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.data_total},on:{"size-change":e.handlePageSizeChange,"current-change":e.handlePageCurrentChange},slot:"pagination"}):e._e()],2)},r=[];s._withStripped=!0;var c=a("XyMi"),u=Object(c.a)(o,s,r,!1,null,null,null);u.options.__file="src\\views\\setting\\auth-settings\\roleManage.vue";t.default=u.exports}});