ncs_functions_role_mapping.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import request from '@/utils/request'
  2. export function getList(params) {
  3. return request({
  4. url: '/ncs/functionrolemapping/page',
  5. method: 'POST',
  6. data: params,
  7. headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  8. })
  9. }
  10. export function getFunctionsRoleMappingByCodeAndPartId(function_code,part_id) {
  11. return request({
  12. url: `/ncs/functionrolemapping/${function_code}/${part_id}`,
  13. method: 'GET'
  14. })
  15. }
  16. export function remove(id) {
  17. return request({
  18. url: `/ncs/functionrolemapping/${id}`,
  19. method: 'DELETE',
  20. loading: true
  21. })
  22. }
  23. /** 修改 */
  24. export function update(id, params) {
  25. return request({
  26. url: `/ncs/functionrolemapping/${id}`,
  27. method: 'put',
  28. data: params,
  29. headers: { 'Content-Type': 'application/json' }
  30. })
  31. }
  32. /** 新增 */
  33. export function add(params) {
  34. return request({
  35. url: '/ncs/functionrolemapping',
  36. method: 'POST',
  37. loading: true,
  38. data: params,
  39. headers: { 'Content-Type': 'application/json' }
  40. })
  41. }