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 936b6a6..0035584 100644 --- a/src/views/workflow/design/bpmn/panel/process/globalEvent/Index.vue +++ b/src/views/workflow/design/bpmn/panel/process/globalEvent/Index.vue @@ -707,6 +707,9 @@ const columns = ref([ ]); const addGlobalStartEvent = () => { + if(!processInfo.value.globalStartEventConfigs) { + processInfo.value.globalStartEventConfigs = []; + } processInfo.value.globalStartEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -717,6 +720,9 @@ const deleteStartEvent = (index) => { processInfo.value.globalStartEventConfigs.splice(index, 1); }; const addGlobalEndEvent = () => { + if(!processInfo.value.globalEndEventConfigs) { + processInfo.value.globalEndEventConfigs = []; + } processInfo.value.globalEndEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -728,6 +734,9 @@ const deleteEndEvent = (index) => { }; const addGlobalPrequalifyBeforeEvent = () => { + if(!processInfo.value.globalPrequalifyBeforeEventConfigs) { + processInfo.value.globalPrequalifyBeforeEventConfigs = []; + } processInfo.value.globalPrequalifyBeforeEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -739,6 +748,9 @@ const deletePrequalifyBeforeEvent = (index) => { }; const addGlobalPrequalifyAfterEvent = () => { + if(!processInfo.value.globalPrequalifyAfterEventConfigs) { + processInfo.value.globalPrequalifyAfterEventConfigs = []; + } processInfo.value.globalPrequalifyAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -750,6 +762,9 @@ const deletePrequalifyAfterEvent = (index) => { }; const addGlobalFinishBeforeEvent = () => { + if(!processInfo.value.globalFinishBeforeEventConfigs) { + processInfo.value.globalFinishBeforeEventConfigs = []; + } processInfo.value.globalFinishBeforeEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -761,6 +776,9 @@ const deleteFinishBeforeEvent = (index) => { }; const addGlobalRejectAfterEvent = () => { + if(!processInfo.value.globalRejectAfterEventConfigs) { + processInfo.value.globalRejectAfterEventConfigs = []; + } processInfo.value.globalRejectAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -772,6 +790,9 @@ const deleteRejectAfterEvent = (index) => { }; const addGlobalAgreeAfterEvent = () => { + if(!processInfo.value.globalAgreeAfterEventConfigs) { + processInfo.value.globalAgreeAfterEventConfigs = []; + } processInfo.value.globalAgreeAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -783,6 +804,9 @@ const deleteAgreeAfterEvent = (index) => { }; const addGlobalSuspendedBeforeEvent = () => { + if(!processInfo.value.globalSuspendedBeforeEventConfigs) { + processInfo.value.globalSuspendedBeforeEventConfigs = []; + } processInfo.value.globalSuspendedBeforeEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -794,6 +818,9 @@ const deleteSuspendedBeforeEvent = (index) => { }; const addGlobalRestoreAfterEvent = () => { + if(!processInfo.value.globalRestoreAfterEventConfigs) { + processInfo.value.globalRestoreAfterEventConfigs = []; + } processInfo.value.globalRestoreAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {}, @@ -805,6 +832,9 @@ const deleteRestoreAfterEvent = (index) => { }; // 全局会签事件添加 const addGlobalSetSignAfterEvent = () => { + if(!processInfo.value.globalSetSignAfterEventConfigs) { + processInfo.value.globalSetSignAfterEventConfigs = []; + } processInfo.value.globalSetSignAfterEventConfigs.push({ type: NodeEventExType.API, apiConfig: {},