(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2a548046"],{"3c50":function(t,e,a){"use strict";var s=a("9ab4"),i=a("1b40");let n=class extends i.e{pageChange(t){this.value.page=t,this.$emit("change",this.value)}sizeChange(t){this.value.size=t,this.value.page=1,this.$emit("change",this.value)}};Object(s.a)([Object(i.c)({default:()=>({})})],n.prototype,"value",void 0),Object(s.a)([Object(i.c)({default:()=>[10,20,30]})],n.prototype,"pageSizes",void 0),Object(s.a)([Object(i.c)({default:"total, sizes, prev, pager, next, jumper"})],n.prototype,"layout",void 0),n=Object(s.a)([i.a],n);var l=n,o=a("2877"),r=Object(o.a)(l,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"ls-pagination"},[e("el-pagination",{attrs:{"current-page":this.value.page,"page-sizes":this.pageSizes,"page-size":this.value.size,layout:this.layout,total:this.value.count},on:{"current-change":this.pageChange,"size-change":this.sizeChange}})],1)}),[],!1,null,"0dcdf38b",null);e.a=r.exports},"68eb":function(t,e,a){"use strict";a.d(e,"e",(function(){return i})),a.d(e,"c",(function(){return n})),a.d(e,"a",(function(){return l})),a.d(e,"b",(function(){return o})),a.d(e,"d",(function(){return r})),a.d(e,"k",(function(){return c})),a.d(e,"i",(function(){return u})),a.d(e,"g",(function(){return d})),a.d(e,"j",(function(){return p})),a.d(e,"h",(function(){return h})),a.d(e,"f",(function(){return g}));var s=a("f175");const i=t=>s.a.get("/auth.admin/lists",{params:t}),n=t=>s.a.get("/auth.admin/detail",{params:t}),l=t=>s.a.post("/auth.admin/add",t),o=t=>s.a.post("/auth.admin/delete",t),r=t=>s.a.post("/auth.admin/edit",t),c=t=>s.a.get("/auth.role/lists",{params:t}),u=t=>s.a.get("/auth.role/detail",{params:t}),d=t=>s.a.post("/auth.role/add",t),p=t=>s.a.post("/auth.role/edit",t),h=t=>s.a.post("/auth.role/delete",t),g=()=>s.a.post("/config/getMenu")},b39b:function(t,e,a){"use strict";a.r(e);var s=a("9ab4"),i=a("1b40"),n=a("6ddb"),l=a("68eb"),o=a("3c50"),r=a("0a6d"),c=a("4201");let u=class extends i.e{constructor(){super(...arguments),this.pager=new n.a}onRoleAdd(){this.$router.push({path:"/setting/permissions/role_edit",query:{mode:c.e.ADD}})}onRoleEdit(t){this.$router.push({path:"/setting/permissions/role_edit",query:{mode:c.e.EDIT,id:t.id}})}onRoleDel(t){Object(l.h)({id:t.id}).then(()=>{this.getRoleList(),this.$message.success("删除成功!")}).catch(()=>{this.$message.error("删除失败!")})}getRoleList(){this.pager.request({callback:l.k}).catch(()=>{this.$message.error("数据请求失败，刷新重载!")})}created(){this.getRoleList()}};u=Object(s.a)([Object(i.a)({components:{LsDialog:r.a,LsPagination:o.a}})],u);var d=u,p=a("2877"),h=Object(p.a)(d,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"permissions-role"},[a("div",{staticClass:"ls-card"},[a("div",{staticClass:"function-container"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onRoleAdd}},[t._v("添加角色")])],1),a("div",{staticClass:"ls-content__table m-t-16"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pager.loading,expression:"pager.loading"}],staticStyle:{width:"100%"},attrs:{data:t.pager.lists,size:"mini"}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"180"}}),a("el-table-column",{attrs:{prop:"name",label:"名称",width:"180"}}),a("el-table-column",{attrs:{prop:"auth_desc",label:"权限"}}),a("el-table-column",{attrs:{prop:"desc",label:"说明"}}),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间"}}),a("el-table-column",{attrs:{fixed:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onRoleEdit(e.row)}}},[t._v("编辑")]),a("ls-dialog",{staticClass:"m-l-10 inline",on:{confirm:function(a){return t.onRoleDel(e.row)}}},[a("el-button",{attrs:{slot:"trigger",type:"text",size:"small"},slot:"trigger"},[t._v("删除")])],1)]}}])})],1),a("div",{staticClass:"ls-content__pagination flex row-right m-t-16"},[a("ls-pagination",{on:{change:t.getRoleList},model:{value:t.pager,callback:function(e){t.pager=e},expression:"pager"}})],1)],1)])])}),[],!1,null,"5eebe0b1",null);e.default=h.exports}}]);