roleinfo-manage.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. 角色管理
  3. @author laiyh
  4. @Date 2020-09-16
  5. */
  6. import req from "@/utils/req"
  7. import axios from "../utils/req"
  8. export const base = "/authsvr/v2/roleinfo"
  9. // 应用有限配额角色列表
  10. export const orgQuoRoleTable = `${base}/orgQuotoAuthInfo/_search`
  11. // 应用系统角色数
  12. export const appRoleTableUrl = `${base}/roleList/_search`
  13. // 新增
  14. export function addRole(data) {
  15. return axios.post(`${base}/role`, data, { loading: true })
  16. }
  17. // 修改
  18. export function editRole(data) {
  19. return axios.put(`${base}/role`, data)
  20. }
  21. // 删除
  22. export function deleteRole(id) {
  23. return axios.delete(`${base}/role/${id}`)
  24. }
  25. // 详情
  26. export function getRoleInfo(id) {
  27. return axios.get(`${base}/role/${id}`)
  28. }
  29. // 根据roleId 获取勾选菜单
  30. export function getMenuChecked(roleId) {
  31. return axios.get(`${base}/checked/${roleId}`)
  32. }
  33. // 保存角色菜单
  34. export function saveRsGrid(data) {
  35. return axios.post(`${base}/rsGrid`, data)
  36. }
  37. // 角色申请
  38. export function roleApply(data) {
  39. return axios.post(`${base}/role-operate-apply`, data)
  40. }