import{B as u}from"./vue.BxlDVA1H.js";import{r as t,m as n,X as o}from"./index.lP_uh0LI.js";const a={drawerVisible:!1,roleId:void 0,roleName:void 0,users:[]},m=u("RoleDrawerStores",{state:()=>({...a}),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,a)}}}),s=`${n.system}role_menu_button_permission/`;function d(e){return t({url:`${s}get_role_menu/`,method:"get",params:e}).then(r=>o.toArrayTree(r.data,{key:"id",parentKey:"parent",children:"children",strict:!1}))}function _(e){return t({url:`${s}set_role_menu/`,method:"put",data:e})}function h(e){return t({url:`${s}get_role_menu_btn_field/`,method:"get",params:e})}function p(e){return t({url:`${s}set_role_menu_btn/`,method:"put",data:e})}function c(e,r){return t({url:`${s}${e}/set_role_menu_field/`,method:"put",data:r})}function f(e){return t({url:`${s}set_role_menu_btn_data_range/`,method:"put",data:e})}function g(e){return t({url:`${s}role_to_dept_all/`,method:"get",params:e})}function $(){return t({url:`${n.system}user/`,method:"get",params:{limit:999}}).then(e=>o.map(e.data.results||[],r=>({id:r.id,name:r.name})))}function R(e,r){return t({url:`${n.system}role/${e}/set_role_users/`,method:"put",data:r})}export{m as R,d as a,h as b,R as c,g as d,f as e,p as f,$ as g,c as h,_ as s};
