You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.1 KiB

1 month ago
  1. import { createAPI } from "@/utils/httpRequest.js";
  2. // ========== 流程模板相关API - rqrq ==========
  3. // 查询流程模板列表
  4. export const searchTemplateList = data => createAPI(`/workFlow/template/list`, 'post', data)
  5. // 获取流程模板详情
  6. export const getTemplateDetail = data => createAPI(`/workFlow/template/detail`, 'post', data)
  7. // 保存流程模板
  8. export const saveTemplate = data => createAPI(`/workFlow/template/save`, 'post', data)
  9. // 删除流程模板
  10. export const deleteTemplate = data => createAPI(`/workFlow/template/delete`, 'post', data)
  11. // 启用流程模板
  12. export const enableTemplate = data => createAPI(`/workFlow/template/enable`, 'post', data)
  13. // 停用流程模板
  14. export const disableTemplate = data => createAPI(`/workFlow/template/disable`, 'post', data)
  15. // 复制流程模板
  16. export const copyTemplate = data => createAPI(`/workFlow/template/copy`, 'post', data)
  17. // 查询用户列表(选择审批人)
  18. export const searchUserList = data => createAPI(`/workFlow/template/searchUserList`, 'post', data)
  19. // 查询部门列表 - rqrq
  20. export const searchDepartmentList = data => createAPI(`/workFlow/template/searchDepartmentList`, 'post', data)
  21. // ========== 审批任务相关API - rqrq ==========
  22. // 查询待办任务列表(所有任务)
  23. export const searchPendingTaskList = data => createAPI(`/workFlow/task/allPendingList`, 'post', data)
  24. // 查询已办任务列表(所有任务)
  25. export const searchCompletedTaskList = data => createAPI(`/workFlow/task/allCompletedList`, 'post', data)
  26. // ========== 流程实例相关API - rqrq ==========
  27. // 查询流程实例列表
  28. export const searchInstanceList = data => createAPI(`/workFlow/instance/list`, 'post', data)
  29. // 查询节点实例列表
  30. export const searchNodeInstanceList = data => createAPI(`/workFlow/instance/nodeList`, 'post', data)
  31. // 创建流程实例(测试用)
  32. export const createFlowInstance = data => createAPI(`/workFlow/instance/create`, 'post', data)
  33. // 审批节点实例
  34. export const approveNodeInstance = data => createAPI(`/workFlow/instance/approve`, 'post', data)
  35. // 获取流程预览
  36. export const getFlowPreview = data => createAPI(`/workFlow/instance/flowPreview`, 'post', data)
  37. // 重新审批流程实例 - rqrq
  38. export const restartFlowInstance = data => createAPI(`/workFlow/instance/restart`, 'post', data)
  39. // 获取任务详情
  40. export const getTaskDetail = data => createAPI(`/workFlow/task/detail`, 'post', data)
  41. // 查询审批记录
  42. export const getApprovalHistory = data => createAPI(`/workFlow/task/history`, 'post', data)
  43. // 审批通过
  44. export const approveTask = data => createAPI(`/workFlow/task/approve`, 'post', data)
  45. // 审批驳回
  46. export const rejectTask = data => createAPI(`/workFlow/task/reject`, 'post', data)
  47. // 启动审批流程
  48. export const startFlow = data => createAPI(`/workFlow/task/startFlow`, 'post', data)
  49. // 获取待办任务数量
  50. export const getPendingTaskCount = data => createAPI(`/workFlow/task/pendingCount`, 'post', data)
  51. // 撤回审批
  52. export const withdrawTask = data => createAPI(`/workFlow/task/withdraw`, 'post', data)