diff --git a/apps/web-antd/src/api-client/services.gen.ts b/apps/web-antd/src/api-client/services.gen.ts index 2e6d23f..e4d4b22 100644 --- a/apps/web-antd/src/api-client/services.gen.ts +++ b/apps/web-antd/src/api-client/services.gen.ts @@ -14,6 +14,13 @@ import type { GetApiAbpApplicationLocalizationResponse, GetApiAppAbpProBasicApplicationConfigurationError, GetApiAppAbpProBasicApplicationConfigurationResponse, + IoTDBCTWingLogInfoDtoPageListInput, + IoTDBCTWingLogInfoDtoPageListResult, + IoTDBDataInfoErrorResponse, + IoTDBOneNETLogInfoPageListInput, + IoTDBOneNETLogInfoPageListResult, + IoTDBTreeModelDeviceDataPageAllResponse, + IoTDBTreeModelDeviceDataPageDataInput, PostApiAppAccountLogin2FaData, PostApiAppAccountLogin2FaError, PostApiAppAccountLogin2FaResponse, @@ -434,11 +441,8 @@ import type { PostUsersUpdateData, PostUsersUpdateError, PostUsersUpdateResponse, - IoTDBDataInfoErrorResponse, - IoTDBTreeModelDeviceDataPageDataInput, - IoTDBTreeModelDeviceDataPageAllResponse, + SelectResultListAllResponse, SelectResultListInput, - SelectResultListAllResponse } from './types.gen'; import { @@ -3164,3 +3168,35 @@ export const getSelectResultList = ( url: '/Common/GetSelectList', }); }; + +/** + * OneNET 设备日志 + */ +export const postOneNETLogInfoPage = ( + options?: Options, +) => { + return (options?.client ?? client).post< + IoTDBOneNETLogInfoPageListResult, + IoTDBDataInfoErrorResponse, + ThrowOnError + >({ + ...options, + url: '/TableModel/OneNETLogInfo', + }); +}; + +/** + * CTWing 设备日志 + */ +export const postCTWingLogInfoPage = ( + options?: Options, +) => { + return (options?.client ?? client).post< + IoTDBCTWingLogInfoDtoPageListResult, + IoTDBDataInfoErrorResponse, + ThrowOnError + >({ + ...options, + url: '/TableModel/OneNETLogInfo', + }); +}; diff --git a/apps/web-antd/src/api-client/types.gen.ts b/apps/web-antd/src/api-client/types.gen.ts index 097086f..3343b3f 100644 --- a/apps/web-antd/src/api-client/types.gen.ts +++ b/apps/web-antd/src/api-client/types.gen.ts @@ -5085,37 +5085,114 @@ export type IoTDBTreeModelDeviceDataPageDataInput = { }; export type IoTDBTreeModelDeviceDataDto = { - SystemName?: null | string; - ProjectId?: null | string; - ProjectName?: null | string; - IoTDataType?: null | string; - DeviceType?: null | string; DeviceId?: null | string; - Timestamps?: null | string; - APPData?: null | string; + DeviceType?: null | string; + IoTDataType?: null | string; + ProjectId?: null | string; + ProjectName?: null | string; + SystemName?: null | string; + Timestamps?: null | string; }; export type IoTDBTreeModelDeviceDataPageListResultDto = { items?: Array | null; }; -export type IoTDBTreeModelDeviceDataPageAllResponse = IoTDBTreeModelDeviceDataPageListResultDto; +export type IoTDBTreeModelDeviceDataPageAllResponse = + IoTDBTreeModelDeviceDataPageListResultDto; - -export type SelectResultListInput = { +export type SelectResultListInput = { query?: { - TypeName?: null | string; ThirdAttributeTypeName?: null | string; - }; + TypeName?: null | string; + }; }; -export type SelectResultListDto = { - key?: string | null; - value?: string | null; - secondValue?: string | null; - thirdValue?: string | null; +export type SelectResultListDto = { + key?: null | string; + secondValue?: null | string; + thirdValue?: null | string; + value?: null | string; }; export type SelectResultListAllResponse = { items?: Array | null; }; +export type OneNETLogInfoDto = { + deviceId: string; + devicePath: string; + deviceType: string; + focusAddress: string; + /** 数据类型 */ + ioTDataType?: string; + isEncrypted: boolean; + messageType: string; + meterAddress: string; + plaintextMessage: string; + platformDeviceId: string; + productId: string; + projectId: string; + protocol: string; + rawMessage: string; + receivedPayload: string; + receivedTime: Date; + systemName: string; + timestamps: number; +}; + +export type IoTDBOneNETLogInfoPageListInput = { + body?: IoTDBDataInfoPageInput; +}; +export type IoTDBOneNETLogInfoPageListResult = { + items?: Array | null; +}; + +export type CTWingLogInfoDto = { + /** 设备ID */ + deviceId?: string; + /** 设备路径 */ + devicePath?: string; + /** 设备类型 */ + deviceType?: string; + /** 集中器地址 */ + focusAddress?: string; + /** IMEI */ + imei?: string; + /** IMSI */ + imsi?: string; + /** 数据类型 */ + ioTDataType?: string; + /** 消息类型 */ + messageType?: string; + /** 表计地址 */ + meterAddress?: string; + /** 平台设备ID */ + platformDeviceId?: string; + /** 平台租户ID */ + platformTenantId?: string; + /** 产品ID */ + productId?: string; + /** 项目ID */ + projectId?: string; + /** 协议 */ + protocol?: string; + /** 原始消息 */ + rawMessage?: string; + /** 接收载荷 */ + receivedPayload?: string; + /** 接收时间 */ + receivedTime?: Date; + /** 服务ID */ + serviceId?: string; + /** 系统名称 */ + systemName?: string; + /** 时间戳 */ + timestamps?: number; +}; + +export type IoTDBCTWingLogInfoDtoPageListInput = { + body?: IoTDBDataInfoPageInput; +}; +export type IoTDBCTWingLogInfoDtoPageListResult = { + items?: Array | null; +}; diff --git a/apps/web-antd/src/api/core/onenet.ts b/apps/web-antd/src/api/core/onenet.ts deleted file mode 100644 index d53eb55..0000000 --- a/apps/web-antd/src/api/core/onenet.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { requestClient } from '../request'; - -export interface OneNETLogInfo { - systemName: string; - projectId: string; - dataType: string; - deviceType: string; - deviceId: string; - timestamps: number; - devicePath: string; - productId: string; - platformDeviceId: string; - messageType: string; - protocol: string; - focusAddress: string; - meterAddress: string; - rawMessage: string; - receivedPayload: string; - receivedTime: number; -} - -export interface OneNETLogPageParams { - pageIndex: number; - pageSize: number; - DeviceType?: string; - DeviceId?: string; - FocusAddress?: string; - [key: string]: any; -} - -export interface OneNETLogPageResult { - items: OneNETLogInfo[]; - totalCount: number; -} - -export const postOneNETLogInfoPage = (params: OneNETLogPageParams) => { - return requestClient.post('/TableModel/OneNETLogInfo', { - data: params, - }); -}; diff --git a/apps/web-antd/src/locales/langs/zh-CN/abp.json b/apps/web-antd/src/locales/langs/zh-CN/abp.json index 0408460..fde5a6d 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/abp.json +++ b/apps/web-antd/src/locales/langs/zh-CN/abp.json @@ -224,14 +224,14 @@ "pointData": "测点数据", "archivesIssued": "档案下发" }, - "IoTDBBase": { - "SystemName": "所属系统", - "ProjectId": "项目编码", - "ProjectName": "项目名称", - "IoTDataType": "数据类型", - "DeviceType": "设备类型", - "DeviceId": "设备ID", - "Timestamps": "时标", + "IoTDBBase": { + "SystemName": "所属系统", + "ProjectId": "项目编码", + "ProjectName": "项目名称", + "IoTDataType": "数据类型", + "DeviceType": "设备类型", + "DeviceId": "设备ID", + "Timestamps": "时标(纳秒)", "DevicePath": "设备路径" }, "CTWingLog": { @@ -258,6 +258,8 @@ "MeterAddress": "表地址", "RawMessage": "消息上报原始内容", "ReceivedPayload": "消息上报结果", + "IsEncrypted": "是否加密", + "PlaintextMessage": "明文消息", "ReceivedTime": "消息上报时间" }, "SelectResultType": { diff --git a/apps/web-antd/src/views/dataManger/ctwingLog/index.vue b/apps/web-antd/src/views/dataManger/ctwingLog/index.vue index 77e9d4c..8abcd55 100644 --- a/apps/web-antd/src/views/dataManger/ctwingLog/index.vue +++ b/apps/web-antd/src/views/dataManger/ctwingLog/index.vue @@ -1,310 +1,67 @@ - - diff --git a/apps/web-antd/src/views/dataManger/ctwingLog/schema.ts b/apps/web-antd/src/views/dataManger/ctwingLog/schema.ts index 419a1da..3c880d8 100644 --- a/apps/web-antd/src/views/dataManger/ctwingLog/schema.ts +++ b/apps/web-antd/src/views/dataManger/ctwingLog/schema.ts @@ -36,34 +36,31 @@ export const querySchema = computed(() => [ export const tableSchema: any = computed((): VxeGridProps['columns'] => [ { title: $t('common.seq'), type: 'seq', width: 50 }, + { + field: 'timestamps', + title: $t('abp.IoTDBBase.Timestamps'), + minWidth: 150, + }, { field: 'systemName', title: $t('abp.IoTDBBase.SystemName'), minWidth: 150 }, { field: 'projectId', title: $t('abp.IoTDBBase.ProjectId'), minWidth: 150, }, - { - field: 'dataType', - title: $t('abp.IoTDBBase.IoTDataType'), - minWidth: 150, - }, { field: 'deviceType', title: $t('abp.IoTDBBase.DeviceType'), minWidth: 150, }, { - field: 'deviceId', - title: $t('abp.IoTDBBase.DeviceId'), + field: 'ioTDataType', + title: $t('abp.IoTDBBase.IoTDataType'), minWidth: 150, }, { - field: 'timestamps', - title: $t('abp.IoTDBBase.Timestamps'), + field: 'deviceId', + title: $t('abp.IoTDBBase.DeviceId'), minWidth: 150, - formatter: ({ cellValue }) => { - return cellValue ? dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss') : ''; - }, }, { field: 'devicePath', diff --git a/apps/web-antd/src/views/dataManger/ctwingLog/types.ts b/apps/web-antd/src/views/dataManger/ctwingLog/types.ts deleted file mode 100644 index 5586ff4..0000000 --- a/apps/web-antd/src/views/dataManger/ctwingLog/types.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * CTWing日志数据项类型定义 - */ -export interface CTWingLogItem { - /** 系统名称 */ - systemName?: string; - /** 项目ID */ - projectId?: string; - /** 数据类型 */ - dataType?: string; - /** 设备类型 */ - deviceType?: string; - /** 设备ID */ - deviceId?: string; - /** 时间戳 */ - timestamps?: number; - /** 设备路径 */ - devicePath?: string; - /** 平台租户ID */ - platformTenantId?: string; - /** 产品ID */ - productId?: string; - /** 服务ID */ - serviceId?: string; - /** 平台设备ID */ - platformDeviceId?: string; - /** 消息类型 */ - messageType?: string; - /** 协议 */ - protocol?: string; - /** 集中器地址 */ - focusAddress?: string; - /** 表计地址 */ - meterAddress?: string; - /** 原始消息 */ - rawMessage?: string; - /** 接收载荷 */ - receivedPayload?: string; - /** 接收时间 */ - receivedTime?: number; - /** IMSI */ - imsi?: string; - /** IMEI */ - imei?: string; -} - -/** - * CTWing日志查询参数类型定义 - */ -export interface CTWingLogQueryParams { - /** 当前页码 */ - pageIndex?: number; - /** 每页大小 */ - pageSize?: number; - /** 过滤条件 */ - filter?: string; - /** 排序条件 */ - sorting?: string; - /** 设备类型 */ - DeviceType?: string; - /** 设备ID */ - DeviceId?: string; - /** 集中器地址 */ - FocusAddress?: string; - /** 系统名称 */ - SystemName?: string; - /** 项目ID */ - ProjectId?: string; -} - -/** - * CTWing日志响应数据类型定义 - */ -export interface CTWingLogResponse { - /** 数据项列表 */ - items?: CTWingLogItem[]; - /** 总记录数 */ - totalCount?: number; -} - -/** - * 详情对话框数据类型定义 - */ -export interface DetailDialogData { - /** 是否显示 */ - visible: boolean; - /** 当前数据 */ - data: CTWingLogItem | null; -} - -/** - * 导出参数类型定义 - */ -export interface ExportParams extends CTWingLogQueryParams { - /** 导出格式 */ - format?: 'csv' | 'xlsx'; - /** 文件名 */ - filename?: string; -} diff --git a/apps/web-antd/src/views/dataManger/onenetLog/index.vue b/apps/web-antd/src/views/dataManger/onenetLog/index.vue index 125903f..6d2f6fe 100644 --- a/apps/web-antd/src/views/dataManger/onenetLog/index.vue +++ b/apps/web-antd/src/views/dataManger/onenetLog/index.vue @@ -7,7 +7,7 @@ import { useRoute } from 'vue-router'; import { Page } from '@vben/common-ui'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; -import { postOneNETLogInfoPage } from '#/api/core'; +import { postOneNETLogInfoPage } from '#/api-client'; import { querySchema, tableSchema } from './schema'; diff --git a/apps/web-antd/src/views/dataManger/onenetLog/schema.ts b/apps/web-antd/src/views/dataManger/onenetLog/schema.ts index 1432fbf..9dc6b40 100644 --- a/apps/web-antd/src/views/dataManger/onenetLog/schema.ts +++ b/apps/web-antd/src/views/dataManger/onenetLog/schema.ts @@ -33,8 +33,14 @@ export const querySchema = computed(() => [ label: $t('abp.OneNETLog.PlatformDeviceId'), }, ]); + export const tableSchema: any = computed((): VxeGridProps['columns'] => [ { title: $t('common.seq'), type: 'seq', width: 50 }, + { + field: 'timestamps', + title: $t('abp.IoTDBBase.Timestamps'), + minWidth: '150', + }, { field: 'systemName', title: $t('abp.IoTDBBase.SystemName'), @@ -42,13 +48,13 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [ }, { field: 'projectId', title: $t('abp.IoTDBBase.ProjectId'), minWidth: '120' }, { - field: 'dataType', - title: $t('abp.IoTDBBase.IoTDataType'), + field: 'deviceType', + title: $t('abp.IoTDBBase.DeviceType'), minWidth: '120', }, { - field: 'deviceType', - title: $t('abp.IoTDBBase.DeviceType'), + field: 'ioTDataType', + title: $t('abp.IoTDBBase.IoTDataType'), minWidth: '120', }, { field: 'deviceId', title: $t('abp.IoTDBBase.DeviceId'), minWidth: '120' }, @@ -74,14 +80,6 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [ title: $t('abp.OneNETLog.MeterAddress'), minWidth: '120', }, - { - field: 'timestamps', - title: $t('abp.IoTDBBase.Timestamps'), - minWidth: '150', - formatter: ({ cellValue }) => { - return cellValue ? dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss') : ''; - }, - }, { field: 'receivedTime', title: $t('abp.OneNETLog.ReceivedTime'), @@ -90,6 +88,16 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [ return cellValue ? dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss') : ''; }, }, + { + field: 'isEncrypted', + title: $t('abp.OneNETLog.IsEncrypted'), + minWidth: '200', + }, + { + field: 'plaintextMessage', + title: $t('abp.OneNETLog.PlaintextMessage'), + minWidth: '200', + }, { field: 'rawMessage', title: $t('abp.OneNETLog.RawMessage'),