From cc14963bc8c9b53ef479dd9ccdd83cd3cb2e89e2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 23 Mar 2024 21:12:09 +0800 Subject: [PATCH] =?UTF-8?q?BPM=EF=BC=9A=E5=A2=9E=E5=8A=A0=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E8=A1=A8=E8=BE=BE=E5=BC=8F=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/processExpression/index.ts | 42 ++++ .../penal/listeners/ElementListeners.vue | 4 +- .../penal/listeners/ProcessListenerDialog.vue | 5 - .../penal/listeners/UserTaskListeners.vue | 4 +- .../ProcessExpressionDialog.vue | 68 +++++++ .../penal/task/task-components/UserTask.vue | 21 +- .../ProcessExpressionForm.vue | 114 +++++++++++ src/views/bpm/processExpression/index.vue | 180 ++++++++++++++++++ 8 files changed, 426 insertions(+), 12 deletions(-) create mode 100644 src/api/bpm/processExpression/index.ts create mode 100644 src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue create mode 100644 src/views/bpm/processExpression/ProcessExpressionForm.vue create mode 100644 src/views/bpm/processExpression/index.vue diff --git a/src/api/bpm/processExpression/index.ts b/src/api/bpm/processExpression/index.ts new file mode 100644 index 00000000..af6a7372 --- /dev/null +++ b/src/api/bpm/processExpression/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +// BPM 流程表达式 VO +export interface ProcessExpressionVO { + id: number // 编号 + name: string // 表达式名字 + status: number // 表达式状态 + expression: string // 表达式 +} + +// BPM 流程表达式 API +export const ProcessExpressionApi = { + // 查询BPM 流程表达式分页 + getProcessExpressionPage: async (params: any) => { + return await request.get({ url: `/bpm/process-expression/page`, params }) + }, + + // 查询BPM 流程表达式详情 + getProcessExpression: async (id: number) => { + return await request.get({ url: `/bpm/process-expression/get?id=` + id }) + }, + + // 新增BPM 流程表达式 + createProcessExpression: async (data: ProcessExpressionVO) => { + return await request.post({ url: `/bpm/process-expression/create`, data }) + }, + + // 修改BPM 流程表达式 + updateProcessExpression: async (data: ProcessExpressionVO) => { + return await request.put({ url: `/bpm/process-expression/update`, data }) + }, + + // 删除BPM 流程表达式 + deleteProcessExpression: async (id: number) => { + return await request.delete({ url: `/bpm/process-expression/delete?id=` + id }) + }, + + // 导出BPM 流程表达式 Excel + exportProcessExpression: async (params) => { + return await request.download({ url: `/bpm/process-expression/export-excel`, params }) + } +} \ No newline at end of file diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue index 410274b6..de5445c8 100644 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue +++ b/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue @@ -250,7 +250,7 @@ - + diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue index 166fb409..0dffeb0f 100644 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue @@ -5,7 +5,7 @@ v-model="userTaskForm.candidateStrategy" clearable style="width: 100%" - @change="changecandidateStrategy" + @change="changeCandidateStrategy" > + 选择表达式 + + @@ -129,6 +134,7 @@ import * as DeptApi from '@/api/system/dept' import * as PostApi from '@/api/system/post' import * as UserApi from '@/api/system/user' import * as UserGroupApi from '@/api/bpm/userGroup' +import ProcessExpressionDialog from './ProcessExpressionDialog.vue' defineOptions({ name: 'UserTask' }) const props = defineProps({ @@ -173,7 +179,7 @@ const resetTaskForm = () => { } /** 更新 candidateStrategy 字段时,需要清空 candidateParam,并触发 bpmn 图更新 */ -const changecandidateStrategy = () => { +const changeCandidateStrategy = () => { userTaskForm.value.candidateParam = [] updateElementTask() } @@ -186,6 +192,15 @@ const updateElementTask = () => { }) } +// 打开监听器弹窗 +const processExpressionDialogRef = ref() +const openProcessExpressionDialog = async () => { + processExpressionDialogRef.value.open() +} +const selectProcessExpression = (expression) => { + userTaskForm.value.candidateParam = [expression.expression] +} + watch( () => props.id, () => { diff --git a/src/views/bpm/processExpression/ProcessExpressionForm.vue b/src/views/bpm/processExpression/ProcessExpressionForm.vue new file mode 100644 index 00000000..acf0667c --- /dev/null +++ b/src/views/bpm/processExpression/ProcessExpressionForm.vue @@ -0,0 +1,114 @@ + + diff --git a/src/views/bpm/processExpression/index.vue b/src/views/bpm/processExpression/index.vue new file mode 100644 index 00000000..194a4d85 --- /dev/null +++ b/src/views/bpm/processExpression/index.vue @@ -0,0 +1,180 @@ + + +