import type { VxeGridProps } from '#/adapter/vxe-table'; import { computed } from 'vue'; import dayjs from 'dayjs'; import { $t } from '#/locales'; export const querySchema = computed(() => [ { component: 'DatePicker', fieldName: 'Timestamps', label: $t('abp.log.timestamps'), }, ]); export const tableSchema: any = computed((): VxeGridProps['columns'] => [ { title: $t('common.seq'), type: 'seq', width: 50 }, { field: 'systemName', title: $t('abp.log.systemName'), minWidth: '150' }, { field: 'projectId', title: $t('abp.log.projectId'), minWidth: '150', }, { field: 'dataType', title: $t('abp.log.dataType'), minWidth: '150', }, { field: 'deviceType', title: $t('abp.log.deviceType'), minWidth: '150', }, { field: 'type', title: $t('abp.dataDictionary.status'), minWidth: '100', }, { field: 'times', title: $t('abp.log.timestamps'), minWidth: '150', formatter: ({ cellValue }) => { return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss'); }, }, ]);