x-php-Admin/dist/static/js/340.929766bb.js
2024-01-05 16:08:59 +08:00

1 line
4.5 KiB
JavaScript

"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[340],{6340:function(e,t,a){a.r(t),a.d(t,{default:function(){return y}});var n=a(6808),l=a(9511);const i=e=>((0,n.dD)("data-v-1377d2f7"),e=e(),(0,n.Cn)(),e),u=i((()=>(0,n._)("span",null,"系统管理组",-1))),s={key:0,class:"menu-tag"},d=i((()=>(0,n._)("span",null,"自定义用户组",-1))),o={key:0,class:"menu-tag"},p=i((()=>(0,n._)("span",null,"用户等级组",-1))),r={key:0,class:"menu-tag"};function m(e,t,a,i,m,c){const f=(0,n.up)("x-page-header"),w=(0,n.up)("el-header"),g=(0,n.up)("el-icon-Setting"),h=(0,n.up)("el-icon"),y=(0,n.up)("el-menu-item"),k=(0,n.up)("el-sub-menu"),v=(0,n.up)("el-icon-Stamp"),_=(0,n.up)("el-icon-Flag"),x=(0,n.up)("el-menu"),C=(0,n.up)("el-main"),W=(0,n.up)("el-button"),D=(0,n.up)("el-footer"),T=(0,n.up)("el-container"),b=(0,n.up)("el-aside"),z=(0,n.up)("save"),$=(0,n.Q2)("loading");return(0,n.wg)(),(0,n.j4)(T,{style:{padding:"10px 10px 5px 10px"}},{default:(0,n.w5)((()=>[(0,n.Wm)(T,{style:{border:"1px solid var(--el-border-color-light)","border-radius":"4px","background-color":"var(--el-fill-color-blank)"}},{default:(0,n.w5)((()=>[(0,n.wy)(((0,n.wg)(),(0,n.j4)(b,{width:"200px"},{default:(0,n.w5)((()=>[(0,n.Wm)(T,null,{default:(0,n.w5)((()=>[(0,n.Wm)(w,null,{default:(0,n.w5)((()=>[(0,n.Wm)(f,{title:"用户组",icon:"el-icon-Calendar"})])),_:1}),(0,n.Wm)(C,{class:"nopadding"},{default:(0,n.w5)((()=>[(0,n.Wm)(x,{"default-active":m.activeType,onOpen:c.handleOpen,onClose:c.handleClose,"unique-opened":!0,defaultOpeneds:["system"]},{default:(0,n.w5)((()=>[(0,n.Wm)(k,{index:"system"},{title:(0,n.w5)((()=>[(0,n.Wm)(h,null,{default:(0,n.w5)((()=>[(0,n.Wm)(g)])),_:1}),u])),default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(m.groupList.system,((e,t)=>((0,n.wg)(),(0,n.j4)(y,{key:t,index:e.id,onClick:t=>c.menuClick(e)},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(e.title)+" ",1),e.count?((0,n.wg)(),(0,n.iD)("span",s,(0,l.zw)(e.count),1)):(0,n.kq)("",!0)])),_:2},1032,["index","onClick"])))),128))])),_:1}),(0,n.Wm)(k,{index:"default"},{title:(0,n.w5)((()=>[(0,n.Wm)(h,null,{default:(0,n.w5)((()=>[(0,n.Wm)(v)])),_:1}),d])),default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(m.groupList.default,((e,t)=>((0,n.wg)(),(0,n.j4)(y,{key:t,index:e.id,onClick:t=>c.menuClick(e)},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(e.title)+" ",1),e.count?((0,n.wg)(),(0,n.iD)("span",o,(0,l.zw)(e.count),1)):(0,n.kq)("",!0)])),_:2},1032,["index","onClick"])))),128))])),_:1}),(0,n.Wm)(k,{index:"member"},{title:(0,n.w5)((()=>[(0,n.Wm)(h,null,{default:(0,n.w5)((()=>[(0,n.Wm)(_)])),_:1}),p])),default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(m.groupList.member,((e,t)=>((0,n.wg)(),(0,n.j4)(y,{key:t,index:e.id,onClick:t=>c.menuClick(e)},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(e.title)+" ",1),e.count?((0,n.wg)(),(0,n.iD)("span",r,(0,l.zw)(e.count),1)):(0,n.kq)("",!0)])),_:2},1032,["index","onClick"])))),128))])),_:1})])),_:1},8,["default-active","onOpen","onClose"])])),_:1}),m.activeType?((0,n.wg)(),(0,n.j4)(D,{key:0},{default:(0,n.w5)((()=>[(0,n.Wm)(W,{onClick:t[0]||(t[0]=e=>c.add()),icon:"el-icon-plus",size:"small",type:m.addType[m.activeType]},{default:(0,n.w5)((()=>[(0,n.Uk)("添加用户组")])),_:1},8,["type"])])),_:1})):(0,n.kq)("",!0)])),_:1})])),_:1})),[[$,m.menuloading]]),(0,n.Wm)(T,null,{default:(0,n.w5)((()=>[(0,n.Wm)(C,{class:"nopadding",ref:"main",style:{padding:"20px"}},{default:(0,n.w5)((()=>[(0,n.Wm)(z,{info:{},onRefreshData:c.refreshData,activeType:m.activeType,ref:"save"},null,8,["onRefreshData","activeType"])])),_:1},512)])),_:1})])),_:1})])),_:1})}var c=a(860);let f=1;var w={name:"systemmenu",components:{save:c["default"]},data(){return{menuloading:!1,groupList:{system:[]},groupInfo:{},activeType:"system",menuProps:{label:e=>e.meta.title},menuFilterText:"",addType:{system:"primary",default:"warning",member:"danger"}}},watch:{menuFilterText(e){this.$refs.menu.filter(e)}},mounted(){this.getData()},methods:{async getData(){this.menuloading=!0;var e=await this.$http.get("user/group/lists");this.menuloading=!1,this.groupList=e.data},menuClick(e){this.groupInfo=e,this.$refs.save.setData(e)},async refreshData(){var e=await this.$http.get("user/group/lists");this.groupList=e.data},handleOpen(e){this.activeType=e,this.$refs.save.setData({})},handleClose(){this.activeType="",this.$refs.save.setData({})},async add(){var e="未命名"+f++,t={id:-1,title:e,type:this.activeType,authority:{},adminnode:{}};this.$refs.save.setData(t)}}},g=a(8700);const h=(0,g.Z)(w,[["render",m],["__scopeId","data-v-1377d2f7"]]);var y=h}}]);