43 lines
976 B
TypeScript

import type { VxeGridProps } from '#/adapter/vxe-table';
import { computed } from 'vue';
import dayjs from 'dayjs';
import { $t } from '#/locales';
export const querySchema = computed(() => [
{
component: 'Input',
fieldName: 'FocusAddress',
label: $t('abp.focus.focusAddress'),
},
]);
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: 'times',
title: $t('abp.log.timestamps'),
minWidth: '150',
formatter: ({ cellValue }) => {
return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss');
},
},
]);