chunk-f40d8ca4.dd150b90.js 3.2 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f40d8ca4"],{"68eb":function(t,e,a){"use strict";a.d(e,"e",(function(){return s})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return l})),a.d(e,"d",(function(){return o})),a.d(e,"k",(function(){return c})),a.d(e,"i",(function(){return d})),a.d(e,"g",(function(){return u})),a.d(e,"j",(function(){return p})),a.d(e,"h",(function(){return g})),a.d(e,"f",(function(){return m}));var n=a("f175");const s=t=>n.a.get("/auth.admin/lists",{params:t}),i=t=>n.a.get("/auth.admin/detail",{params:t}),r=t=>n.a.post("/auth.admin/add",t),l=t=>n.a.post("/auth.admin/delete",t),o=t=>n.a.post("/auth.admin/edit",t),c=t=>n.a.get("/auth.role/lists",{params:t}),d=t=>n.a.get("/auth.role/detail",{params:t}),u=t=>n.a.post("/auth.role/add",t),p=t=>n.a.post("/auth.role/edit",t),g=t=>n.a.post("/auth.role/delete",t),m=()=>n.a.post("/config/getMenu")},b39b:function(t,e,a){"use strict";a.r(e);a("14d9");var n=a("9ab4"),s=a("1b40"),i=a("6ddb"),r=a("68eb"),l=a("3c50"),o=a("0a6d"),c=a("4201");let d=class extends s.e{constructor(){super(...arguments),this.pager=new i.a}onRoleAdd(){this.$router.push({path:"/setting/permissions/role_edit",query:{mode:c.g.ADD}})}onRoleEdit(t){this.$router.push({path:"/setting/permissions/role_edit",query:{mode:c.g.EDIT,id:t.id}})}onRoleDel(t){Object(r.h)({id:t.id}).then(()=>{this.getRoleList(),this.$message.success("删除成功!")}).catch(()=>{this.$message.error("删除失败!")})}getRoleList(){this.pager.request({callback:r.k}).catch(()=>{this.$message.error("数据请求失败,刷新重载!")})}created(){this.getRoleList()}};d=Object(n.a)([Object(s.a)({components:{LsDialog:o.a,LsPagination:l.a}})],d);var u=d,p=a("2877"),g=Object(p.a)(u,(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,"d86d28e6",null);e.default=g.exports}}]);