| | |
| | | MesToolStatusEnum, |
| | | } from '@vben/constants'; |
| | | import { getDictOptions } from '@vben/hooks'; |
| | | import { formatDateTime } from '@vben/utils'; |
| | | import { formatDate } from '@vben/utils'; |
| | | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | |
| | | label: '下次保养日期', |
| | | component: 'DatePicker', |
| | | componentProps: { |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | showTime: true, |
| | | format: 'YYYY-MM-DD', |
| | | showTime: false, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | dependencies: { |
| | |
| | | formatter: ({ row }) => { |
| | | if (row.maintenType === MesMaintenTypeEnum.REGULAR) { |
| | | return row.nextMaintenDate |
| | | ? formatDateTime(row.nextMaintenDate) |
| | | ? formatDate(row.nextMaintenDate) |
| | | : '-'; |
| | | } |
| | | if (row.maintenType === MesMaintenTypeEnum.USAGE) { |
| | |
| | | field: 'createTime', |
| | | title: '创建时间', |
| | | width: 180, |
| | | formatter: 'formatDateTime', |
| | | formatter: 'formatDate', |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | field: 'createTime', |
| | | title: '创建时间', |
| | | width: 180, |
| | | formatter: 'formatDateTime', |
| | | formatter: 'formatDate', |
| | | }, |
| | | ]; |
| | | } |