3 changed files with 114 additions and 4 deletions
@ -1,3 +0,0 @@ |
|||||||
<template> |
|
||||||
<div>开发中</div> |
|
||||||
</template> |
|
@ -1,3 +1,28 @@ |
|||||||
<template> |
<template> |
||||||
<div>开发中</div> |
<div> |
||||||
|
<BasicTable @register="registerTable" /> |
||||||
|
</div> |
||||||
</template> |
</template> |
||||||
|
<script lang="ts" setup name="Form"> |
||||||
|
import { useI18n } from '@/hooks/web/useI18n' |
||||||
|
import { BasicTable, useTable } from '@/components/Table' |
||||||
|
import { getLeavePage } from '@/api/bpm/leave' |
||||||
|
import { columns, searchFormSchema } from './leave.data' |
||||||
|
|
||||||
|
const { t } = useI18n() |
||||||
|
|
||||||
|
const [registerTable] = useTable({ |
||||||
|
title: '请假列表', |
||||||
|
api: getLeavePage, |
||||||
|
columns, |
||||||
|
formConfig: { labelWidth: 120, schemas: searchFormSchema }, |
||||||
|
useSearchForm: true, |
||||||
|
showTableSetting: true, |
||||||
|
actionColumn: { |
||||||
|
width: 140, |
||||||
|
title: t('common.action'), |
||||||
|
dataIndex: 'action', |
||||||
|
fixed: 'right' |
||||||
|
} |
||||||
|
}) |
||||||
|
</script> |
||||||
|
@ -0,0 +1,88 @@ |
|||||||
|
import { BasicColumn, FormSchema, useRender } from '@/components/Table' |
||||||
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' |
||||||
|
|
||||||
|
export const columns: BasicColumn[] = [ |
||||||
|
{ |
||||||
|
title: '申请编号', |
||||||
|
dataIndex: 'id', |
||||||
|
width: 100 |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '状态', |
||||||
|
dataIndex: 'result', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDict(text, DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '开始时间', |
||||||
|
dataIndex: 'startTime', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDate(text) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '结束时间', |
||||||
|
dataIndex: 'endTime', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDate(text) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '请假类型', |
||||||
|
dataIndex: 'type', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDict(text, DICT_TYPE.BPM_OA_LEAVE_TYPE) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '原因', |
||||||
|
dataIndex: 'reason', |
||||||
|
width: 180 |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '申请时间', |
||||||
|
dataIndex: 'applyTime', |
||||||
|
width: 180, |
||||||
|
customRender: ({ text }) => { |
||||||
|
return useRender.renderDate(text) |
||||||
|
} |
||||||
|
} |
||||||
|
] |
||||||
|
|
||||||
|
export const searchFormSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
label: '请假类型', |
||||||
|
field: 'status', |
||||||
|
component: 'Select', |
||||||
|
componentProps: { |
||||||
|
options: getIntDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE) |
||||||
|
}, |
||||||
|
colProps: { span: 8 } |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '申请时间', |
||||||
|
field: 'createTime', |
||||||
|
component: 'RangePicker', |
||||||
|
colProps: { span: 8 } |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '结果', |
||||||
|
field: 'status', |
||||||
|
component: 'Select', |
||||||
|
componentProps: { |
||||||
|
options: getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT) |
||||||
|
}, |
||||||
|
colProps: { span: 8 } |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '原因', |
||||||
|
field: 'reason', |
||||||
|
component: 'Input', |
||||||
|
colProps: { span: 8 } |
||||||
|
} |
||||||
|
] |
Reference in new issue