roleInfoManagement.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import request from '@/utils/request' //引入axios请求及拦截器
  2. export default {
  3. //新增角色
  4. addRole(data) {
  5. return request({
  6. url: '/system/role',
  7. method: 'post',
  8. data
  9. })
  10. },
  11. //状态修改
  12. changeStatusRole(data) {
  13. return request({
  14. url: '/system/role/changeStatus',
  15. method: 'post',
  16. data
  17. })
  18. },
  19. //修改保存数据权限
  20. dataScopeRole(data) {
  21. return request({
  22. url: '/system/role/dataScope',
  23. method: 'post',
  24. data
  25. })
  26. },
  27. //修改保存角色
  28. editRole(data) {
  29. return request({
  30. url: '/system/role/edit',
  31. method: 'post',
  32. data
  33. })
  34. },
  35. //角色列表
  36. obtainRoleList(data) {
  37. return request({
  38. url: '/system/role/list',
  39. method: 'get',
  40. params: data
  41. })
  42. },
  43. //获取角色选择框列表
  44. obtainRoleOptionselect(data) {
  45. return request({
  46. url: '/system/role/optionselect',
  47. method: 'get',
  48. params: data
  49. })
  50. },
  51. //根据角色编号获取详细信息
  52. obtainRoleId(data) {
  53. return request({
  54. url: `/system/role/` + data,
  55. method: 'get',
  56. })
  57. },
  58. }