BPM:新增顺序会签、或签的能力
This commit is contained in:
parent
5f7ccd4e7c
commit
33d59c8b7d
@ -1,11 +1,16 @@
|
|||||||
<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 @@
|
|||||||
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 @@
|
|||||||
<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 @@
|
|||||||
@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) => {
|
|||||||
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) => {
|
|||||||
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) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 完成条件
|
// 完成条件
|
||||||
const updateLoopCondition = (condition) => {
|
const updateLoopCondition = (condition) => {
|
||||||
let completionCondition = null
|
let completionCondition = null
|
||||||
@ -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) => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 直接更新的基础信息
|
// 直接更新的基础信息
|
||||||
const updateLoopBase = () => {
|
const updateLoopBase = () => {
|
||||||
bpmnInstances().modeling.updateModdleProperties(
|
bpmnInstances().modeling.updateModdleProperties(
|
||||||
@ -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) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user