diff --git a/src/model/workflow/workflowConfig.ts b/src/model/workflow/workflowConfig.ts index d40fba5..389f10b 100644 --- a/src/model/workflow/workflowConfig.ts +++ b/src/model/workflow/workflowConfig.ts @@ -114,6 +114,7 @@ export interface ProcessConfig { globalAgreeEventConfigs: NodeEventConfig[];//全局同意事件 globalSuspendedEventConfigs: NodeEventConfig[];//全局 挂起/暂停事件 globalRestoreEventConfigs: NodeEventConfig[];//全局 恢复事件 + globalSetSignEventConfigs: NodeEventConfig[];//全局 会签事件 xmlContent: String; //xml } @@ -287,6 +288,11 @@ export interface BasicNodeConfig { remark: string; //节点描述 startEventConfigs: NodeEventConfig[]; endEventConfigs: NodeEventConfig[]; + prequalifyBeforeEventConfigs: [],//预审前 + prequalifyAfterEventConfigs: [],//预审后 + rejectEventConfigs: [],//全局退回事件 + agreeEventConfigs: [],//全局同意事件 + setSignEventConfigs: [],//全局 会签事件 } 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..9098abd 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.setSignEventConfigs?.length > 0 || + formInfo.value.prequalifyBeforeEventConfigs?.length > 0 || + formInfo.value.prequalifyAfterEventConfigs?.length > 0 || + formInfo.value.agreeEventConfigs?.length > 0 || + formInfo.value.rejectEventConfigs?.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 addSetSignEvent = () => { + formInfo.value.setSignEventConfigs = formInfo.value.setSignEventConfigs==null?[]:formInfo.value.setSignEventConfigs; + formInfo.value.setSignEventConfigs.push({ + type: NodeEventExType.API, + apiConfig: {}, + } as NodeEventConfig); + }; + const deleteSetSignEvent = (index) => { + formInfo.value.setSignEventConfigs.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 addAgreeEvent = () => { + formInfo.value.agreeEventConfigs = formInfo.value.agreeEventConfigs==null?[]:formInfo.value.agreeEventConfigs; + formInfo.value.agreeEventConfigs.push({ + type: NodeEventExType.API, + apiConfig: {}, + } as NodeEventConfig); + }; + const deleteAgreeEvent = (index) => { + formInfo.value.agreeEventConfigs.splice(index, 1); + }; + + // 退回 因为旧值中不包含,所以html 判断node节点,这里对add 可以新增空数组 + const addRejectEvent = () => { + formInfo.value.rejectEventConfigs = formInfo.value.rejectEventConfigs==null?[]:formInfo.value.rejectEventConfigs; + formInfo.value.rejectEventConfigs.push({ + type: NodeEventExType.API, + apiConfig: {}, + } as NodeEventConfig); + }; + const deleteRejectEvent = (index) => { + formInfo.value.rejectEventConfigs.splice(index, 1); + };