companyWorkflow.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. import request from '@/utils/request'
  2. // 查询AI工作流列表
  3. export function listWorkflow(query) {
  4. return request({
  5. url: '/company/companyWorkflow/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. export function myListWorkflow(query) {
  11. return request({
  12. url: '/company/companyWorkflow/myList',
  13. method: 'get',
  14. params: query
  15. })
  16. }
  17. // 查询AI工作流详细
  18. export function getWorkflow(workflowId) {
  19. return request({
  20. url: '/company/companyWorkflow/' + workflowId,
  21. method: 'get'
  22. })
  23. }
  24. // 新增AI工作流
  25. export function addWorkflow(data) {
  26. return request({
  27. url: '/company/companyWorkflow/save',
  28. method: 'post',
  29. data: data
  30. })
  31. }
  32. // 修改AI工作流
  33. export function updateWorkflow(data) {
  34. return request({
  35. url: '/company/companyWorkflow/save',
  36. method: 'post',
  37. data: data
  38. })
  39. }
  40. // 修改AI工作流状态
  41. export function updateWorkflowStatus(workflowId, status) {
  42. return request({
  43. url: '/company/companyWorkflow/status/' + workflowId + '/' + status,
  44. method: 'put'
  45. })
  46. }
  47. // 删除AI工作流
  48. export function delWorkflow(workflowId) {
  49. return request({
  50. url: '/company/companyWorkflow/' + workflowId,
  51. method: 'delete'
  52. })
  53. }
  54. // 复制AI工作流
  55. export function copyWorkflow(workflowId) {
  56. return request({
  57. url: '/company/companyWorkflow/copy/' + workflowId,
  58. method: 'post'
  59. })
  60. }
  61. // 获取节点类型列表
  62. export function getNodeTypes() {
  63. return request({
  64. url: '/company/companyWorkflow/nodeTypes',
  65. method: 'get'
  66. })
  67. }
  68. // 导出AI工作流
  69. export function exportWorkflow(query) {
  70. return request({
  71. url: '/company/companyWorkflow/export',
  72. method: 'get',
  73. params: query
  74. })
  75. }
  76. // 根据workflowId获取绑定的销售列表
  77. export function getBindCompanyUserByWorkflowId(workflowId) {
  78. return request({
  79. url: '/company/companyWorkflow/getBindCompanyUserByWorkflowId/' + workflowId,
  80. method: 'get'
  81. })
  82. }
  83. // 获取销售列表
  84. export function listCompanyUser() {
  85. return request({
  86. url: '/company/companyWorkflow/listCompanyUser',
  87. method: 'get'
  88. })
  89. }
  90. // 检查销售是否已被绑定
  91. export function checkCompanyUserBeUsed(companyUserId) {
  92. return request({
  93. url: '/company/companyWorkflow/checkCompanyUserBeUsed/' + companyUserId,
  94. method: 'get'
  95. })
  96. }
  97. // 更新工作流绑定销售
  98. export function updateWorkflowBindCompanyUser(data) {
  99. return request({
  100. url: '/company/companyWorkflow/updateWorkflowBindCompanyUser',
  101. method: 'post',
  102. data: data
  103. })
  104. }
  105. // 更新工作流绑定销售
  106. export function optionList() {
  107. return request({
  108. url: '/company/companyWorkflow/optionList',
  109. method: 'get'
  110. })
  111. }
  112. export function getWorkflowNodeTypeCodes(workflowId) {
  113. return request({
  114. url: '/company/companyWorkflow/nodeTypeCodes/' + workflowId,
  115. method: 'get'
  116. })
  117. }
  118. //查看工作流历史版本
  119. export function getWorkflowVersionList(workflowId) {
  120. return request({
  121. url: '/company/companyWorkflow/versionList/' + workflowId,
  122. method: 'get'
  123. })
  124. }
  125. // 查询版本详情
  126. export function getWorkflowVersionDetail(versionId) {
  127. return request({
  128. url: '/company/companyWorkflow/versionDetail/' + versionId,
  129. method: 'get'
  130. })
  131. }
  132. // 回退到指定版本
  133. export function rollbackWorkflowVersion(versionId) {
  134. return request({
  135. url: '/company/companyWorkflow/versionRollback/' + versionId,
  136. method: 'post'
  137. })
  138. }