entrust.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import request from '@/utils/request'
  2. // 获取流程委托列表
  3. export function FlowDelegateList(data) {
  4. return request({
  5. url: `/api/workflow/delegate`,
  6. method: 'get',
  7. data
  8. })
  9. }
  10. // 获取流程委托信息
  11. export function FlowDelegateInfo(id) {
  12. return request({
  13. url: `/api/workflow/delegate/${id}`,
  14. method: 'get'
  15. })
  16. }
  17. // 删除流程委托
  18. export function DeleteDelagate(id) {
  19. return request({
  20. url: `/api/workflow/delegate/${id}`,
  21. method: 'DELETE'
  22. })
  23. }
  24. // 新建流程委托
  25. export function Create(data) {
  26. return request({
  27. url: `/api/workflow/delegate`,
  28. method: 'post',
  29. data
  30. })
  31. }
  32. // 更新流程委托
  33. export function Update(data) {
  34. return request({
  35. url: `/api/workflow/delegate/${data.id}`,
  36. method: 'PUT',
  37. data
  38. })
  39. }
  40. // 获取流程的所有委托人
  41. export function getDelegateUser(id) {
  42. return request({
  43. url: `/api/workflow/delegate/UserList?templateId=${id}`,
  44. method: 'get'
  45. })
  46. }
  47. // 获取一个委托终止
  48. export function entrustStop(id) {
  49. return request({
  50. url: `/api/workflow/delegate/Stop/${id}`,
  51. method: 'put',
  52. data: {}
  53. })
  54. }
  55. // 获取用户下拉框列表
  56. export const getListByAuthorize = (organizeId, keyword) => {
  57. return request({
  58. url: `/api/permission/Users/GetListByAuthorize/${organizeId}`,
  59. method: 'post',
  60. data: {
  61. keyword
  62. }
  63. })
  64. }
  65. // 获取用户下拉框列表
  66. export function getPrincipalDetails(id) {
  67. return request({
  68. url: `/api/workflow/delegate/Info/${id}`,
  69. method: 'get'
  70. })
  71. }
  72. // 接受委托
  73. export function entrustHandle(id, data) {
  74. return request({
  75. url: `/api/workflow/delegate/Notarize/${id}?type=${data.type}`,
  76. method: 'post',
  77. data: {}
  78. })
  79. }