Merge branch 'dev-zhaoDN/set-assignee-recall' into 'dev'

feat:新增 全局会签 回调 和 节点上的 会签,预审,同意,退回的回调

See merge request itc-framework/ma/2024/front!60
This commit is contained in:
890147
2025-04-18 09:39:06 +00:00
4 changed files with 526 additions and 58 deletions

View File

@ -109,11 +109,12 @@ export interface ProcessConfig {
globalEndEventConfigs: NodeEventConfig[];//全局 用户节点 结束事件 globalEndEventConfigs: NodeEventConfig[];//全局 用户节点 结束事件
globalPrequalifyBeforeEventConfigs: NodeEventConfig[];//预审前 globalPrequalifyBeforeEventConfigs: NodeEventConfig[];//预审前
globalPrequalifyAfterEventConfigs: NodeEventConfig[];//预审后 globalPrequalifyAfterEventConfigs: NodeEventConfig[];//预审后
globalFinishEventConfigs: NodeEventConfig[];//终止事件 globalFinishBeforeEventConfigs: NodeEventConfig[];//终止事件
globalRejectEventConfigs: NodeEventConfig[];//全局退回事件 globalRejectAfterEventConfigs: NodeEventConfig[];//全局退回事件
globalAgreeEventConfigs: NodeEventConfig[];//全局同意事件 globalAgreeAfterEventConfigs: NodeEventConfig[];//全局同意事件
globalSuspendedEventConfigs: NodeEventConfig[];//全局 挂起/暂停事件 globalSuspendedBeforeEventConfigs: NodeEventConfig[];//全局 挂起/暂停事件
globalRestoreEventConfigs: NodeEventConfig[];//全局 恢复事件 globalRestoreAfterEventConfigs: NodeEventConfig[];//全局 恢复事件
globalSetSignAfterEventConfigs: NodeEventConfig[];//全局 会签事件
xmlContent: String; //xml xmlContent: String; //xml
} }
@ -287,6 +288,11 @@ export interface BasicNodeConfig {
remark: string; //节点描述 remark: string; //节点描述
startEventConfigs: NodeEventConfig[]; startEventConfigs: NodeEventConfig[];
endEventConfigs: NodeEventConfig[]; endEventConfigs: NodeEventConfig[];
prequalifyBeforeEventConfigs: [],//预审前
prequalifyAfterEventConfigs: [],//预审后
rejectAfterEventConfigs: [],//退回后事件
agreeAfterEventConfigs: [],//同意后事件
setSignAfterEventConfigs: [],//会签后事件
} }
export interface NodeEventConfig { export interface NodeEventConfig {

View File

@ -51,6 +51,7 @@
<a-select v-model:value="record[column.dataIndex]"> <a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option> <a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option> <a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select> </a-select>
</template> </template>
<template v-if="column.key === 'operateConfig'"> <template v-if="column.key === 'operateConfig'">
@ -76,6 +77,11 @@
:options="liteFlowOptions" :options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }" :field-names="{ label: 'chainName', value: 'id' }"
/> />
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteStartEvent(index)" /> <DeleteTwoTone two-tone-color="#ff8080" @click="deleteStartEvent(index)" />
@ -105,6 +111,7 @@
<a-select v-model:value="record[column.dataIndex]"> <a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option> <a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option> <a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select> </a-select>
</template> </template>
<template v-if="column.key === 'operateConfig'"> <template v-if="column.key === 'operateConfig'">
@ -130,6 +137,11 @@
:options="liteFlowOptions" :options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }" :field-names="{ label: 'chainName', value: 'id' }"
/> />
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteEndEvent(index)" /> <DeleteTwoTone two-tone-color="#ff8080" @click="deleteEndEvent(index)" />
@ -137,6 +149,306 @@
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3" :tab="t('会签后事件')" v-if="formInfo.setSignAfterEventConfigs || formInfo.type==BpmnNodeKey.USER">
<div class="process-top">
<a-button type="primary" @click="addSetSignAfterEvent"> {{ t('添加会签后事件') }} </a-button>
</div>
<a-table :columns="columns" :data-source="formInfo.setSignAfterEventConfigs" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.key === 'sort'">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-fangxiang1" />
</svg>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'sort'">
<svg class="icon draggable-icon" aria-hidden="true" style="cursor: move">
<use xlink:href="#icon-paixu" />
</svg>
</template>
<template v-if="column.key === 'type'">
<a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select>
</template>
<template v-if="column.key === 'operateConfig'">
<ScriptApiSelect
v-if="record.type === NodeEventExType.API"
style="width: 100%"
v-model="record['apiConfig']"
:need-hide-components="true"
/>
<!-- <a-input
v-if="record.type === NodeEventExType.API"
v-model:value="record['apiConfig'].path"
@click="showConfig(NodeEventType.END, index)"
>
<template #suffix>
<Icon icon="ant-design:ellipsis-outlined" />
</template>
</a-input> -->
<a-select
style="width: 100%"
v-else-if="record.type === NodeEventExType.LITEFLOW"
v-model:value="record['liteflowId']"
:options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }"
/>
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template>
<template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteSetSignAfterEvent(index)" />
</template>
</template>
</a-table>
</a-tab-pane>
<a-tab-pane key="4" :tab="t('预审前事件')" v-if="formInfo.prequalifyBeforeEventConfigs || formInfo.type==BpmnNodeKey.USER">
<div class="process-top">
<a-button type="primary" @click="addPrequalifyBeforeEvent"> {{ t('添加预审前事件') }} </a-button>
</div>
<a-table :columns="columns" :data-source="formInfo.prequalifyBeforeEventConfigs" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.key === 'sort'">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-fangxiang1" />
</svg>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'sort'">
<svg class="icon draggable-icon" aria-hidden="true" style="cursor: move">
<use xlink:href="#icon-paixu" />
</svg>
</template>
<template v-if="column.key === 'type'">
<a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select>
</template>
<template v-if="column.key === 'operateConfig'">
<ScriptApiSelect
v-if="record.type === NodeEventExType.API"
style="width: 100%"
v-model="record['apiConfig']"
:need-hide-components="true"
/>
<!-- <a-input
v-if="record.type === NodeEventExType.API"
v-model:value="record['apiConfig'].path"
@click="showConfig(NodeEventType.END, index)"
>
<template #suffix>
<Icon icon="ant-design:ellipsis-outlined" />
</template>
</a-input> -->
<a-select
style="width: 100%"
v-else-if="record.type === NodeEventExType.LITEFLOW"
v-model:value="record['liteflowId']"
:options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }"
/>
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template>
<template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deletePrequalifyBeforeEvent(index)" />
</template>
</template>
</a-table>
</a-tab-pane>
<a-tab-pane key="5" :tab="t('预审后事件')" v-if="formInfo.prequalifyAfterEventConfigs || formInfo.type==BpmnNodeKey.USER">
<div class="process-top">
<a-button type="primary" @click="addPrequalifyAfterEvent"> {{ t('添加预审后事件') }} </a-button>
</div>
<a-table :columns="columns" :data-source="formInfo.prequalifyAfterEventConfigs" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.key === 'sort'">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-fangxiang1" />
</svg>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'sort'">
<svg class="icon draggable-icon" aria-hidden="true" style="cursor: move">
<use xlink:href="#icon-paixu" />
</svg>
</template>
<template v-if="column.key === 'type'">
<a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select>
</template>
<template v-if="column.key === 'operateConfig'">
<ScriptApiSelect
v-if="record.type === NodeEventExType.API"
style="width: 100%"
v-model="record['apiConfig']"
:need-hide-components="true"
/>
<!-- <a-input
v-if="record.type === NodeEventExType.API"
v-model:value="record['apiConfig'].path"
@click="showConfig(NodeEventType.END, index)"
>
<template #suffix>
<Icon icon="ant-design:ellipsis-outlined" />
</template>
</a-input> -->
<a-select
style="width: 100%"
v-else-if="record.type === NodeEventExType.LITEFLOW"
v-model:value="record['liteflowId']"
:options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }"
/>
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template>
<template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deletePrequalifyAfterEvent(index)" />
</template>
</template>
</a-table>
</a-tab-pane>
<a-tab-pane key="6" :tab="t('同意后事件')" v-if="formInfo.agreeAfterEventConfigs || formInfo.type==BpmnNodeKey.USER">
<div class="process-top">
<a-button type="primary" @click="addAgreeAfterEvent"> {{ t('添加同意后事件') }} </a-button>
</div>
<a-table :columns="columns" :data-source="formInfo.agreeAfterEventConfigs" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.key === 'sort'">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-fangxiang1" />
</svg>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'sort'">
<svg class="icon draggable-icon" aria-hidden="true" style="cursor: move">
<use xlink:href="#icon-paixu" />
</svg>
</template>
<template v-if="column.key === 'type'">
<a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select>
</template>
<template v-if="column.key === 'operateConfig'">
<ScriptApiSelect
v-if="record.type === NodeEventExType.API"
style="width: 100%"
v-model="record['apiConfig']"
:need-hide-components="true"
/>
<!-- <a-input
v-if="record.type === NodeEventExType.API"
v-model:value="record['apiConfig'].path"
@click="showConfig(NodeEventType.END, index)"
>
<template #suffix>
<Icon icon="ant-design:ellipsis-outlined" />
</template>
</a-input> -->
<a-select
style="width: 100%"
v-else-if="record.type === NodeEventExType.LITEFLOW"
v-model:value="record['liteflowId']"
:options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }"
/>
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template>
<template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteAgreeAfterEvent(index)" />
</template>
</template>
</a-table>
</a-tab-pane>
<a-tab-pane key="7" :tab="t('退回后事件')" v-if="formInfo.rejectAfterEventConfigs || formInfo.type==BpmnNodeKey.USER">
<div class="process-top">
<a-button type="primary" @click="addRejectAfterEvent"> {{ t('添加退回后事件') }} </a-button>
</div>
<a-table :columns="columns" :data-source="formInfo.rejectAfterEventConfigs" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.key === 'sort'">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-fangxiang1" />
</svg>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'sort'">
<svg class="icon draggable-icon" aria-hidden="true" style="cursor: move">
<use xlink:href="#icon-paixu" />
</svg>
</template>
<template v-if="column.key === 'type'">
<a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select>
</template>
<template v-if="column.key === 'operateConfig'">
<ScriptApiSelect
v-if="record.type === NodeEventExType.API"
style="width: 100%"
v-model="record['apiConfig']"
:need-hide-components="true"
/>
<!-- <a-input
v-if="record.type === NodeEventExType.API"
v-model:value="record['apiConfig'].path"
@click="showConfig(NodeEventType.END, index)"
>
<template #suffix>
<Icon icon="ant-design:ellipsis-outlined" />
</template>
</a-input> -->
<a-select
style="width: 100%"
v-else-if="record.type === NodeEventExType.LITEFLOW"
v-model:value="record['liteflowId']"
:options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }"
/>
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template>
<template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteRejectAfterEvent(index)" />
</template>
</template>
</a-table>
</a-tab-pane>
</a-tabs> </a-tabs>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
@ -167,6 +479,9 @@
import Sortable from 'sortablejs'; import Sortable from 'sortablejs';
import { NodeEventExType } from '/@/enums/workflowEnum'; import { NodeEventExType } from '/@/enums/workflowEnum';
import { NodeEventConfig } from '/@/model/workflow/workflowConfig'; import { NodeEventConfig } from '/@/model/workflow/workflowConfig';
import {
BpmnNodeKey,
} from '/@/enums/workflowEnum';
const { t } = useI18n(); const { t } = useI18n();
const { showPanel, formInfo, nodeName } = useStateFormInfo(); const { showPanel, formInfo, nodeName } = useStateFormInfo();
const updateElementName = inject('updateElementName') as any; const updateElementName = inject('updateElementName') as any;
@ -222,7 +537,12 @@
() => { () => {
if ( if (
formInfo.value.endEventConfigs?.length > 0 || formInfo.value.endEventConfigs?.length > 0 ||
formInfo.value.startEventConfigs?.length > 0 formInfo.value.startEventConfigs?.length > 0 ||
formInfo.value.setSignAfterEventConfigs?.length > 0 ||
formInfo.value.prequalifyBeforeEventConfigs?.length > 0 ||
formInfo.value.prequalifyAfterEventConfigs?.length > 0 ||
formInfo.value.agreeAfterEventConfigs?.length > 0 ||
formInfo.value.rejectAfterEventConfigs?.length > 0
) { ) {
nextTick(() => { nextTick(() => {
const tbody: any = document.querySelector('.ant-table-tbody'); const tbody: any = document.querySelector('.ant-table-tbody');
@ -246,6 +566,66 @@
const getList = async () => { const getList = async () => {
liteFlowOptions.value = (await getLiteflowList()) || []; liteFlowOptions.value = (await getLiteflowList()) || [];
}; };
//新增会签 因为旧值中不包含所以html 判断node节点这里对add 可以新增空数组
const addSetSignAfterEvent = () => {
formInfo.value.setSignAfterEventConfigs = formInfo.value.setSignAfterEventConfigs==null?[]:formInfo.value.setSignAfterEventConfigs;
formInfo.value.setSignAfterEventConfigs.push({
type: NodeEventExType.API,
apiConfig: {},
} as NodeEventConfig);
};
const deleteSetSignAfterEvent = (index) => {
formInfo.value.setSignAfterEventConfigs.splice(index, 1);
};
// 预审前 因为旧值中不包含所以html 判断node节点这里对add 可以新增空数组
const addPrequalifyBeforeEvent = () => {
formInfo.value.prequalifyBeforeEventConfigs = formInfo.value.prequalifyBeforeEventConfigs==null?[]:formInfo.value.prequalifyBeforeEventConfigs;
formInfo.value.prequalifyBeforeEventConfigs.push({
type: NodeEventExType.API,
apiConfig: {},
} as NodeEventConfig);
};
const deletePrequalifyBeforeEvent = (index) => {
formInfo.value.prequalifyBeforeEventConfigs.splice(index, 1);
};
// 预审后 因为旧值中不包含所以html 判断node节点这里对add 可以新增空数组
const addPrequalifyAfterEvent = () => {
formInfo.value.prequalifyAfterEventConfigs = formInfo.value.prequalifyAfterEventConfigs==null?[]:formInfo.value.prequalifyAfterEventConfigs;
formInfo.value.prequalifyAfterEventConfigs.push({
type: NodeEventExType.API,
apiConfig: {},
} as NodeEventConfig);
};
const deletePrequalifyAfterEvent = (index) => {
formInfo.value.prequalifyAfterEventConfigs.splice(index, 1);
};
// 同意 因为旧值中不包含所以html 判断node节点这里对add 可以新增空数组
const addAgreeAfterEvent = () => {
formInfo.value.agreeAfterEventConfigs = formInfo.value.agreeAfterEventConfigs==null?[]:formInfo.value.agreeAfterEventConfigs;
formInfo.value.agreeAfterEventConfigs.push({
type: NodeEventExType.API,
apiConfig: {},
} as NodeEventConfig);
};
const deleteAgreeAfterEvent = (index) => {
formInfo.value.agreeAfterEventConfigs.splice(index, 1);
};
// 退回 因为旧值中不包含所以html 判断node节点这里对add 可以新增空数组
const addRejectAfterEvent = () => {
formInfo.value.rejectAfterEventConfigs = formInfo.value.rejectAfterEventConfigs==null?[]:formInfo.value.rejectAfterEventConfigs;
formInfo.value.rejectAfterEventConfigs.push({
type: NodeEventExType.API,
apiConfig: {},
} as NodeEventConfig);
};
const deleteRejectAfterEvent = (index) => {
formInfo.value.rejectAfterEventConfigs.splice(index, 1);
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -89,11 +89,12 @@ export const processConfig: ProcessConfig = {
globalEndEventConfigs: [],//全局 用户节点 结束事件 globalEndEventConfigs: [],//全局 用户节点 结束事件
globalPrequalifyBeforeEventConfigs: [],//预审前 globalPrequalifyBeforeEventConfigs: [],//预审前
globalPrequalifyAfterEventConfigs: [],//预审后 globalPrequalifyAfterEventConfigs: [],//预审后
globalFinishEventConfigs: [],//终止事件 globalFinishBeforeEventConfigs: [],//终止事件
globalRejectEventConfigs: [],//全局退回事件 globalRejectAfterEventConfigs: [],//全局退回事件
globalAgreeEventConfigs: [],//全局同意事件 globalAgreeAfterEventConfigs: [],//全局同意事件
globalSuspendedEventConfigs: [],//全局 挂起/暂停事件 globalSuspendedBeforeEventConfigs: [],//全局 挂起/暂停事件
globalRestoreEventConfigs: [],//全局 恢复事件 globalRestoreAfterEventConfigs: [],//全局 恢复事件
globalSetSignAfterEventConfigs: [],//全局 会签事件
xmlContent: '', xmlContent: '',
}; };
// 默认属性 // 默认属性
@ -204,6 +205,11 @@ const UserProperties: UserTaskConfig = {
}, //超时处理 }, //超时处理
startEventConfigs: [], startEventConfigs: [],
endEventConfigs: [], endEventConfigs: [],
prequalifyBeforeEventConfigs: [],//预审前
prequalifyAfterEventConfigs: [],//预审后
rejectAfterEventConfigs: [],//退回事件
agreeAfterEventConfigs: [],//同意事件
setSignAfterEventConfigs: [],//会签事件
}; };
// 脚本节点默认属性 // 脚本节点默认属性
const ScriptProperties: ScriptTaskConfig = { const ScriptProperties: ScriptTaskConfig = {

View File

@ -132,7 +132,7 @@
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3" :tab="t('全局预审前事件')"> <a-tab-pane key="3" :tab="t('预审前事件')">
<div class="process-top"> <div class="process-top">
<a-button type="primary" @click="addGlobalPrequalifyBeforeEvent"> <a-button type="primary" @click="addGlobalPrequalifyBeforeEvent">
{{ t('添加全局预审前事件') }} {{ t('添加全局预审前事件') }}
@ -198,7 +198,7 @@
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="4" :tab="t('全局预审后事件')"> <a-tab-pane key="4" :tab="t('预审后事件')">
<div class="process-top"> <div class="process-top">
<a-button type="primary" @click="addGlobalPrequalifyAfterEvent"> <a-button type="primary" @click="addGlobalPrequalifyAfterEvent">
{{ t('添加全局预审后事件') }} {{ t('添加全局预审后事件') }}
@ -264,15 +264,15 @@
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="5" :tab="t('终止事件')"> <a-tab-pane key="5" :tab="t('终止事件')">
<div class="process-top"> <div class="process-top">
<a-button type="primary" @click="addGlobalFinishEvent"> <a-button type="primary" @click="addGlobalFinishBeforeEvent">
{{ t('添加终止事件') }} {{ t('添加终止事件') }}
</a-button> </a-button>
</div> </div>
<a-table <a-table
:columns="columns" :columns="columns"
:dataSource="processInfo.globalFinishEventConfigs" :dataSource="processInfo.globalFinishBeforeEventConfigs"
:pagination="false" :pagination="false"
> >
<template #headerCell="{ column }"> <template #headerCell="{ column }">
@ -325,20 +325,20 @@
/> />
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteFinishEvent(index)" /> <DeleteTwoTone two-tone-color="#ff8080" @click="deleteFinishBeforeEvent(index)" />
</template> </template>
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="6" :tab="t('全局退回事件')"> <a-tab-pane key="6" :tab="t('退回事件')">
<div class="process-top"> <div class="process-top">
<a-button type="primary" @click="addGlobalRejectEvent"> <a-button type="primary" @click="addGlobalRejectAfterEvent">
{{ t('添加全局退回事件') }} {{ t('添加全局退回事件') }}
</a-button> </a-button>
</div> </div>
<a-table <a-table
:columns="columns" :columns="columns"
:dataSource="processInfo.globalRejectEventConfigs" :dataSource="processInfo.globalRejectAfterEventConfigs"
:pagination="false" :pagination="false"
> >
<template #headerCell="{ column }"> <template #headerCell="{ column }">
@ -391,20 +391,20 @@
/> />
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteRejectEvent(index)" /> <DeleteTwoTone two-tone-color="#ff8080" @click="deleteRejectAfterEvent(index)" />
</template> </template>
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="7" :tab="t('全局同意事件')"> <a-tab-pane key="7" :tab="t('同意事件')">
<div class="process-top"> <div class="process-top">
<a-button type="primary" @click="addGlobalAgreeEvent"> <a-button type="primary" @click="addGlobalAgreeAfterEvent">
{{ t('添加全局同意事件') }} {{ t('添加全局同意事件') }}
</a-button> </a-button>
</div> </div>
<a-table <a-table
:columns="columns" :columns="columns"
:dataSource="processInfo.globalAgreeEventConfigs" :dataSource="processInfo.globalAgreeAfterEventConfigs"
:pagination="false" :pagination="false"
> >
<template #headerCell="{ column }"> <template #headerCell="{ column }">
@ -457,20 +457,20 @@
/> />
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteAgreeEvent(index)" /> <DeleteTwoTone two-tone-color="#ff8080" @click="deleteAgreeAfterEvent(index)" />
</template> </template>
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="8" :tab="t('挂起事件')"> <a-tab-pane key="8" :tab="t('挂起事件')">
<div class="process-top"> <div class="process-top">
<a-button type="primary" @click="addGlobalSuspendedEvent"> <a-button type="primary" @click="addGlobalSuspendedBeforeEvent">
{{ t('添加挂起事件') }} {{ t('添加挂起事件') }}
</a-button> </a-button>
</div> </div>
<a-table <a-table
:columns="columns" :columns="columns"
:dataSource="processInfo.globalSuspendedEventConfigs" :dataSource="processInfo.globalSuspendedBeforeEventConfigs"
:pagination="false" :pagination="false"
> >
<template #headerCell="{ column }"> <template #headerCell="{ column }">
@ -523,20 +523,20 @@
/> />
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteSuspendedEvent(index)" /> <DeleteTwoTone two-tone-color="#ff8080" @click="deleteSuspendedBeforeEvent(index)" />
</template> </template>
</template> </template>
</a-table> </a-table>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="9" :tab="t('恢复事件')"> <a-tab-pane key="9" :tab="t('恢复事件')">
<div class="process-top"> <div class="process-top">
<a-button type="primary" @click="addGlobalRestoreEvent"> <a-button type="primary" @click="addGlobalRestoreAfterEvent">
{{ t('添加恢复事件') }} {{ t('添加恢复事件') }}
</a-button> </a-button>
</div> </div>
<a-table <a-table
:columns="columns" :columns="columns"
:dataSource="processInfo.globalRestoreEventConfigs" :dataSource="processInfo.globalRestoreAfterEventConfigs"
:pagination="false" :pagination="false"
> >
<template #headerCell="{ column }"> <template #headerCell="{ column }">
@ -589,7 +589,73 @@
/> />
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteRestoreEvent(index)" /> <DeleteTwoTone two-tone-color="#ff8080" @click="deleteRestoreAfterEvent(index)" />
</template>
</template>
</a-table>
</a-tab-pane>
<a-tab-pane key="10" :tab="t('会签后事件')">
<div class="process-top">
<a-button type="primary" @click="addGlobalSetSignAfterEvent">
{{ t('添加会签后事件') }}
</a-button>
</div>
<a-table
:columns="columns"
:dataSource="processInfo.globalSetSignAfterEventConfigs"
:pagination="false"
>
<template #headerCell="{ column }">
<template v-if="column.key === 'sort'">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-fangxiang1" />
</svg>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'sort'">
<svg class="icon draggable-icon" aria-hidden="true" style="cursor: move">
<use xlink:href="#icon-paixu" />
</svg>
</template>
<template v-if="column.key === 'type'">
<a-select v-model:value="record[column.dataIndex]">
<a-select-option :value="0">{{ t('执行API') }}</a-select-option>
<a-select-option :value="1">{{ t('规则引擎') }}</a-select-option>
<a-select-option :value="2">{{ t('类注入') }}</a-select-option>
</a-select>
</template>
<template v-if="column.key === 'operateConfig'">
<!-- <a-input
v-if="record.type === NodeEventExType.API"
v-model:value="record['apiConfig'].path"
@click="showConfig(NodeEventType.START, index)"
>
<template #suffix>
<Icon icon="ant-design:ellipsis-outlined" />
</template>
</a-input> -->
<ScriptApiSelect
v-if="record.type === NodeEventExType.API"
style="width: 100%"
v-model="record['apiConfig']"
:need-hide-components="true"
/>
<a-select
style="width: 100%"
v-else-if="record.type === NodeEventExType.LITEFLOW"
v-model:value="record['liteflowId']"
:options="liteFlowOptions"
:field-names="{ label: 'chainName', value: 'id' }"
/>
<a-input
style="width: 100%"
v-else-if="record.type === NodeEventExType.SERVICE"
v-model:value="record['serviceName']"
/>
</template>
<template v-if="column.key === 'action'">
<DeleteTwoTone two-tone-color="#ff8080" @click="deleteSetSignAfterEvent(index)" />
</template> </template>
</template> </template>
</a-table> </a-table>
@ -683,61 +749,71 @@ const deletePrequalifyAfterEvent = (index) => {
processInfo.value.globalPrequalifyAfterEventConfigs.splice(index, 1); processInfo.value.globalPrequalifyAfterEventConfigs.splice(index, 1);
}; };
const addGlobalFinishEvent = () => { const addGlobalFinishBeforeEvent = () => {
processInfo.value.globalFinishEventConfigs.push({ processInfo.value.globalFinishBeforeEventConfigs.push({
type: NodeEventExType.API, type: NodeEventExType.API,
apiConfig: {}, apiConfig: {},
} as NodeEventConfig); } as NodeEventConfig);
}; };
const deleteFinishEvent = (index) => { const deleteFinishBeforeEvent = (index) => {
processInfo.value.globalFinishEventConfigs.splice(index, 1); processInfo.value.globalFinishBeforeEventConfigs.splice(index, 1);
}; };
const addGlobalRejectEvent = () => { const addGlobalRejectAfterEvent = () => {
processInfo.value.globalRejectEventConfigs.push({ processInfo.value.globalRejectAfterEventConfigs.push({
type: NodeEventExType.API, type: NodeEventExType.API,
apiConfig: {}, apiConfig: {},
} as NodeEventConfig); } as NodeEventConfig);
}; };
const deleteRejectEvent = (index) => { const deleteRejectAfterEvent = (index) => {
processInfo.value.globalRejectEventConfigs.splice(index, 1); processInfo.value.globalRejectAfterEventConfigs.splice(index, 1);
}; };
const addGlobalAgreeEvent = () => { const addGlobalAgreeAfterEvent = () => {
processInfo.value.globalAgreeEventConfigs.push({ processInfo.value.globalAgreeAfterEventConfigs.push({
type: NodeEventExType.API, type: NodeEventExType.API,
apiConfig: {}, apiConfig: {},
} as NodeEventConfig); } as NodeEventConfig);
}; };
const deleteAgreeEvent = (index) => { const deleteAgreeAfterEvent = (index) => {
processInfo.value.globalAgreeEventConfigs.splice(index, 1); processInfo.value.globalAgreeAfterEventConfigs.splice(index, 1);
}; };
const addGlobalSuspendedEvent = () => { const addGlobalSuspendedBeforeEvent = () => {
processInfo.value.globalSuspendedEventConfigs.push({ processInfo.value.globalSuspendedBeforeEventConfigs.push({
type: NodeEventExType.API, type: NodeEventExType.API,
apiConfig: {}, apiConfig: {},
} as NodeEventConfig); } as NodeEventConfig);
}; };
const deleteSuspendedEvent = (index) => { const deleteSuspendedBeforeEvent = (index) => {
processInfo.value.globalSuspendedEventConfigs.splice(index, 1); processInfo.value.globalSuspendedBeforeEventConfigs.splice(index, 1);
}; };
const addGlobalRestoreEvent = () => { const addGlobalRestoreAfterEvent = () => {
processInfo.value.globalRestoreEventConfigs.push({ processInfo.value.globalRestoreAfterEventConfigs.push({
type: NodeEventExType.API, type: NodeEventExType.API,
apiConfig: {}, apiConfig: {},
} as NodeEventConfig); } as NodeEventConfig);
}; };
const deleteRestoreEvent = (index) => { const deleteRestoreAfterEvent = (index) => {
processInfo.value.globalRestoreEventConfigs.splice(index, 1); processInfo.value.globalRestoreAfterEventConfigs.splice(index, 1);
};
// 全局会签事件添加
const addGlobalSetSignAfterEvent = () => {
processInfo.value.globalSetSignAfterEventConfigs.push({
type: NodeEventExType.API,
apiConfig: {},
} as NodeEventConfig);
}; };
const deleteSetSignAfterEvent = (index) => {
processInfo.value.globalSetSignAfterEventConfigs.splice(index, 1);
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>