Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
33d59c8b
authored
Mar 16, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BPM:新增顺序会签、或签的能力
parent
5f7ccd4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
5 deletions
+32
-5
src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue
+32
-5
No files found.
src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue
View file @
33d59c8b
<
template
>
<
template
>
<div
class=
"panel-tab__content"
>
<div
class=
"panel-tab__content"
>
<el-form
label-width=
"90px"
>
<el-form
label-width=
"90px"
>
<el-form-item
label=
"回路特性"
>
<el-form-item
label=
"快捷配置"
>
<el-button
size=
"small"
@
click=
"changeConfig('依次审批')"
>
依次审批
</el-button>
<el-button
size=
"small"
@
click=
"changeConfig('会签')"
>
会签
</el-button>
<el-button
size=
"small"
@
click=
"changeConfig('或签')"
>
或签
</el-button>
</el-form-item>
<el-form-item
label=
"会签类型"
>
<el-select
v-model=
"loopCharacteristics"
@
change=
"changeLoopCharacteristicsType"
>
<el-select
v-model=
"loopCharacteristics"
@
change=
"changeLoopCharacteristicsType"
>
<el-option
label=
"并行多重事件"
value=
"ParallelMultiInstance"
/>
<el-option
label=
"并行多重事件"
value=
"ParallelMultiInstance"
/>
<el-option
label=
"时序多重事件"
value=
"SequentialMultiInstance"
/>
<el-option
label=
"时序多重事件"
value=
"SequentialMultiInstance"
/>
<
el-option
label=
"循环事件"
value=
"StandardLoop"
/
>
<
!--
<el-option
label=
"循环事件"
value=
"StandardLoop"
/>
--
>
<el-option
label=
"无"
value=
"Null"
/>
<el-option
label=
"无"
value=
"Null"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -15,7 +20,7 @@
...
@@ -15,7 +20,7 @@
loopCharacteristics === 'SequentialMultiInstance'
loopCharacteristics === 'SequentialMultiInstance'
"
"
>
>
<el-form-item
label=
"循环
基数
"
key=
"loopCardinality"
>
<el-form-item
label=
"循环
数量
"
key=
"loopCardinality"
>
<el-input
<el-input
v-model=
"loopInstanceForm.loopCardinality"
v-model=
"loopInstanceForm.loopCardinality"
clearable
clearable
...
@@ -25,7 +30,8 @@
...
@@ -25,7 +30,8 @@
<el-form-item
label=
"集合"
key=
"collection"
v-show=
"false"
>
<el-form-item
label=
"集合"
key=
"collection"
v-show=
"false"
>
<el-input
v-model=
"loopInstanceForm.collection"
clearable
@
change=
"updateLoopBase"
/>
<el-input
v-model=
"loopInstanceForm.collection"
clearable
@
change=
"updateLoopBase"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"元素变量"
key=
"elementVariable"
>
<!-- add by 芋艿:由于「元素变量」暂时用不到,所以这里 display 为 none -->
<el-form-item
label=
"元素变量"
key=
"elementVariable"
style=
"display: none"
>
<el-input
v-model=
"loopInstanceForm.elementVariable"
clearable
@
change=
"updateLoopBase"
/>
<el-input
v-model=
"loopInstanceForm.elementVariable"
clearable
@
change=
"updateLoopBase"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"完成条件"
key=
"completionCondition"
>
<el-form-item
label=
"完成条件"
key=
"completionCondition"
>
...
@@ -35,7 +41,8 @@
...
@@ -35,7 +41,8 @@
@
change=
"updateLoopCondition"
@
change=
"updateLoopCondition"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"异步状态"
key=
"async"
>
<!-- add by 芋艿:由于「异步状态」暂时用不到,所以这里 display 为 none -->
<el-form-item
label=
"异步状态"
key=
"async"
style=
"display: none"
>
<el-checkbox
<el-checkbox
v-model=
"loopInstanceForm.asyncBefore"
v-model=
"loopInstanceForm.asyncBefore"
label=
"异步前"
label=
"异步前"
...
@@ -124,6 +131,7 @@ const getElementLoop = (businessObject) => {
...
@@ -124,6 +131,7 @@ const getElementLoop = (businessObject) => {
businessObject
.
loopCharacteristics
.
extensionElements
.
values
[
0
].
body
businessObject
.
loopCharacteristics
.
extensionElements
.
values
[
0
].
body
}
}
}
}
const
changeLoopCharacteristicsType
=
(
type
)
=>
{
const
changeLoopCharacteristicsType
=
(
type
)
=>
{
// this.loopInstanceForm = { ...this.defaultLoopInstanceForm }; // 切换类型取消原表单配置
// this.loopInstanceForm = { ...this.defaultLoopInstanceForm }; // 切换类型取消原表单配置
// 取消多实例配置
// 取消多实例配置
...
@@ -160,6 +168,7 @@ const changeLoopCharacteristicsType = (type) => {
...
@@ -160,6 +168,7 @@ const changeLoopCharacteristicsType = (type) => {
loopCharacteristics
:
toRaw
(
multiLoopInstance
.
value
)
loopCharacteristics
:
toRaw
(
multiLoopInstance
.
value
)
})
})
}
}
// 循环基数
// 循环基数
const
updateLoopCardinality
=
(
cardinality
)
=>
{
const
updateLoopCardinality
=
(
cardinality
)
=>
{
let
loopCardinality
=
null
let
loopCardinality
=
null
...
@@ -176,6 +185,7 @@ const updateLoopCardinality = (cardinality) => {
...
@@ -176,6 +185,7 @@ const updateLoopCardinality = (cardinality) => {
}
}
)
)
}
}
// 完成条件
// 完成条件
const
updateLoopCondition
=
(
condition
)
=>
{
const
updateLoopCondition
=
(
condition
)
=>
{
let
completionCondition
=
null
let
completionCondition
=
null
...
@@ -192,6 +202,7 @@ const updateLoopCondition = (condition) => {
...
@@ -192,6 +202,7 @@ const updateLoopCondition = (condition) => {
}
}
)
)
}
}
// 重试周期
// 重试周期
const
updateLoopTimeCycle
=
(
timeCycle
)
=>
{
const
updateLoopTimeCycle
=
(
timeCycle
)
=>
{
const
extensionElements
=
bpmnInstances
().
moddle
.
create
(
'bpmn:ExtensionElements'
,
{
const
extensionElements
=
bpmnInstances
().
moddle
.
create
(
'bpmn:ExtensionElements'
,
{
...
@@ -209,6 +220,7 @@ const updateLoopTimeCycle = (timeCycle) => {
...
@@ -209,6 +220,7 @@ const updateLoopTimeCycle = (timeCycle) => {
}
}
)
)
}
}
// 直接更新的基础信息
// 直接更新的基础信息
const
updateLoopBase
=
()
=>
{
const
updateLoopBase
=
()
=>
{
bpmnInstances
().
modeling
.
updateModdleProperties
(
bpmnInstances
().
modeling
.
updateModdleProperties
(
...
@@ -220,6 +232,7 @@ const updateLoopBase = () => {
...
@@ -220,6 +232,7 @@ const updateLoopBase = () => {
}
}
)
)
}
}
// 各异步状态
// 各异步状态
const
updateLoopAsync
=
(
key
)
=>
{
const
updateLoopAsync
=
(
key
)
=>
{
const
{
asyncBefore
,
asyncAfter
}
=
loopInstanceForm
.
value
const
{
asyncBefore
,
asyncAfter
}
=
loopInstanceForm
.
value
...
@@ -238,6 +251,20 @@ const updateLoopAsync = (key) => {
...
@@ -238,6 +251,20 @@ const updateLoopAsync = (key) => {
)
)
}
}
const
changeConfig
=
(
config
)
=>
{
if
(
config
===
'依次审批'
)
{
changeLoopCharacteristicsType
(
'SequentialMultiInstance'
)
updateLoopCardinality
(
'1'
)
updateLoopCondition
(
'${ nrOfCompletedInstances >= nrOfInstances }'
)
}
else
if
(
config
===
'会签'
)
{
changeLoopCharacteristicsType
(
'ParallelMultiInstance'
)
updateLoopCondition
(
'${ nrOfCompletedInstances >= nrOfInstances }'
)
}
else
if
(
config
===
'或签'
)
{
changeLoopCharacteristicsType
(
'ParallelMultiInstance'
)
updateLoopCondition
(
'${ nrOfCompletedInstances > 0 }'
)
}
}
onBeforeUnmount
(()
=>
{
onBeforeUnmount
(()
=>
{
multiLoopInstance
.
value
=
null
multiLoopInstance
.
value
=
null
bpmnElement
.
value
=
null
bpmnElement
.
value
=
null
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment