From 6820275fa7ef05d17909857e08663df75e1ce543 Mon Sep 17 00:00:00 2001 From: lvjunzhao <967725@dms.yudean.com> Date: Mon, 14 Apr 2025 18:35:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=8A=9F=E8=83=BD=E8=8A=82=E7=82=B9=20?= =?UTF-8?q?=E5=89=8D=E5=90=8E=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/workflow/workflowConfig.ts | 18 +-- .../design/bpmn/components/BasicPanel.vue | 70 ++++++------ .../design/bpmn/config/propertyConfig.ts | 18 +-- .../bpmn/panel/process/globalEvent/Index.vue | 108 +++++++++--------- 4 files changed, 107 insertions(+), 107 deletions(-) diff --git a/src/model/workflow/workflowConfig.ts b/src/model/workflow/workflowConfig.ts index 389f10b..0377566 100644 --- a/src/model/workflow/workflowConfig.ts +++ b/src/model/workflow/workflowConfig.ts @@ -109,12 +109,12 @@ export interface ProcessConfig { globalEndEventConfigs: NodeEventConfig[];//全局 用户节点 结束事件 globalPrequalifyBeforeEventConfigs: NodeEventConfig[];//预审前 globalPrequalifyAfterEventConfigs: NodeEventConfig[];//预审后 - globalFinishEventConfigs: NodeEventConfig[];//终止事件 - globalRejectEventConfigs: NodeEventConfig[];//全局退回事件 - globalAgreeEventConfigs: NodeEventConfig[];//全局同意事件 - globalSuspendedEventConfigs: NodeEventConfig[];//全局 挂起/暂停事件 - globalRestoreEventConfigs: NodeEventConfig[];//全局 恢复事件 - globalSetSignEventConfigs: NodeEventConfig[];//全局 会签事件 + globalFinishBeforeEventConfigs: NodeEventConfig[];//终止事件 + globalRejectAfterEventConfigs: NodeEventConfig[];//全局退回事件 + globalAgreeAfterEventConfigs: NodeEventConfig[];//全局同意事件 + globalSuspendedBeforeEventConfigs: NodeEventConfig[];//全局 挂起/暂停事件 + globalRestoreAfterEventConfigs: NodeEventConfig[];//全局 恢复事件 + globalSetSignAfterEventConfigs: NodeEventConfig[];//全局 会签事件 xmlContent: String; //xml } @@ -290,9 +290,9 @@ export interface BasicNodeConfig { endEventConfigs: NodeEventConfig[]; prequalifyBeforeEventConfigs: [],//预审前 prequalifyAfterEventConfigs: [],//预审后 - rejectEventConfigs: [],//全局退回事件 - agreeEventConfigs: [],//全局同意事件 - setSignEventConfigs: [],//全局 会签事件 + rejectAfterEventConfigs: [],//退回后事件 + agreeAfterEventConfigs: [],//同意后事件 + setSignAfterEventConfigs: [],//会签后事件 } export interface NodeEventConfig { diff --git a/src/views/workflow/design/bpmn/components/BasicPanel.vue b/src/views/workflow/design/bpmn/components/BasicPanel.vue index 9098abd..0fe05ab 100644 --- a/src/views/workflow/design/bpmn/components/BasicPanel.vue +++ b/src/views/workflow/design/bpmn/components/BasicPanel.vue @@ -149,11 +149,11 @@ - +
- {{ t('添加会签事件') }} + {{ t('添加会签后事件') }}
- + @@ -257,7 +257,7 @@ :options="liteFlowOptions" :field-names="{ label: 'chainName', value: 'id' }" /> - -
- +
- {{ t('添加同意事件') }} + {{ t('添加同意后事件') }}
- +
- +
- {{ t('添加退回事件') }} + {{ t('添加退回后事件') }}
- + @@ -538,11 +538,11 @@ if ( formInfo.value.endEventConfigs?.length > 0 || formInfo.value.startEventConfigs?.length > 0 || - formInfo.value.setSignEventConfigs?.length > 0 || + formInfo.value.setSignAfterEventConfigs?.length > 0 || formInfo.value.prequalifyBeforeEventConfigs?.length > 0 || formInfo.value.prequalifyAfterEventConfigs?.length > 0 || - formInfo.value.agreeEventConfigs?.length > 0 || - formInfo.value.rejectEventConfigs?.length > 0 + formInfo.value.agreeAfterEventConfigs?.length > 0 || + formInfo.value.rejectAfterEventConfigs?.length > 0 ) { nextTick(() => { const tbody: any = document.querySelector('.ant-table-tbody'); @@ -568,15 +568,15 @@ }; //新增会签 因为旧值中不包含,所以html 判断node节点,这里对add 可以新增空数组 - const addSetSignEvent = () => { - formInfo.value.setSignEventConfigs = formInfo.value.setSignEventConfigs==null?[]:formInfo.value.setSignEventConfigs; - formInfo.value.setSignEventConfigs.push({ + const addSetSignAfterEvent = () => { + formInfo.value.setSignAfterEventConfigs = formInfo.value.setSignAfterEventConfigs==null?[]:formInfo.value.setSignAfterEventConfigs; + formInfo.value.setSignAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; - const deleteSetSignEvent = (index) => { - formInfo.value.setSignEventConfigs.splice(index, 1); + const deleteSetSignAfterEvent = (index) => { + formInfo.value.setSignAfterEventConfigs.splice(index, 1); }; // 预审前 因为旧值中不包含,所以html 判断node节点,这里对add 可以新增空数组 @@ -604,27 +604,27 @@ }; // 同意 因为旧值中不包含,所以html 判断node节点,这里对add 可以新增空数组 - const addAgreeEvent = () => { - formInfo.value.agreeEventConfigs = formInfo.value.agreeEventConfigs==null?[]:formInfo.value.agreeEventConfigs; - formInfo.value.agreeEventConfigs.push({ + const addAgreeAfterEvent = () => { + formInfo.value.agreeAfterEventConfigs = formInfo.value.agreeAfterEventConfigs==null?[]:formInfo.value.agreeAfterEventConfigs; + formInfo.value.agreeAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; - const deleteAgreeEvent = (index) => { - formInfo.value.agreeEventConfigs.splice(index, 1); + const deleteAgreeAfterEvent = (index) => { + formInfo.value.agreeAfterEventConfigs.splice(index, 1); }; // 退回 因为旧值中不包含,所以html 判断node节点,这里对add 可以新增空数组 - const addRejectEvent = () => { - formInfo.value.rejectEventConfigs = formInfo.value.rejectEventConfigs==null?[]:formInfo.value.rejectEventConfigs; - formInfo.value.rejectEventConfigs.push({ + const addRejectAfterEvent = () => { + formInfo.value.rejectAfterEventConfigs = formInfo.value.rejectAfterEventConfigs==null?[]:formInfo.value.rejectAfterEventConfigs; + formInfo.value.rejectAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; - const deleteRejectEvent = (index) => { - formInfo.value.rejectEventConfigs.splice(index, 1); + const deleteRejectAfterEvent = (index) => { + formInfo.value.rejectAfterEventConfigs.splice(index, 1); }; diff --git a/src/views/workflow/design/bpmn/config/propertyConfig.ts b/src/views/workflow/design/bpmn/config/propertyConfig.ts index a7c545d..fff308c 100644 --- a/src/views/workflow/design/bpmn/config/propertyConfig.ts +++ b/src/views/workflow/design/bpmn/config/propertyConfig.ts @@ -89,12 +89,12 @@ export const processConfig: ProcessConfig = { globalEndEventConfigs: [],//全局 用户节点 结束事件 globalPrequalifyBeforeEventConfigs: [],//预审前 globalPrequalifyAfterEventConfigs: [],//预审后 - globalFinishEventConfigs: [],//终止事件 - globalRejectEventConfigs: [],//全局退回事件 - globalAgreeEventConfigs: [],//全局同意事件 - globalSuspendedEventConfigs: [],//全局 挂起/暂停事件 - globalRestoreEventConfigs: [],//全局 恢复事件 - globalSetSignEventConfigs: [],//全局 会签事件 + globalFinishBeforeEventConfigs: [],//终止事件 + globalRejectAfterEventConfigs: [],//全局退回事件 + globalAgreeAfterEventConfigs: [],//全局同意事件 + globalSuspendedBeforeEventConfigs: [],//全局 挂起/暂停事件 + globalRestoreAfterEventConfigs: [],//全局 恢复事件 + globalSetSignAfterEventConfigs: [],//全局 会签事件 xmlContent: '', }; // 默认属性 @@ -207,9 +207,9 @@ const UserProperties: UserTaskConfig = { endEventConfigs: [], prequalifyBeforeEventConfigs: [],//预审前 prequalifyAfterEventConfigs: [],//预审后 - rejectEventConfigs: [],//全局退回事件 - agreeEventConfigs: [],//全局同意事件 - setSignEventConfigs: [],//全局 会签事件 + rejectAfterEventConfigs: [],//全局退回事件 + agreeAfterEventConfigs: [],//全局同意事件 + setSignAfterEventConfigs: [],//全局 会签事件 }; // 脚本节点默认属性 const ScriptProperties: ScriptTaskConfig = { diff --git a/src/views/workflow/design/bpmn/panel/process/globalEvent/Index.vue b/src/views/workflow/design/bpmn/panel/process/globalEvent/Index.vue index bcb8c57..936b6a6 100644 --- a/src/views/workflow/design/bpmn/panel/process/globalEvent/Index.vue +++ b/src/views/workflow/design/bpmn/panel/process/globalEvent/Index.vue @@ -264,15 +264,15 @@
- +
- - {{ t('添加终止事件') }} + + {{ t('添加终止前事件') }}
- +
- - {{ t('添加全局退回事件') }} + + {{ t('添加全局退回后事件') }}
- +
- - {{ t('添加全局同意事件') }} + + {{ t('添加全局同意后事件') }}
- +
- - {{ t('添加挂起事件') }} + + {{ t('添加挂起前事件') }}
- +
- - {{ t('添加恢复事件') }} + + {{ t('添加恢复后事件') }}
- +
- - {{ t('添加会签事件') }} + + {{ t('添加会签后事件') }}
@@ -749,70 +749,70 @@ const deletePrequalifyAfterEvent = (index) => { processInfo.value.globalPrequalifyAfterEventConfigs.splice(index, 1); }; -const addGlobalFinishEvent = () => { - processInfo.value.globalFinishEventConfigs.push({ +const addGlobalFinishBeforeEvent = () => { + processInfo.value.globalFinishBeforeEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; -const deleteFinishEvent = (index) => { - processInfo.value.globalFinishEventConfigs.splice(index, 1); +const deleteFinishBeforeEvent = (index) => { + processInfo.value.globalFinishBeforeEventConfigs.splice(index, 1); }; -const addGlobalRejectEvent = () => { - processInfo.value.globalRejectEventConfigs.push({ +const addGlobalRejectAfterEvent = () => { + processInfo.value.globalRejectAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; -const deleteRejectEvent = (index) => { - processInfo.value.globalRejectEventConfigs.splice(index, 1); +const deleteRejectAfterEvent = (index) => { + processInfo.value.globalRejectAfterEventConfigs.splice(index, 1); }; -const addGlobalAgreeEvent = () => { - processInfo.value.globalAgreeEventConfigs.push({ +const addGlobalAgreeAfterEvent = () => { + processInfo.value.globalAgreeAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; -const deleteAgreeEvent = (index) => { - processInfo.value.globalAgreeEventConfigs.splice(index, 1); +const deleteAgreeAfterEvent = (index) => { + processInfo.value.globalAgreeAfterEventConfigs.splice(index, 1); }; -const addGlobalSuspendedEvent = () => { - processInfo.value.globalSuspendedEventConfigs.push({ +const addGlobalSuspendedBeforeEvent = () => { + processInfo.value.globalSuspendedBeforeEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; -const deleteSuspendedEvent = (index) => { - processInfo.value.globalSuspendedEventConfigs.splice(index, 1); +const deleteSuspendedBeforeEvent = (index) => { + processInfo.value.globalSuspendedBeforeEventConfigs.splice(index, 1); }; -const addGlobalRestoreEvent = () => { - processInfo.value.globalRestoreEventConfigs.push({ +const addGlobalRestoreAfterEvent = () => { + processInfo.value.globalRestoreAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; -const deleteRestoreEvent = (index) => { - processInfo.value.globalRestoreEventConfigs.splice(index, 1); +const deleteRestoreAfterEvent = (index) => { + processInfo.value.globalRestoreAfterEventConfigs.splice(index, 1); }; // 全局会签事件添加 -const addGlobalSetSignEvent = () => { - processInfo.value.globalSetSignEventConfigs.push({ +const addGlobalSetSignAfterEvent = () => { + processInfo.value.globalSetSignAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, } as NodeEventConfig); }; -const deleteSetSignEvent = (index) => { - processInfo.value.globalSetSignEventConfigs.splice(index, 1); +const deleteSetSignAfterEvent = (index) => { + processInfo.value.globalSetSignAfterEventConfigs.splice(index, 1); };