Files
supervision-test-frontend-repo/src/views/dashboard/ProcessPortal/data/todo.data.ts
T

44 lines
1.1 KiB
TypeScript

import { BasicColumn } from '/@/components/Table';
import { Tag } from 'ant-design-vue';
import { h } from 'vue';
export const todoColumns: BasicColumn[] = [
{
title: '业务标题',
align: 'center',
dataIndex: 'bpmBizTitle',
ellipsis: true,
},
{
title: '当前环节',
align: 'center',
width: 200,
dataIndex: 'taskName',
},
{
title: '转入时间',
align: 'center',
width: 160,
dataIndex: 'taskBeginTime',
},
{
title: '事项截止时间',
align: 'center',
width: 160,
dataIndex: 'deadline',
customRender: ({ text, record }) => {
const value = !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
if (!value) {
return '';
}
if (record.deadlineOverdue) {
return h(Tag, { color: 'error' }, () => (record.deadlineWarnText ? `${value} ${record.deadlineWarnText}` : value));
}
if (record.deadlineSoon) {
return h(Tag, { color: 'warning' }, () => (record.deadlineWarnText ? `${value} ${record.deadlineWarnText}` : value));
}
return value;
},
},
];