import{d as o}from"./vue.D1BjjNmv.js";import{t as r,X as n}from"./index.Df8UJ10K.js";const s={drawerVisible:!1,roleId:void 0,roleName:void 0,users:[]},i=o("RoleDrawerStores",{state:()=>({...s}),actions:{handleDrawerOpen(e){this.drawerVisible=!0,this.set_state(e)},set_state(e){this.roleName=e.name,this.roleId=e.id,this.users=e.users},handleDrawerClose(){Object.assign(this.$state,s)}}});function l(e){return r({url:"/api/system/role_menu_button_permission/get_role_menu/",method:"get",params:e}).then(t=>n.toArrayTree(t.data,{key:"id",parentKey:"parent",children:"children",strict:!1}))}function m(e){return r({url:"/api/system/role_menu_button_permission/set_role_menu/",method:"put",data:e})}function _(e){return r({url:"/api/system/role_menu_button_permission/get_role_menu_btn_field/",method:"get",params:e})}function p(e){return r({url:"/api/system/role_menu_button_permission/set_role_menu_btn/",method:"put",data:e})}function d(e,t){return r({url:`/api/system/role_menu_button_permission/${e}/set_role_menu_field/`,method:"put",data:t})}function h(e){return r({url:"/api/system/role_menu_button_permission/set_role_menu_btn_data_range/",method:"put",data:e})}function c(e){return r({url:"/api/system/role_menu_button_permission/role_to_dept_all/",method:"get",params:e})}function f(){return r({url:"/api/system/user/",method:"get",params:{limit:999}}).then(e=>n.map(e.data,t=>({id:t.id,name:t.name,user_type:t.user_type})))}function b(e,t){return r({url:`/api/system/role/${e}/set_role_users/`,method:"put",data:t})}export{i as R,c as a,p as b,d as c,l as d,m as e,_ as f,f as g,b as h,h as s};
