Skip to content

Commit b94235a

Browse files
YunaiVgitee-org
authored andcommitted
!452 BPM 的草稿 PR(非 BPM 开发成员,不用关注)
Merge pull request !452 from 芋道源码/feature/bpm
2 parents 2d245d1 + 619491b commit b94235a

Some content is hidden

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

47 files changed

+5697
-2663
lines changed

src/api/bpm/model/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,18 @@ export const getModelPage = async (params) => {
3030
return await request.get({ url: '/bpm/model/page', params })
3131
}
3232

33-
export const getModel = async (id: number) => {
33+
export const getModel = async (id: string) => {
3434
return await request.get({ url: '/bpm/model/get?id=' + id })
3535
}
3636

3737
export const updateModel = async (data: ModelVO) => {
3838
return await request.put({ url: '/bpm/model/update', data: data })
3939
}
4040

41+
export const updateModelBpmn = async (data: ModelVO) => {
42+
return await request.put({ url: '/bpm/model/update-bpmn', data: data })
43+
}
44+
4145
// 任务状态修改
4246
export const updateModelState = async (id: number, state: number) => {
4347
const data = {

src/api/bpm/processInstance/index.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import request from '@/config/axios'
22
import { ProcessDefinitionVO } from '@/api/bpm/model'
3-
3+
import { NodeType } from '@/components/SimpleProcessDesignerV2/src/consts'
44
export type Task = {
55
id: string
66
name: string
@@ -22,6 +22,35 @@ export type ProcessInstanceVO = {
2222
processDefinition?: ProcessDefinitionVO
2323
}
2424

25+
// 用户信息
26+
export type User = {
27+
id: number,
28+
nickname: string,
29+
avatar: string
30+
}
31+
32+
// 审批任务信息
33+
export type ApprovalTaskInfo = {
34+
id: number,
35+
ownerUser: User,
36+
assigneeUser: User,
37+
status: number,
38+
reason: string
39+
40+
}
41+
42+
// 审批节点信息
43+
export type ApprovalNodeInfo = {
44+
id : number
45+
name: string
46+
nodeType: NodeType
47+
status: number
48+
startTime?: Date
49+
endTime?: Date
50+
candidateUserList?: User[]
51+
tasks: ApprovalTaskInfo[]
52+
}
53+
2554
export const getProcessInstanceMyPage = async (params: any) => {
2655
return await request.get({ url: '/bpm/process-instance/my-page', params })
2756
}
@@ -57,3 +86,14 @@ export const getProcessInstance = async (id: string) => {
5786
export const getProcessInstanceCopyPage = async (params: any) => {
5887
return await request.get({ url: '/bpm/process-instance/copy/page', params })
5988
}
89+
90+
// 获取审批详情
91+
export const getApprovalDetail = async (processInstanceId?:string, processDefinitionId?:string) => {
92+
const param = processInstanceId ? '?processInstanceId='+ processInstanceId : '?processDefinitionId='+ processDefinitionId
93+
return await request.get({ url: 'bpm/process-instance/get-approval-detail'+ param })
94+
}
95+
96+
// 获取表单字段权限
97+
export const getFormFieldsPermission = async (params: any) => {
98+
return await request.get({ url: '/bpm/process-instance/get-form-fields-permission', params })
99+
}

src/api/bpm/simple/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import request from '@/config/axios'
2+
3+
4+
export const updateBpmSimpleModel = async (data) => {
5+
return await request.post({
6+
url: '/bpm/model/simple/update',
7+
data: data
8+
})
9+
}
10+
11+
export const getBpmSimpleModel = async (id) => {
12+
return await request.get({
13+
url: '/bpm/model/simple/get?id=' + id
14+
})
15+
}

src/api/bpm/task/index.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
import request from '@/config/axios'
22

3+
/**
4+
* 任务状态枚举
5+
*/
6+
export enum TaskStatusEnum {
7+
/**
8+
* 未开始
9+
*/
10+
NOT_START = -1,
11+
12+
/**
13+
* 待审批
14+
*/
15+
WAIT = 0,
16+
/**
17+
* 审批中
18+
*/
19+
RUNNING = 1,
20+
/**
21+
* 审批通过
22+
*/
23+
APPROVE = 2,
24+
25+
/**
26+
* 审批不通过
27+
*/
28+
REJECT = 3,
29+
30+
/**
31+
* 已取消
32+
*/
33+
CANCEL = 4,
34+
/**
35+
* 已退回
36+
*/
37+
RETURN = 5,
38+
/**
39+
* 委派中
40+
*/
41+
DELEGATE = 6,
42+
/**
43+
* 审批通过中
44+
*/
45+
APPROVING = 7,
46+
47+
}
48+
349
export type TaskVO = {
450
id: number
551
}

src/components/SimpleProcessDesigner/src/addNode.vue

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

0 commit comments

Comments
 (0)