From 65e7aeea488e8038349fedf2c56286c60bdced61 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 23 Aug 2023 15:06:02 +0800 Subject: [PATCH] feat: bpm views --- src/api/bpm/processInstance/index.ts | 21 +-- src/views/bpm/model/editor/index.vue | 2 +- .../bpm/processInstance/create/create.data.ts | 32 +++++ .../bpm/processInstance/create/index.vue | 122 +++++++++++++++++- .../processInstance/processInstance.data.ts | 8 ++ 5 files changed, 163 insertions(+), 22 deletions(-) create mode 100644 src/views/bpm/processInstance/create/create.data.ts diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 3936a83..8f5866e 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -1,29 +1,10 @@ import { defHttp } from '@/utils/http/axios' -export interface task { - id: string - name: string -} -export interface ProcessInstanceVO { - id: number - name: string - processDefinitionId: string - category: string - result: number - tasks: task[] - fields: string[] - status: number - remark: string - businessKey: string - createTime: string - endTime: string -} - export function getMyProcessInstancePage(params) { return defHttp.get({ url: '/bpm/process-instance/my-page', params }) } -export function createProcessInstance(data: ProcessInstanceVO) { +export function createProcessInstance(data) { return defHttp.post({ url: '/bpm/process-instance/create', data }) } diff --git a/src/views/bpm/model/editor/index.vue b/src/views/bpm/model/editor/index.vue index 36487dd..6256e61 100644 --- a/src/views/bpm/model/editor/index.vue +++ b/src/views/bpm/model/editor/index.vue @@ -1,3 +1,3 @@ diff --git a/src/views/bpm/processInstance/create/create.data.ts b/src/views/bpm/processInstance/create/create.data.ts new file mode 100644 index 0000000..ff68c30 --- /dev/null +++ b/src/views/bpm/processInstance/create/create.data.ts @@ -0,0 +1,32 @@ +import type { BasicColumn } from '@/components/Table' +import { DICT_TYPE } from '@/utils/dict' +import { useRender } from '@/components/Table' + +export const columns: BasicColumn[] = [ + { + title: '流程名称', + dataIndex: 'name', + width: 120, + }, + { + title: '流程分类', + dataIndex: 'category', + width: 120, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.BPM_MODEL_CATEGORY) + }, + }, + { + title: '流程版本', + dataIndex: 'name', + width: 120, + customRender: ({ text }) => { + return useRender.renderTag(text) + }, + }, + { + title: '流程描述', + dataIndex: 'description', + width: 200, + }, +] diff --git a/src/views/bpm/processInstance/create/index.vue b/src/views/bpm/processInstance/create/index.vue index 6256e61..d8b1fae 100644 --- a/src/views/bpm/processInstance/create/index.vue +++ b/src/views/bpm/processInstance/create/index.vue @@ -1,3 +1,123 @@ + + + + diff --git a/src/views/bpm/processInstance/processInstance.data.ts b/src/views/bpm/processInstance/processInstance.data.ts index cc7eaf1..d963a7b 100644 --- a/src/views/bpm/processInstance/processInstance.data.ts +++ b/src/views/bpm/processInstance/processInstance.data.ts @@ -43,6 +43,14 @@ export const columns: BasicColumn[] = [ return useRender.renderDict(text, DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS) }, }, + { + title: '结果', + dataIndex: 'result', + width: 180, + customRender: ({ text }) => { + return useRender.renderDict(text, DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) + }, + }, { title: '提交时间', dataIndex: 'createTime',