workFlowService.ts
2.62 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
61
62
63
64
65
66
67
68
69
70
71
72
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, serviceTenantGuid:any=null) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/allow-flow${ serviceTenantGuid ? `?serviceTenantGuid=${serviceTenantGuid}` : '' }`,
method: 'post',
data: params
})
// 审批驳回
export const rejectFlowData = (params, serviceTenantGuid:any=null) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/backup-flow${ serviceTenantGuid ? `?serviceTenantGuid=${serviceTenantGuid}` : '' }`,
method: 'post',
data: params
})
// 审批撤销
export const revokeFlowData = (params, serviceTenantGuid:any=null) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/canal-flow${ serviceTenantGuid ? `?serviceTenantGuid=${serviceTenantGuid}` : '' }`,
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, tenantGuid = null, staffGuid = null) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/get-camunda-deployment-id`,
method: 'post',
data: {
tenantGuid: tenantGuid || userData.tenantGuid,
flowType:flowType,
staffGuid: 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
})
export const isMyFirstNode = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/work-flow/data/is-my-first-node`,
method: 'post',
data: params
})
/** 功能流程配置-获取是否需要审批 */
export const isNeedApprove = (params) => request({
url: `${import.meta.env.VITE_APP_WORK_FLOW_URL}/func-flow-config/is-need-approve?funcCode=${params.funcCode}`,
method: 'get',
})