diff --git a/src/model/workflow/workflowConfig.ts b/src/model/workflow/workflowConfig.ts index d40fba5..0377566 100644 --- a/src/model/workflow/workflowConfig.ts +++ b/src/model/workflow/workflowConfig.ts @@ -109,11 +109,12 @@ export interface ProcessConfig { globalEndEventConfigs: NodeEventConfig[];//全局 用户节点 结束事件 globalPrequalifyBeforeEventConfigs: NodeEventConfig[];//预审前 globalPrequalifyAfterEventConfigs: NodeEventConfig[];//预审后 - globalFinishEventConfigs: NodeEventConfig[];//终止事件 - globalRejectEventConfigs: NodeEventConfig[];//全局退回事件 - globalAgreeEventConfigs: NodeEventConfig[];//全局同意事件 - globalSuspendedEventConfigs: NodeEventConfig[];//全局 挂起/暂停事件 - globalRestoreEventConfigs: NodeEventConfig[];//全局 恢复事件 + globalFinishBeforeEventConfigs: NodeEventConfig[];//终止事件 + globalRejectAfterEventConfigs: NodeEventConfig[];//全局退回事件 + globalAgreeAfterEventConfigs: NodeEventConfig[];//全局同意事件 + globalSuspendedBeforeEventConfigs: NodeEventConfig[];//全局 挂起/暂停事件 + globalRestoreAfterEventConfigs: NodeEventConfig[];//全局 恢复事件 + globalSetSignAfterEventConfigs: NodeEventConfig[];//全局 会签事件 xmlContent: String; //xml } @@ -287,6 +288,11 @@ export interface BasicNodeConfig { remark: string; //节点描述 startEventConfigs: NodeEventConfig[]; endEventConfigs: NodeEventConfig[]; + prequalifyBeforeEventConfigs: [],//预审前 + prequalifyAfterEventConfigs: [],//预审后 + 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 4fe53ad..0fe05ab 100644 --- a/src/views/workflow/design/bpmn/components/BasicPanel.vue +++ b/src/views/workflow/design/bpmn/components/BasicPanel.vue @@ -51,6 +51,7 @@ {{ t('执行API') }} {{ t('规则引擎') }} + {{ t('类注入') }} + +
+ {{ t('添加会签后事件') }} +
+ + + + +
+ +
+ {{ t('添加预审前事件') }} +
+ + + + +
+ +
+ {{ t('添加预审后事件') }} +
+ + + + +
+ +
+ {{ t('添加同意后事件') }} +
+ + + + +
+ +
+ {{ t('添加退回后事件') }} +
+ + + + +
@@ -167,6 +479,9 @@ import Sortable from 'sortablejs'; import { NodeEventExType } from '/@/enums/workflowEnum'; import { NodeEventConfig } from '/@/model/workflow/workflowConfig'; + import { + BpmnNodeKey, + } from '/@/enums/workflowEnum'; const { t } = useI18n(); const { showPanel, formInfo, nodeName } = useStateFormInfo(); const updateElementName = inject('updateElementName') as any; @@ -222,7 +537,12 @@ () => { if ( 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(() => { const tbody: any = document.querySelector('.ant-table-tbody'); @@ -246,6 +566,66 @@ const getList = async () => { 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); + };