Skip to content

Commit 77971f9

Browse files
committed
2 parents ecf9f26 + 624594b commit 77971f9

File tree

103 files changed

+6516
-1838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+6516
-1838
lines changed

src/api/bpm/category/index.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import request from '@/config/axios'
2+
3+
// BPM 流程分类 VO
4+
export interface CategoryVO {
5+
id: number // 分类编号
6+
name: string // 分类名
7+
code: string // 分类标志
8+
status: number // 分类状态
9+
sort: number // 分类排序
10+
}
11+
12+
// BPM 流程分类 API
13+
export const CategoryApi = {
14+
// 查询流程分类分页
15+
getCategoryPage: async (params: any) => {
16+
return await request.get({ url: `/bpm/category/page`, params })
17+
},
18+
19+
// 查询流程分类列表
20+
getCategorySimpleList: async () => {
21+
return await request.get({ url: `/bpm/category/simple-list` })
22+
},
23+
24+
// 查询流程分类详情
25+
getCategory: async (id: number) => {
26+
return await request.get({ url: `/bpm/category/get?id=` + id })
27+
},
28+
29+
// 新增流程分类
30+
createCategory: async (data: CategoryVO) => {
31+
return await request.post({ url: `/bpm/category/create`, data })
32+
},
33+
34+
// 修改流程分类
35+
updateCategory: async (data: CategoryVO) => {
36+
return await request.put({ url: `/bpm/category/update`, data })
37+
},
38+
39+
// 删除流程分类
40+
deleteCategory: async (id: number) => {
41+
return await request.delete({ url: `/bpm/category/delete?id=` + id })
42+
}
43+
}

src/api/bpm/definition/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import request from '@/config/axios'
22

3-
export const getProcessDefinitionBpmnXML = async (id: number) => {
3+
export const getProcessDefinition = async (id: number, key: string) => {
44
return await request.get({
5-
url: '/bpm/process-definition/get-bpmn-xml?id=' + id
5+
url: '/bpm/process-definition/get',
6+
params: { id, key }
67
})
78
}
89

src/api/bpm/form/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export const getFormPage = async (params) => {
4949
}
5050

5151
// 获得动态表单的精简列表
52-
export const getSimpleFormList = async () => {
52+
export const getFormSimpleList = async () => {
5353
return await request.get({
54-
url: '/bpm/form/list-all-simple'
54+
url: '/bpm/form/simple-list'
5555
})
5656
}

src/api/bpm/leave/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import request from '@/config/axios'
22

33
export type LeaveVO = {
44
id: number
5-
result: number
5+
status: number
66
type: number
77
reason: string
88
processInstanceId: string
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import request from '@/config/axios'
2+
3+
// BPM 流程表达式 VO
4+
export interface ProcessExpressionVO {
5+
id: number // 编号
6+
name: string // 表达式名字
7+
status: number // 表达式状态
8+
expression: string // 表达式
9+
}
10+
11+
// BPM 流程表达式 API
12+
export const ProcessExpressionApi = {
13+
// 查询BPM 流程表达式分页
14+
getProcessExpressionPage: async (params: any) => {
15+
return await request.get({ url: `/bpm/process-expression/page`, params })
16+
},
17+
18+
// 查询BPM 流程表达式详情
19+
getProcessExpression: async (id: number) => {
20+
return await request.get({ url: `/bpm/process-expression/get?id=` + id })
21+
},
22+
23+
// 新增BPM 流程表达式
24+
createProcessExpression: async (data: ProcessExpressionVO) => {
25+
return await request.post({ url: `/bpm/process-expression/create`, data })
26+
},
27+
28+
// 修改BPM 流程表达式
29+
updateProcessExpression: async (data: ProcessExpressionVO) => {
30+
return await request.put({ url: `/bpm/process-expression/update`, data })
31+
},
32+
33+
// 删除BPM 流程表达式
34+
deleteProcessExpression: async (id: number) => {
35+
return await request.delete({ url: `/bpm/process-expression/delete?id=` + id })
36+
},
37+
38+
// 导出BPM 流程表达式 Excel
39+
exportProcessExpression: async (params) => {
40+
return await request.download({ url: `/bpm/process-expression/export-excel`, params })
41+
}
42+
}

src/api/bpm/processInstance/index.ts

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,49 @@ export type ProcessInstanceVO = {
2020
endTime: string
2121
}
2222

23-
export type ProcessInstanceCCVO = {
24-
type: number,
25-
taskName: string,
26-
taskKey: string,
27-
processInstanceName: string,
28-
processInstanceKey: string,
29-
startUserId: string,
30-
options:string [],
23+
export type ProcessInstanceCopyVO = {
24+
type: number
25+
taskName: string
26+
taskKey: string
27+
processInstanceName: string
28+
processInstanceKey: string
29+
startUserId: string
30+
options: string[]
3131
reason: string
3232
}
3333

34-
export const getMyProcessInstancePage = async (params) => {
34+
export const getProcessInstanceMyPage = async (params: any) => {
3535
return await request.get({ url: '/bpm/process-instance/my-page', params })
3636
}
3737

38+
export const getProcessInstanceManagerPage = async (params: any) => {
39+
return await request.get({ url: '/bpm/process-instance/manager-page', params })
40+
}
41+
3842
export const createProcessInstance = async (data) => {
3943
return await request.post({ url: '/bpm/process-instance/create', data: data })
4044
}
4145

42-
export const cancelProcessInstance = async (id: number, reason: string) => {
46+
export const cancelProcessInstanceByStartUser = async (id: number, reason: string) => {
4347
const data = {
4448
id: id,
4549
reason: reason
4650
}
47-
return await request.delete({ url: '/bpm/process-instance/cancel', data: data })
51+
return await request.delete({ url: '/bpm/process-instance/cancel-by-start-user', data: data })
4852
}
4953

50-
export const getProcessInstance = async (id: number) => {
51-
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
54+
export const cancelProcessInstanceByAdmin = async (id: number, reason: string) => {
55+
const data = {
56+
id: id,
57+
reason: reason
58+
}
59+
return await request.delete({ url: '/bpm/process-instance/cancel-by-admin', data: data })
5260
}
5361

54-
/**
55-
* 抄送
56-
* @param data 抄送数据
57-
* @returns 是否抄送成功
58-
*/
59-
export const createProcessInstanceCC = async (data) => {
60-
return await request.post({ url: '/bpm/process-instance/cc/create', data: data })
62+
export const getProcessInstance = async (id: string) => {
63+
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
6164
}
6265

63-
/**
64-
* 抄送列表
65-
* @param params
66-
* @returns
67-
*/
68-
export const getProcessInstanceCCPage = async (params) => {
69-
return await request.get({ url: '/bpm/process-instance/cc/my-page', params })
70-
}
66+
export const getProcessInstanceCopyPage = async (params: any) => {
67+
return await request.get({ url: '/bpm/process-instance/copy/page', params })
68+
}

src/api/bpm/processListener/index.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import request from '@/config/axios'
2+
3+
// BPM 流程监听器 VO
4+
export interface ProcessListenerVO {
5+
id: number // 编号
6+
name: string // 监听器名字
7+
type: string // 监听器类型
8+
status: number // 监听器状态
9+
event: string // 监听事件
10+
valueType: string // 监听器值类型
11+
value: string // 监听器值
12+
}
13+
14+
// BPM 流程监听器 API
15+
export const ProcessListenerApi = {
16+
// 查询流程监听器分页
17+
getProcessListenerPage: async (params: any) => {
18+
return await request.get({ url: `/bpm/process-listener/page`, params })
19+
},
20+
21+
// 查询流程监听器详情
22+
getProcessListener: async (id: number) => {
23+
return await request.get({ url: `/bpm/process-listener/get?id=` + id })
24+
},
25+
26+
// 新增流程监听器
27+
createProcessListener: async (data: ProcessListenerVO) => {
28+
return await request.post({ url: `/bpm/process-listener/create`, data })
29+
},
30+
31+
// 修改流程监听器
32+
updateProcessListener: async (data: ProcessListenerVO) => {
33+
return await request.put({ url: `/bpm/process-listener/update`, data })
34+
},
35+
36+
// 删除流程监听器
37+
deleteProcessListener: async (id: number) => {
38+
return await request.delete({ url: `/bpm/process-listener/delete?id=` + id })
39+
}
40+
}

src/api/bpm/task/index.ts

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,78 +4,63 @@ export type TaskVO = {
44
id: number
55
}
66

7-
export const getTodoTaskPage = async (params) => {
7+
export const getTaskTodoPage = async (params: any) => {
88
return await request.get({ url: '/bpm/task/todo-page', params })
99
}
1010

11-
export const getDoneTaskPage = async (params) => {
11+
export const getTaskDonePage = async (params: any) => {
1212
return await request.get({ url: '/bpm/task/done-page', params })
1313
}
1414

15-
export const completeTask = async (data) => {
16-
return await request.put({ url: '/bpm/task/complete', data })
15+
export const getTaskManagerPage = async (params: any) => {
16+
return await request.get({ url: '/bpm/task/manager-page', params })
1717
}
1818

19-
export const approveTask = async (data) => {
19+
export const approveTask = async (data: any) => {
2020
return await request.put({ url: '/bpm/task/approve', data })
2121
}
2222

23-
export const rejectTask = async (data) => {
23+
export const rejectTask = async (data: any) => {
2424
return await request.put({ url: '/bpm/task/reject', data })
2525
}
26-
export const backTask = async (data) => {
27-
return await request.put({ url: '/bpm/task/back', data })
28-
}
29-
30-
export const updateTaskAssignee = async (data) => {
31-
return await request.put({ url: '/bpm/task/update-assignee', data })
32-
}
3326

34-
export const getTaskListByProcessInstanceId = async (processInstanceId) => {
27+
export const getTaskListByProcessInstanceId = async (processInstanceId: string) => {
3528
return await request.get({
3629
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
3730
})
3831
}
3932

40-
// 导出任务
41-
export const exportTask = async (params) => {
42-
return await request.download({ url: '/bpm/task/export', params })
43-
}
44-
4533
// 获取所有可回退的节点
46-
export const getReturnList = async (params) => {
47-
return await request.get({ url: '/bpm/task/return-list', params })
34+
export const getTaskListByReturn = async (id: string) => {
35+
return await request.get({ url: '/bpm/task/list-by-return', params: { id } })
4836
}
4937

5038
// 回退
51-
export const returnTask = async (data) => {
39+
export const returnTask = async (data: any) => {
5240
return await request.put({ url: '/bpm/task/return', data })
5341
}
5442

55-
/**
56-
* 委派
57-
*/
58-
export const delegateTask = async (data) => {
43+
// 委派
44+
export const delegateTask = async (data: any) => {
5945
return await request.put({ url: '/bpm/task/delegate', data })
6046
}
6147

62-
/**
63-
* 加签
64-
*/
65-
export const taskAddSign = async (data) => {
66-
return await request.put({ url: '/bpm/task/create-sign', data })
48+
// 转派
49+
export const transferTask = async (data: any) => {
50+
return await request.put({ url: '/bpm/task/transfer', data })
6751
}
6852

69-
/**
70-
* 获取减签任务列表
71-
*/
72-
export const getChildrenTaskList = async (id: string) => {
73-
return await request.get({ url: '/bpm/task/children-list?taskId=' + id })
53+
// 加签
54+
export const signCreateTask = async (data: any) => {
55+
return await request.put({ url: '/bpm/task/create-sign', data })
7456
}
7557

76-
/**
77-
* 减签
78-
*/
79-
export const taskSubSign = async (data) => {
58+
// 减签
59+
export const signDeleteTask = async (data: any) => {
8060
return await request.delete({ url: '/bpm/task/delete-sign', data })
8161
}
62+
63+
// 获取减签任务列表
64+
export const getChildrenTaskList = async (id: string) => {
65+
return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id })
66+
}

src/api/bpm/taskAssignRule/index.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/api/bpm/userGroup/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type UserGroupVO = {
44
id: number
55
name: string
66
description: string
7-
memberUserIds: number[]
7+
userIds: number[]
88
status: number
99
remark: string
1010
createTime: string
@@ -42,6 +42,6 @@ export const getUserGroupPage = async (params) => {
4242
}
4343

4444
// 获取用户组精简信息列表
45-
export const getSimpleUserGroupList = async (): Promise<UserGroupVO[]> => {
46-
return await request.get({ url: '/bpm/user-group/list-all-simple' })
45+
export const getUserGroupSimpleList = async (): Promise<UserGroupVO[]> => {
46+
return await request.get({ url: '/bpm/user-group/simple-list' })
4747
}

0 commit comments

Comments
 (0)