3 changed files with 131 additions and 1 deletions
@ -0,0 +1,78 @@ |
|||||||
|
import { BasicColumn, FormSchema, useRender } from '@/components/Table' |
||||||
|
import { getDate } from '@/utils/dateUtil' |
||||||
|
import { DICT_TYPE } from '@/utils/dict' |
||||||
|
|
||||||
|
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: 'result', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDict(text, DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '审批意见', |
||||||
|
dataIndex: 'reason', |
||||||
|
width: 180 |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '创建时间', |
||||||
|
dataIndex: 'createTime', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDate(text) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '审批时间', |
||||||
|
dataIndex: 'endTime', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDate(text) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '耗时', |
||||||
|
dataIndex: 'durationInMillis', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return getDate(text) |
||||||
|
} |
||||||
|
} |
||||||
|
] |
||||||
|
|
||||||
|
export const searchFormSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
label: '流程名', |
||||||
|
field: 'name', |
||||||
|
component: 'Input', |
||||||
|
colProps: { span: 8 } |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '创建时间', |
||||||
|
field: 'createTime', |
||||||
|
component: 'RangePicker', |
||||||
|
colProps: { span: 8 } |
||||||
|
} |
||||||
|
] |
@ -1,3 +1,28 @@ |
|||||||
<template> |
<template> |
||||||
<div>开发中</div> |
<div> |
||||||
|
<BasicTable @register="registerTable" /> |
||||||
|
</div> |
||||||
</template> |
</template> |
||||||
|
<script lang="ts" setup name="Done"> |
||||||
|
import { useI18n } from '@/hooks/web/useI18n' |
||||||
|
import { BasicTable, useTable } from '@/components/Table' |
||||||
|
import { getDoneTaskPage } from '@/api/bpm/task' |
||||||
|
import { columns, searchFormSchema } from './done.data' |
||||||
|
|
||||||
|
const { t } = useI18n() |
||||||
|
|
||||||
|
const [registerTable] = useTable({ |
||||||
|
title: '审批列表', |
||||||
|
api: getDoneTaskPage, |
||||||
|
columns, |
||||||
|
formConfig: { labelWidth: 120, schemas: searchFormSchema }, |
||||||
|
useSearchForm: true, |
||||||
|
showTableSetting: true, |
||||||
|
actionColumn: { |
||||||
|
width: 140, |
||||||
|
title: t('common.action'), |
||||||
|
dataIndex: 'action', |
||||||
|
fixed: 'right' |
||||||
|
} |
||||||
|
}) |
||||||
|
</script> |
||||||
|
Reference in new issue