diff --git a/src/views/bpm/task/todo.data.ts b/src/views/bpm/task/todo.data.ts new file mode 100644 index 00000000..62081163 --- /dev/null +++ b/src/views/bpm/task/todo.data.ts @@ -0,0 +1,59 @@ +import { BasicColumn, FormSchema, useRender } from '@/components/Table' + +export const columns: BasicColumn[] = [ + { + title: '任务编号', + dataIndex: 'id', + width: 100 + }, + { + title: '任务名称', + dataIndex: 'name', + width: 180 + }, + { + title: '所属流程', + dataIndex: 'processInstance.name', + width: 180 + }, + { + title: '流程发起人', + dataIndex: 'processInstance.startUserNickname', + width: 180 + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + customRender: ({ text }) => { + return useRender.renderDate(text) + } + }, + { + title: '状态', + dataIndex: 'suspensionState', + width: 180, + customRender: ({ text }) => { + if (text === 1) { + return useRender.renderTag('激活', 'success') + } else if (text === 2) { + return useRender.renderTag('挂起', 'warning') + } + } + } +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '流程名', + field: 'name', + component: 'Input', + colProps: { span: 8 } + }, + { + label: '创建时间', + field: 'createTime', + component: 'RangePicker', + colProps: { span: 8 } + } +] diff --git a/src/views/bpm/task/todo.vue b/src/views/bpm/task/todo.vue index 3b64cfc4..0e9a6aa2 100644 --- a/src/views/bpm/task/todo.vue +++ b/src/views/bpm/task/todo.vue @@ -1,3 +1,28 @@ +