1
1
<template >
2
2
<div class =" panel-tab__content" >
3
3
<el-form label-width =" 90px" >
4
- <el-form-item label =" 回路特性" >
4
+ <el-form-item label =" 快捷配置" >
5
+ <el-button size =" small" @click =" changeConfig('依次审批')" >依次审批</el-button >
6
+ <el-button size =" small" @click =" changeConfig('会签')" >会签</el-button >
7
+ <el-button size =" small" @click =" changeConfig('或签')" >或签</el-button >
8
+ </el-form-item >
9
+ <el-form-item label =" 会签类型" >
5
10
<el-select v-model =" loopCharacteristics" @change =" changeLoopCharacteristicsType" >
6
11
<el-option label =" 并行多重事件" value =" ParallelMultiInstance" />
7
12
<el-option label =" 时序多重事件" value =" SequentialMultiInstance" />
8
- <el-option label =" 循环事件" value =" StandardLoop" />
13
+ <!-- < el-option label="循环事件" value="StandardLoop" /> -- >
9
14
<el-option label =" 无" value =" Null" />
10
15
</el-select >
11
16
</el-form-item >
15
20
loopCharacteristics === ' SequentialMultiInstance'
16
21
"
17
22
>
18
- <el-form-item label =" 循环基数 " key =" loopCardinality" >
23
+ <el-form-item label =" 循环数量 " key =" loopCardinality" >
19
24
<el-input
20
25
v-model =" loopInstanceForm.loopCardinality"
21
26
clearable
25
30
<el-form-item label =" 集合" key =" collection" v-show =" false" >
26
31
<el-input v-model =" loopInstanceForm.collection" clearable @change =" updateLoopBase" />
27
32
</el-form-item >
28
- <el-form-item label =" 元素变量" key =" elementVariable" >
33
+ <!-- add by 芋艿:由于「元素变量」暂时用不到,所以这里 display 为 none -->
34
+ <el-form-item label =" 元素变量" key =" elementVariable" style =" display : none " >
29
35
<el-input v-model =" loopInstanceForm.elementVariable" clearable @change =" updateLoopBase" />
30
36
</el-form-item >
31
37
<el-form-item label =" 完成条件" key =" completionCondition" >
35
41
@change =" updateLoopCondition"
36
42
/>
37
43
</el-form-item >
38
- <el-form-item label =" 异步状态" key =" async" >
44
+ <!-- add by 芋艿:由于「异步状态」暂时用不到,所以这里 display 为 none -->
45
+ <el-form-item label =" 异步状态" key =" async" style =" display : none " >
39
46
<el-checkbox
40
47
v-model =" loopInstanceForm.asyncBefore"
41
48
label =" 异步前"
@@ -124,6 +131,7 @@ const getElementLoop = (businessObject) => {
124
131
businessObject .loopCharacteristics .extensionElements .values [0 ].body
125
132
}
126
133
}
134
+
127
135
const changeLoopCharacteristicsType = (type ) => {
128
136
// this.loopInstanceForm = { ...this.defaultLoopInstanceForm }; // 切换类型取消原表单配置
129
137
// 取消多实例配置
@@ -160,6 +168,7 @@ const changeLoopCharacteristicsType = (type) => {
160
168
loopCharacteristics: toRaw (multiLoopInstance .value )
161
169
})
162
170
}
171
+
163
172
// 循环基数
164
173
const updateLoopCardinality = (cardinality ) => {
165
174
let loopCardinality = null
@@ -176,6 +185,7 @@ const updateLoopCardinality = (cardinality) => {
176
185
}
177
186
)
178
187
}
188
+
179
189
// 完成条件
180
190
const updateLoopCondition = (condition ) => {
181
191
let completionCondition = null
@@ -192,6 +202,7 @@ const updateLoopCondition = (condition) => {
192
202
}
193
203
)
194
204
}
205
+
195
206
// 重试周期
196
207
const updateLoopTimeCycle = (timeCycle ) => {
197
208
const extensionElements = bpmnInstances ().moddle .create (' bpmn:ExtensionElements' , {
@@ -209,6 +220,7 @@ const updateLoopTimeCycle = (timeCycle) => {
209
220
}
210
221
)
211
222
}
223
+
212
224
// 直接更新的基础信息
213
225
const updateLoopBase = () => {
214
226
bpmnInstances ().modeling .updateModdleProperties (
@@ -220,6 +232,7 @@ const updateLoopBase = () => {
220
232
}
221
233
)
222
234
}
235
+
223
236
// 各异步状态
224
237
const updateLoopAsync = (key ) => {
225
238
const { asyncBefore, asyncAfter } = loopInstanceForm .value
@@ -238,6 +251,20 @@ const updateLoopAsync = (key) => {
238
251
)
239
252
}
240
253
254
+ const changeConfig = (config ) => {
255
+ if (config === ' 依次审批' ) {
256
+ changeLoopCharacteristicsType (' SequentialMultiInstance' )
257
+ updateLoopCardinality (' 1' )
258
+ updateLoopCondition (' ${ nrOfCompletedInstances >= nrOfInstances }' )
259
+ } else if (config === ' 会签' ) {
260
+ changeLoopCharacteristicsType (' ParallelMultiInstance' )
261
+ updateLoopCondition (' ${ nrOfCompletedInstances >= nrOfInstances }' )
262
+ } else if (config === ' 或签' ) {
263
+ changeLoopCharacteristicsType (' ParallelMultiInstance' )
264
+ updateLoopCondition (' ${ nrOfCompletedInstances > 0 }' )
265
+ }
266
+ }
267
+
241
268
onBeforeUnmount (() => {
242
269
multiLoopInstance .value = null
243
270
bpmnElement .value = null
0 commit comments