You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

<template>
2 years ago
<div>
2 years ago
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction :actions="[{ icon: IconEnum.VIEW, label: '审批进度', onClick: handleAudit.bind(null, record) }]" />
</template>
</template>
</BasicTable>
2 years ago
</div>
</template>
<script lang="ts" setup>
2 years ago
import { useGo } from '@/hooks/web/usePage'
2 years ago
import { useI18n } from '@/hooks/web/useI18n'
2 years ago
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { IconEnum } from '@/enums/appEnum'
2 years ago
import { getTodoTaskPage } from '@/api/bpm/task'
import { columns, searchFormSchema } from './todo.data'
2 years ago
defineOptions({ name: 'BpmTodoTask' })
2 years ago
const go = useGo()
2 years ago
const { t } = useI18n()
const [registerTable] = useTable({
title: '审批列表',
api: getTodoTaskPage,
columns,
formConfig: { labelWidth: 120, schemas: searchFormSchema },
useSearchForm: true,
showTableSetting: true,
actionColumn: {
width: 140,
title: t('common.action'),
dataIndex: 'action',
fixed: 'right'
}
})
2 years ago
function handleAudit(record: Recordable) {
go({ name: 'BpmProcessInstanceDetail', query: { id: record.id } })
}
2 years ago
</script>