fix 执行监听器

This commit is contained in:
cxc
2022-12-23 16:28:23 +08:00
parent 8c05f41bc9
commit 70ad69fdfe
4 changed files with 27 additions and 15 deletions

View File

@ -10,7 +10,7 @@
:formatter="(row) => listenerTypeObject[row.listenerType]"
/>
<el-table-column label="操作" width="90px">
<template slot-scope="{ row, $index }">
<template #default="{ row, $index }">
<el-button size="small" link @click="openListenerForm(row, $index)"
>编辑</el-button
>
@ -18,7 +18,7 @@
<el-button
size="small"
link
style="color: #ff4d4f"
type="danger"
@click="removeListener(row, $index)"
>移除</el-button
>
@ -159,9 +159,9 @@
</el-form>
<el-divider />
<p class="listener-filed__title">
<div class="span"
><el-icon><Menu /></el-icon>注入字段</div
>
<span class="span">
<el-icon> <Menu /> </el-icon>注入字段
</span>
<el-button
size="small"
type="primary"
@ -192,7 +192,7 @@
:formatter="(row) => row.string || row.expression"
/>
<el-table-column label="操作" width="100px">
<template slot-scope="{ row, $index }">
<template #default="{ row, $index }">
<el-button
size="small"
link
@ -202,8 +202,8 @@
<el-divider direction="vertical" />
<el-button
size="small"
type="danger"
link
style="color: #ff4d4f"
@click="removeListenerField(row, $index)"
>移除</el-button
>
@ -335,8 +335,9 @@ function resetListenersList() {
otherExtensionList = [];
bpmnElementListeners =
bpmnElement.businessObject?.extensionElements?.values?.filter(
(ex) => ex.$type === `${prefix.value}:ExecutionListener`
(ex) => ex.$type === `${prefix}:ExecutionListener`
) ?? [];
debugger;
elementListenersList.value = bpmnElementListeners.map((listener) =>
initListenerType(listener)
);
@ -431,7 +432,7 @@ async function saveListenerConfig() {
const listenerObject = createListenerObject(
listenerForm.value,
false,
prefix.value
prefix
);
if (editingListenerIndex.value === -1) {
bpmnElementListeners.push(listenerObject);
@ -447,7 +448,7 @@ async function saveListenerConfig() {
// 保存其他配置
otherExtensionList =
bpmnElement.businessObject?.extensionElements?.values?.filter(
(ex) => ex.$type !== `${prefix.value}:ExecutionListener`
(ex) => ex.$type !== `${prefix}:ExecutionListener`
) ?? [];
updateElementExtensions(
bpmnElement,

View File

@ -401,7 +401,6 @@ function resetListenersList() {
bpmnElement.businessObject?.extensionElements?.values?.filter(
(ex) => ex.$type === `${prefix}:TaskListener`
) ?? [];
// debugger;
elementListenersList.value = bpmnElementListeners.map((listener) =>
initListenerType(listener)
);

View File

@ -46,11 +46,11 @@ watch(
);
function updateDocumentation() {
(bpmnElement && bpmnElement.id === this.id) ||
(bpmnElement = window.bpmnInstances.elementRegistry.get(this.id));
(bpmnElement && bpmnElement.id === id.value) ||
(bpmnElement = window.bpmnInstances.elementRegistry.get(id.value));
const documentation = window.bpmnInstances.bpmnFactory.create(
"bpmn:Documentation",
{ text: this.documentation }
{ text: documentation.value }
);
window.bpmnInstances.modeling.updateProperties(bpmnElement, {
documentation: [documentation],

View File

@ -77,13 +77,25 @@
<h4><b>多实例审批方式</b></h4>
<el-row>
<el-radio-group v-model="multiLoopType" @change="changeMultiLoopType">
<el-row><el-radio label="Null">无</el-radio></el-row>
<el-row
:style="{
width: '100%',
}"
>
<el-radio label="Null">无</el-radio>
</el-row>
<el-row
:style="{
width: '100%',
}"
><el-radio label="SequentialMultiInstance"
>会签(需所有审批人同意)</el-radio
></el-row
>
<el-row
:style="{
width: '100%',
}"
><el-radio label="ParallelMultiInstance"
>或签(一名审批人同意即可)</el-radio
></el-row