Skip to content

Commit e9a4efb

Browse files
committed
2 parents 3ae486c + 7db5ac8 commit e9a4efb

Some content is hidden

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

62 files changed

+2683
-1835
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"vue-i18n": "9.10.2",
7474
"vue-router": "4.4.5",
7575
"vue-types": "^5.1.1",
76+
"vue3-signature": "^0.2.4",
7677
"vuedraggable": "^4.1.0",
7778
"web-storage-cache": "^1.1.1",
7879
"xml-js": "^1.6.11"

pnpm-lock.yaml

Lines changed: 34 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/bpm/model/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,7 @@ export const deleteModel = async (id: number) => {
7272
export const deployModel = async (id: number) => {
7373
return await request.post({ url: '/bpm/model/deploy?id=' + id })
7474
}
75+
76+
export const cleanModel = async (id: number) => {
77+
return await request.delete({ url: '/bpm/model/clean?id=' + id })
78+
}

src/api/bpm/processInstance/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export type ApprovalTaskInfo = {
3636
assigneeUser: User
3737
status: number
3838
reason: string
39+
signPicUrl: string
3940
}
4041

4142
// 审批节点信息
@@ -89,7 +90,7 @@ export const getProcessInstanceCopyPage = async (params: any) => {
8990

9091
// 获取审批详情
9192
export const getApprovalDetail = async (params: any) => {
92-
return await request.get({ url: 'bpm/process-instance/get-approval-detail' , params })
93+
return await request.get({ url: 'bpm/process-instance/get-approval-detail', params })
9394
}
9495

9596
// 获取表单字段权限

src/components/SimpleProcessDesignerV2/src/NodeHandler.vue

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,24 @@
4040
<div class="handler-item-text">包容分支</div>
4141
</div>
4242
<div class="handler-item" @click="addNode(NodeType.DELAY_TIMER_NODE)">
43-
<!-- TODO @芋艿 需要更换一下iconfont的图标 -->
44-
<div class="handler-item-icon copy">
45-
<span class="iconfont icon-size icon-copy"></span>
43+
<div class="handler-item-icon delay">
44+
<span class="iconfont icon-size icon-delay"></span>
4645
</div>
4746
<div class="handler-item-text">延迟器</div>
4847
</div>
49-
</div>
48+
<div class="handler-item" @click="addNode(NodeType.ROUTER_BRANCH_NODE)">
49+
<div class="handler-item-icon router">
50+
<span class="iconfont icon-size icon-router"></span>
51+
</div>
52+
<div class="handler-item-text">路由分支</div>
53+
</div>
54+
<div class="handler-item" @click="addNode(NodeType.TRIGGER_NODE)">
55+
<div class="handler-item-icon trigger">
56+
<span class="iconfont icon-size icon-trigger"></span>
57+
</div>
58+
<div class="handler-item-text">触发器</div>
59+
</div>
60+
</div>
5061
<template #reference>
5162
<div class="add-icon"><Icon icon="ep:plus" /></div>
5263
</template>
@@ -60,12 +71,14 @@ import {
6071
ApproveMethodType,
6172
AssignEmptyHandlerType,
6273
AssignStartUserHandlerType,
74+
ConditionType,
6375
NODE_DEFAULT_NAME,
6476
NodeType,
6577
RejectHandlerType,
66-
SimpleFlowNode
78+
SimpleFlowNode,
79+
DEFAULT_CONDITION_GROUP_VALUE
6780
} from './consts'
68-
import { generateUUID } from '@/utils'
81+
import {generateUUID} from '@/utils'
6982
7083
defineOptions({
7184
name: 'NodeHandler'
@@ -120,7 +133,16 @@ const addNode = (type: number) => {
120133
type: AssignEmptyHandlerType.APPROVE
121134
},
122135
assignStartUserHandlerType: AssignStartUserHandlerType.START_USER_AUDIT,
123-
childNode: props.childNode
136+
childNode: props.childNode,
137+
taskCreateListener: {
138+
enable: false
139+
},
140+
taskAssignListener: {
141+
enable: false
142+
},
143+
taskCompleteListener: {
144+
enable: false
145+
}
124146
}
125147
emits('update:childNode', data)
126148
}
@@ -147,17 +169,21 @@ const addNode = (type: number) => {
147169
showText: '',
148170
type: NodeType.CONDITION_NODE,
149171
childNode: undefined,
150-
conditionType: 1,
151-
defaultFlow: false
172+
conditionSetting: {
173+
defaultFlow: false,
174+
conditionType: ConditionType.RULE,
175+
conditionGroups: DEFAULT_CONDITION_GROUP_VALUE
176+
}
152177
},
153178
{
154179
id: 'Flow_' + generateUUID(),
155180
name: '其它情况',
156181
showText: '未满足其它条件时,将进入此分支',
157182
type: NodeType.CONDITION_NODE,
158183
childNode: undefined,
159-
conditionType: undefined,
160-
defaultFlow: true
184+
conditionSetting: {
185+
defaultFlow: true
186+
}
161187
}
162188
]
163189
}
@@ -201,15 +227,21 @@ const addNode = (type: number) => {
201227
showText: '',
202228
type: NodeType.CONDITION_NODE,
203229
childNode: undefined,
204-
defaultFlow: false
230+
conditionSetting: {
231+
defaultFlow: false,
232+
conditionType: ConditionType.RULE,
233+
conditionGroups: DEFAULT_CONDITION_GROUP_VALUE
234+
}
205235
},
206236
{
207237
id: 'Flow_' + generateUUID(),
208238
name: '其它情况',
209239
showText: '未满足其它条件时,将进入此分支',
210240
type: NodeType.CONDITION_NODE,
211241
childNode: undefined,
212-
defaultFlow: true
242+
conditionSetting: {
243+
defaultFlow: true
244+
}
213245
}
214246
]
215247
}
@@ -225,6 +257,26 @@ const addNode = (type: number) => {
225257
}
226258
emits('update:childNode', data)
227259
}
260+
if (type === NodeType.ROUTER_BRANCH_NODE) {
261+
const data: SimpleFlowNode = {
262+
id: 'GateWay_' + generateUUID(),
263+
name: NODE_DEFAULT_NAME.get(NodeType.ROUTER_BRANCH_NODE) as string,
264+
showText: '',
265+
type: NodeType.ROUTER_BRANCH_NODE,
266+
childNode: props.childNode
267+
}
268+
emits('update:childNode', data)
269+
}
270+
if (type === NodeType.TRIGGER_NODE) {
271+
const data: SimpleFlowNode = {
272+
id: 'Activity_' + generateUUID(),
273+
name: NODE_DEFAULT_NAME.get(NodeType.TRIGGER_NODE) as string,
274+
showText: '',
275+
type: NodeType.TRIGGER_NODE,
276+
childNode: props.childNode
277+
}
278+
emits('update:childNode', data)
279+
}
228280
}
229281
</script>
230282

src/components/SimpleProcessDesignerV2/src/ProcessNodeTree.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@
4444
:flow-node="currentNode"
4545
@update:flow-node="handleModelValueUpdate"
4646
/>
47+
<!-- 路由分支节点 -->
48+
<RouterNode
49+
v-if="currentNode && currentNode.type === NodeType.ROUTER_BRANCH_NODE"
50+
:flow-node="currentNode"
51+
@update:flow-node="handleModelValueUpdate"
52+
/>
53+
<!-- 触发器节点 -->
54+
<TriggerNode
55+
v-if="currentNode && currentNode.type === NodeType.TRIGGER_NODE"
56+
:flow-node="currentNode"
57+
@update:flow-node="handleModelValueUpdate"
58+
/>
4759
<!-- 递归显示孩子节点 -->
4860
<ProcessNodeTree
4961
v-if="currentNode && currentNode.childNode"
@@ -67,6 +79,8 @@ import ExclusiveNode from './nodes/ExclusiveNode.vue'
6779
import ParallelNode from './nodes/ParallelNode.vue'
6880
import InclusiveNode from './nodes/InclusiveNode.vue'
6981
import DelayTimerNode from './nodes/DelayTimerNode.vue'
82+
import RouterNode from './nodes/RouterNode.vue'
83+
import TriggerNode from './nodes/TriggerNode.vue'
7084
import { SimpleFlowNode, NodeType } from './consts'
7185
import { useWatchNode } from './node'
7286
defineOptions({

0 commit comments

Comments
 (0)