workFlowService.ts
1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import request from "@/utils/request";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore()
const userData = JSON.parse(userStore.userData)
// 获取流程详情。
export const getProcessFlowDetail = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/detail/?approvalGuid=${params}`,
method: 'post',
})
// 审批通过
export const passFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/allow-flow`,
method: 'post',
data: params
})
// 审批驳回
export const rejectFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/backup-flow`,
method: 'post',
data: params
})
// 审批撤销
export const revokeFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/canal-flow`,
method: 'post',
data: params
})
// 删除流程
export const deleteFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/del`,
method: 'post',
params
})
export const getFlowData = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/page-list`,
method: 'post',
data: params
})
export const getCamundaDeploymentId = (flowType) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/get-camunda-deployment-id`,
method: 'post',
data: {
tenantGuid: userData.tenantGuid,
flowType:flowType,
staffGuid: userData.staffGuid,
}
})
export const getDetailDataPromise = (deploymentId)=> request({
url: `${import.meta.env.VITE_APP_CAMUNDA_URL}/process-definition/get-detail?deploymentId=${deploymentId}`,
method: 'get',
})
export const getProcessNodesPromise = (params)=>request({
url: `${import.meta.env.VITE_APP_CAMUNDA_URL}/process-definition/get-process-nodes`,
method: 'post',
data: params
})