2025-06-25 17:29:57 +08:00
|
|
|
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',
|
2025-07-11 00:15:57 +08:00
|
|
|
label: $t('abp.CTWingLog.FocusAddress'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Input',
|
|
|
|
|
fieldName: 'DeviceId',
|
|
|
|
|
label: $t('abp.IoTDBBase.DeviceId'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Input',
|
|
|
|
|
fieldName: 'DeviceType',
|
|
|
|
|
label: $t('abp.IoTDBBase.DeviceType'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Input',
|
|
|
|
|
fieldName: 'SystemName',
|
|
|
|
|
label: $t('abp.IoTDBBase.SystemName'),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Input',
|
|
|
|
|
fieldName: 'ProjectId',
|
|
|
|
|
label: $t('abp.IoTDBBase.ProjectId'),
|
2025-06-25 17:29:57 +08:00
|
|
|
},
|
|
|
|
|
]);
|
2025-07-11 00:15:57 +08:00
|
|
|
|
2025-06-25 17:29:57 +08:00
|
|
|
export const tableSchema: any = computed((): VxeGridProps['columns'] => [
|
|
|
|
|
{ title: $t('common.seq'), type: 'seq', width: 50 },
|
2025-07-11 00:15:57 +08:00
|
|
|
{ field: 'systemName', title: $t('abp.IoTDBBase.SystemName'), minWidth: 150 },
|
2025-06-25 17:29:57 +08:00
|
|
|
{
|
|
|
|
|
field: 'projectId',
|
2025-07-11 00:15:57 +08:00
|
|
|
title: $t('abp.IoTDBBase.ProjectId'),
|
|
|
|
|
minWidth: 150,
|
2025-06-25 17:29:57 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'dataType',
|
2025-07-11 00:15:57 +08:00
|
|
|
title: $t('abp.IoTDBBase.IoTDataType'),
|
|
|
|
|
minWidth: 150,
|
2025-06-25 17:29:57 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'deviceType',
|
2025-07-11 00:15:57 +08:00
|
|
|
title: $t('abp.IoTDBBase.DeviceType'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'deviceId',
|
|
|
|
|
title: $t('abp.IoTDBBase.DeviceId'),
|
|
|
|
|
minWidth: 150,
|
2025-06-25 17:29:57 +08:00
|
|
|
},
|
|
|
|
|
{
|
2025-07-11 00:15:57 +08:00
|
|
|
field: 'timestamps',
|
|
|
|
|
title: $t('abp.IoTDBBase.Timestamps'),
|
|
|
|
|
minWidth: 150,
|
2025-06-25 17:29:57 +08:00
|
|
|
formatter: ({ cellValue }) => {
|
2025-07-11 00:15:57 +08:00
|
|
|
return cellValue ? dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss') : '';
|
2025-06-25 17:29:57 +08:00
|
|
|
},
|
|
|
|
|
},
|
2025-07-11 00:15:57 +08:00
|
|
|
{
|
|
|
|
|
field: 'devicePath',
|
|
|
|
|
title: $t('abp.IoTDBBase.DevicePath'),
|
|
|
|
|
minWidth: 200,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'platformTenantId',
|
|
|
|
|
title: $t('abp.CTWingLog.PlatformTenantId'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'productId',
|
|
|
|
|
title: $t('abp.CTWingLog.ProductId'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'serviceId',
|
|
|
|
|
title: $t('abp.CTWingLog.ServiceId'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'platformDeviceId',
|
|
|
|
|
title: $t('abp.CTWingLog.PlatformDeviceId'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'messageType',
|
|
|
|
|
title: $t('abp.CTWingLog.MessageType'),
|
|
|
|
|
minWidth: 120,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'protocol',
|
|
|
|
|
title: $t('abp.CTWingLog.Protocol'),
|
|
|
|
|
minWidth: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'focusAddress',
|
|
|
|
|
title: $t('abp.CTWingLog.FocusAddress'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'meterAddress',
|
|
|
|
|
title: $t('abp.CTWingLog.MeterAddress'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'rawMessage',
|
|
|
|
|
title: $t('abp.CTWingLog.RawMessage'),
|
|
|
|
|
minWidth: 200,
|
|
|
|
|
showOverflow: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'receivedPayload',
|
|
|
|
|
title: $t('abp.CTWingLog.ReceivedPayload'),
|
|
|
|
|
minWidth: 200,
|
|
|
|
|
showOverflow: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'receivedTime',
|
|
|
|
|
title: $t('abp.CTWingLog.ReceivedTime'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
formatter: ({ cellValue }) => {
|
|
|
|
|
return cellValue ? dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss') : '';
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'imsi',
|
|
|
|
|
title: $t('abp.CTWingLog.IMSI'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'imei',
|
|
|
|
|
title: $t('abp.CTWingLog.IMEI'),
|
|
|
|
|
minWidth: 150,
|
|
|
|
|
},
|
2025-06-25 17:29:57 +08:00
|
|
|
]);
|