2 lines
1.8 KiB
Java
2 lines
1.8 KiB
Java
import{d as s,M as n}from"./index-X7Y8jykP.js";const u="/sys/role/exportXls",i="/sys/role/importExcel",c=e=>s.get({url:"/sys/role/list",params:e}),d=e=>s.get({url:"/sys/role/listByTenant",params:e}),y=(e,t)=>s.delete({url:"/sys/role/delete",params:e},{joinParamsToUrl:!0}).then(()=>{t()}),R=(e,t)=>{n.confirm({title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>s.delete({url:"/sys/role/deleteBatch",data:e},{joinParamsToUrl:!0}).then(()=>{t()})})},m=(e,t)=>{let r=t?"/sys/role/edit":"/sys/role/add";return s.post({url:r,params:e})};let l;const p=e=>new Promise((t,r)=>{clearTimeout(l),l=setTimeout(()=>{s.get({url:"/sys/role/checkRoleCode",params:e},{isTransformResponse:!1}).then(o=>{t(o)}).catch(o=>{r(o)})},500)}),T=()=>s.get({url:"/sys/role/queryTreeList"}),x=e=>s.get({url:"/sys/permission/queryRolePermission",params:e}),U=e=>s.post({url:"/sys/permission/saveRolePermission",params:e}),h=e=>s.get({url:`/sys/role/datarule/${e.functionId}/${e.roleId}`},{isTransformResponse:!1}),f=e=>s.post({url:"/sys/role/datarule",params:e}),g=e=>s.get({url:"/sys/user/userRoleList",params:e}),P=(e,t)=>s.delete({url:"/sys/user/deleteUserRole",params:e},{joinParamsToUrl:!0}).then(()=>{t()}),q=(e,t)=>{n.confirm({title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>s.delete({url:"/sys/user/deleteUserRoleBatch",params:e},{joinParamsToUrl:!0}).then(()=>{t()})})},I=(e,t)=>s.post({url:"/sys/user/addSysUserRole",params:e}).then(()=>{t()}),k=(e,t)=>{let r=t?"/sys/sysRoleIndex/edit":"/sys/sysRoleIndex/add";return s.post({url:r,params:e})},B=e=>s.get({url:"/sys/sysRoleIndex/queryByCode",params:e},{isTransformResponse:!1});export{f as a,k as b,B as c,u as d,R as e,y as f,i as g,d as h,p as i,q as j,I as k,c as l,P as m,x as n,U as o,T as p,h as q,m as s,g as u};
|