yxk-20260518-待办列表增加截至时间计算逻辑,逾期和即将到期的任务分别提醒

This commit is contained in:
ye1023
2026-05-18 15:32:45 +08:00
parent 1d74213d35
commit 26b45c5c02
@@ -1,4 +1,6 @@
import { BasicColumn, FormSchema } from '/@/components/Table'; import { BasicColumn, FormSchema } from '/@/components/Table';
import { Tag } from 'ant-design-vue';
import { h } from 'vue';
export enum TaskType { export enum TaskType {
RUN = 'run', RUN = 'run',
@@ -42,8 +44,21 @@ export const columns: BasicColumn[] = [
{ {
title: '事项截止时间', title: '事项截止时间',
align: 'center', align: 'center',
width: 170, width: 120,
dataIndex: 'deadline', 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;
},
}, },
{ {
title: '流程实例', title: '流程实例',