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 @@ + + +