From faf4557783a6ef3731893f843f48def258022d6b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 23 Mar 2024 15:58:38 +0800 Subject: [PATCH] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=8A=A0=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=9B=91=E5=90=AC=E5=99=A8=E3=80=81=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E5=99=A8=E7=9A=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/processListener/index.ts | 40 ++++ .../package/penal/base/ElementBaseInfo.vue | 30 +-- src/utils/dict.ts | 4 +- .../processListener/ProcessListenerForm.vue | 162 ++++++++++++++++ src/views/bpm/processListener/index.vue | 183 ++++++++++++++++++ 5 files changed, 407 insertions(+), 12 deletions(-) create mode 100644 src/api/bpm/processListener/index.ts create mode 100644 src/views/bpm/processListener/ProcessListenerForm.vue create mode 100644 src/views/bpm/processListener/index.vue diff --git a/src/api/bpm/processListener/index.ts b/src/api/bpm/processListener/index.ts new file mode 100644 index 00000000..dabaa476 --- /dev/null +++ b/src/api/bpm/processListener/index.ts @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +// BPM 流程监听器 VO +export interface ProcessListenerVO { + id: number // 编号 + name: string // 监听器名字 + type: string // 监听器类型 + status: number // 监听器状态 + event: string // 监听事件 + valueType: string // 监听器值类型 + value: string // 监听器值 +} + +// BPM 流程监听器 API +export const ProcessListenerApi = { + // 查询流程监听器分页 + getProcessListenerPage: async (params: any) => { + return await request.get({ url: `/bpm/process-listener/page`, params }) + }, + + // 查询流程监听器详情 + getProcessListener: async (id: number) => { + return await request.get({ url: `/bpm/process-listener/get?id=` + id }) + }, + + // 新增流程监听器 + createProcessListener: async (data: ProcessListenerVO) => { + return await request.post({ url: `/bpm/process-listener/create`, data }) + }, + + // 修改流程监听器 + updateProcessListener: async (data: ProcessListenerVO) => { + return await request.put({ url: `/bpm/process-listener/update`, data }) + }, + + // 删除流程监听器 + deleteProcessListener: async (id: number) => { + return await request.delete({ url: `/bpm/process-listener/delete?id=` + id }) + } +} diff --git a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue index 5e77c948..60ee56ed 100644 --- a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue +++ b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue @@ -139,17 +139,25 @@ const updateBaseInfo = (key) => { } } -watch( - () => props.businessObject, - (val) => { - // console.log(val, 'val11111111111111111111') - if (val) { - // nextTick(() => { - resetBaseInfo() - // }) - } - } -) +onMounted(() => { + // 针对上传的 bpmn 流程图时,需要延迟 1 毫秒的时间,保证 key 和 name 的更新 + setTimeout(() => { + handleKeyUpdate(props.model.key) + handleNameUpdate(props.model.name) + }, 1) +}) + +// watch( +// () => props.businessObject, +// (val) => { +// // console.log(val, 'val11111111111111111111') +// if (val) { +// // nextTick(() => { +// resetBaseInfo() +// // }) +// } +// } +// ) watch( () => props.model?.key, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index f7d337cb..2284ff13 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -141,6 +141,8 @@ export enum DICT_TYPE { BPM_PROCESS_INSTANCE_STATUS = 'bpm_process_instance_status', BPM_TASK_STATUS = 'bpm_task_status', BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type', + BPM_PROCESS_LISTENER_TYPE = 'bpm_process_listener_type', + BPM_PROCESS_LISTENER_VALUE_TYPE = 'bpm_process_listener_value_type', // ========== PAY 模块 ========== PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型 @@ -155,7 +157,7 @@ export enum DICT_TYPE { MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型 MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型 - // ========== MALL - 会员模块 ========== + // ========== Member 会员模块 ========== MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型 MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型 diff --git a/src/views/bpm/processListener/ProcessListenerForm.vue b/src/views/bpm/processListener/ProcessListenerForm.vue new file mode 100644 index 00000000..8d4e9796 --- /dev/null +++ b/src/views/bpm/processListener/ProcessListenerForm.vue @@ -0,0 +1,162 @@ + + diff --git a/src/views/bpm/processListener/index.vue b/src/views/bpm/processListener/index.vue new file mode 100644 index 00000000..83e998c9 --- /dev/null +++ b/src/views/bpm/processListener/index.vue @@ -0,0 +1,183 @@ + + +