From 0a1bffe8f8bfa7f612a89a9460aae04c14fc9594 Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Mon, 28 Jul 2025 15:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api-client/schemas.gen.ts | 24 ++++----- apps/web-antd/src/api-client/types.gen.ts | 52 +++++++++++-------- .../web-antd/src/locales/langs/en-US/abp.json | 3 +- .../web-antd/src/locales/langs/zh-CN/abp.json | 3 +- .../devicemanagement/deviceinfo/index.vue | 2 +- .../iotdbdatamanagement/ctwingLog/README.md | 6 +-- .../iotdbdatamanagement/ctwingLog/index.vue | 8 +-- .../iotdbdatamanagement/ctwingLog/schema.ts | 21 ++++---- .../iotdbdatamanagement/deviceData/README.md | 10 ++-- .../deviceData/dynamicColumns.ts | 8 +-- .../iotdbdatamanagement/deviceData/index.vue | 23 +++----- .../iotdbdatamanagement/deviceData/schema.ts | 31 +++++------ .../iotdbdatamanagement/deviceData/types.ts | 2 +- .../iotdbdatamanagement/onenetLog/index.vue | 8 +-- .../iotdbdatamanagement/onenetLog/schema.ts | 18 +++---- .../telemetryLog/schema.ts | 2 +- 16 files changed, 111 insertions(+), 110 deletions(-) diff --git a/apps/web-antd/src/api-client/schemas.gen.ts b/apps/web-antd/src/api-client/schemas.gen.ts index b25670b..5403b56 100644 --- a/apps/web-antd/src/api-client/schemas.gen.ts +++ b/apps/web-antd/src/api-client/schemas.gen.ts @@ -1266,9 +1266,9 @@ export const DeviceTableModelDataInfoPageInputSchema = { `, nullable: true }, - systemName: { + dataBaseName: { type: 'string', - description: '系统名称', + description: '数据库名称', nullable: true }, ioTDataType: { @@ -1304,7 +1304,7 @@ export const DeviceTableModelDataInfoPageInputSchema = { export const DeviceTableModelDataInfoPageOutputSchema = { type: 'object', properties: { - systemName: { + dataBaseName: { type: 'string', description: '系统名称', nullable: true @@ -1390,9 +1390,9 @@ export const DeviceTreeModelDataInfoInputSchema = { `, nullable: true }, - systemName: { + dataBaseName: { type: 'string', - description: '系统名称', + description: '数据库名称', nullable: true }, ioTDataType: { @@ -3764,9 +3764,9 @@ export const MeterReadingPacketInfoPageInputSchema = { `, nullable: true }, - systemName: { + dataBaseName: { type: 'string', - description: '系统名称', + description: '数据库名称', nullable: true }, ioTDataType: { @@ -7033,9 +7033,9 @@ export const QueryCTWingAepReceiveMessageInputSchema = { `, nullable: true }, - systemName: { + dataBaseName: { type: 'string', - description: '系统名称', + description: '数据库名称', nullable: true }, ioTDataType: { @@ -7229,9 +7229,9 @@ export const QueryOneNETReceiveMessageInputSchema = { `, nullable: true }, - systemName: { + dataBaseName: { type: 'string', - description: '系统名称', + description: '数据库名称', nullable: true }, ioTDataType: { @@ -8383,4 +8383,4 @@ export const WindowsTimeZoneSchema = { } }, additionalProperties: false -} as const; \ No newline at end of file +} as const; diff --git a/apps/web-antd/src/api-client/types.gen.ts b/apps/web-antd/src/api-client/types.gen.ts index 4d42ba1..1fa7966 100644 --- a/apps/web-antd/src/api-client/types.gen.ts +++ b/apps/web-antd/src/api-client/types.gen.ts @@ -588,9 +588,9 @@ export type DeviceTableModelDataInfoPageInput = { */ sorting?: (string) | null; /** - * 系统名称 + * 数据库名称 */ - systemName?: (string) | null; + dataBaseName?: (string) | null; /** * 数据类型 */ @@ -617,7 +617,7 @@ export type DeviceTableModelDataInfoPageOutput = { /** * 系统名称 */ - systemName?: (string) | null; + dataBaseName?: (string) | null; /** * 数据类型 */ @@ -673,9 +673,9 @@ export type DeviceTreeModelDataInfoInput = { */ sorting?: (string) | null; /** - * 系统名称 + * 数据库名称 */ - systemName?: (string) | null; + dataBaseName?: (string) | null; /** * 数据类型 */ @@ -1662,9 +1662,9 @@ export type MeterReadingPacketInfoPageInput = { */ sorting?: (string) | null; /** - * 系统名称 + * 数据库名称 */ - systemName?: (string) | null; + dataBaseName?: (string) | null; /** * 数据类型 */ @@ -3534,9 +3534,9 @@ export type QueryCTWingAepReceiveMessageInput = { */ sorting?: (string) | null; /** - * 系统名称 + * 数据库名称 */ - systemName?: (string) | null; + dataBaseName?: (string) | null; /** * 数据类型 */ @@ -3677,9 +3677,9 @@ export type QueryOneNETReceiveMessageInput = { */ sorting?: (string) | null; /** - * 系统名称 + * 数据库名称 */ - systemName?: (string) | null; + dataBaseName?: (string) | null; /** * 数据类型 */ @@ -5084,23 +5084,27 @@ export type PostTableModelPacketInfoPageData = { export type PostTableModelPacketInfoPageResponse = (MeterReadingPacketInfoPageOutputPagedResultDto); -export type PostTableModelPacketInfoPageError = (RemoteServiceErrorResponse); +export type PostTableModelPacketInfoPageError = unknown; export type PostTableModelPacketInfoInsertData = { - body?: MeterReadingPacketInfoDto; + query?: { + input?: MeterReadingPacketInfoDto; + }; }; export type PostTableModelPacketInfoInsertResponse = (unknown); -export type PostTableModelPacketInfoInsertError = (RemoteServiceErrorResponse); +export type PostTableModelPacketInfoInsertError = unknown; export type PostTableModelPacketInfoBatchInsertData = { - body?: Array; + query?: { + input?: Array; + }; }; export type PostTableModelPacketInfoBatchInsertResponse = (unknown); -export type PostTableModelPacketInfoBatchInsertError = (RemoteServiceErrorResponse); +export type PostTableModelPacketInfoBatchInsertError = unknown; export type PostTableModelDeviceDataInfoPageData = { body?: DeviceTableModelDataInfoPageInput; @@ -5108,23 +5112,27 @@ export type PostTableModelDeviceDataInfoPageData = { export type PostTableModelDeviceDataInfoPageResponse = (DeviceTableModelDataInfoPageOutputPagedResultDto); -export type PostTableModelDeviceDataInfoPageError = (RemoteServiceErrorResponse); +export type PostTableModelDeviceDataInfoPageError = unknown; export type PostTableModelCtWingLogInfoData = { - body?: QueryCTWingAepReceiveMessageInput; + query?: { + input?: QueryCTWingAepReceiveMessageInput; + }; }; export type PostTableModelCtWingLogInfoResponse = (QueryCTWingAepReceiveMessageOutputPagedResultDto); -export type PostTableModelCtWingLogInfoError = (RemoteServiceErrorResponse); +export type PostTableModelCtWingLogInfoError = unknown; export type PostTableModelOneNetLogInfoData = { - body?: QueryOneNETReceiveMessageInput; + query?: { + input?: QueryOneNETReceiveMessageInput; + }; }; export type PostTableModelOneNetLogInfoResponse = (QueryOneNETReceiveMessageOutputPagedResultDto); -export type PostTableModelOneNetLogInfoError = (RemoteServiceErrorResponse); +export type PostTableModelOneNetLogInfoError = unknown; export type PostTenantsFindData = { body?: FindTenantByNameInput; @@ -5366,4 +5374,4 @@ export type PostUsersResetTwoFactorError = (RemoteServiceErrorResponse); export type PostUsersNeedChangePasswordResponse = (NeedChangePasswordOutput); -export type PostUsersNeedChangePasswordError = (RemoteServiceErrorResponse); \ No newline at end of file +export type PostUsersNeedChangePasswordError = (RemoteServiceErrorResponse); diff --git a/apps/web-antd/src/locales/langs/en-US/abp.json b/apps/web-antd/src/locales/langs/en-US/abp.json index 9957f62..f231b8f 100644 --- a/apps/web-antd/src/locales/langs/en-US/abp.json +++ b/apps/web-antd/src/locales/langs/en-US/abp.json @@ -77,7 +77,7 @@ "loginMode": "Login Method", "loginUrl": "Login URL", "detail": "Details", - "systemName": "System Name", + "dataBaseName": "Database Name", "projectId": "Project ID", "dataType": "Data Type", "deviceType": "Device Type", @@ -210,6 +210,7 @@ }, "IoTDBBase": { "IoTDataType": "IoTDataType", + "DataBaseName": "DataBaseName", "DeviceType": "DeviceType", "Timestamps": "Timestamps", "FormattedTimestamps": "Formatted Timestamps", 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 08d2966..745ffab 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/abp.json +++ b/apps/web-antd/src/locales/langs/zh-CN/abp.json @@ -77,7 +77,7 @@ "loginMode": "登录方式", "loginUrl": "登录地址", "detail": "详情", - "systemName": "系统名称", + "dataBaseName": "数据库名称", "projectId": "项目编码", "dataType": "数据类型", "deviceType": "设备类型", @@ -210,6 +210,7 @@ }, "IoTDBBase": { "IoTDataType": "数据类型", + "DataBaseName": "所属数据库", "DeviceType": "设备类型", "Timestamps": "时标(纳秒)", "FormattedTimestamps": "时标", diff --git a/apps/web-antd/src/views/devicemanagement/deviceinfo/index.vue b/apps/web-antd/src/views/devicemanagement/deviceinfo/index.vue index f9a6fed..aee9f5a 100644 --- a/apps/web-antd/src/views/devicemanagement/deviceinfo/index.vue +++ b/apps/web-antd/src/views/devicemanagement/deviceinfo/index.vue @@ -184,7 +184,7 @@ const toStatusData = (row: Record) => { DeviceType: row.meterType, DeviceId: row.meterId, FocusAddress: row.focusAddress, - SystemName: row.businessSystemName, + DataBaseName: row.businessSystemName, }, }); }; diff --git a/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/README.md b/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/README.md index 2f8b553..d281d19 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/README.md +++ b/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/README.md @@ -21,7 +21,7 @@ CTWing日志管理页面用于查看和管理CTWing物联网平台的设备数 DeviceType?: string, // 设备类型 DeviceId?: string, // 设备ID FocusAddress?: string, // 集中器地址 - SystemName?: string, // 系统名称 + DataBaseName?: string, // 数据库名称 ProjectId?: string // 项目ID } ``` @@ -32,7 +32,7 @@ CTWing日志管理页面用于查看和管理CTWing物联网平台的设备数 { items: [ { - systemName: string, // 系统名称 + dataBaseName: string, // 数据库名称 projectId: string, // 项目ID dataType: string, // 数据类型 deviceType: string, // 设备类型 @@ -74,7 +74,7 @@ CTWing日志管理页面用于查看和管理CTWing物联网平台的设备数 | 字段名 | 显示名称 | 说明 | | ---------------- | ---------- | ------------------ | -| systemName | 系统名称 | 所属系统 | +| dataBaseName | 数据库名称 | 所属数据库 | | projectId | 项目编码 | 项目标识 | | dataType | 数据类型 | 数据类型 | | deviceType | 设备类型 | 设备类型 | diff --git a/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/index.vue b/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/index.vue index e3ffaab..e4ddbfc 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/index.vue +++ b/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/index.vue @@ -140,7 +140,7 @@ const formOptions: VbenFormProps = { 'EndCreationTime', 'IoTDataType', 'StartCreationTime', - 'SystemName', + 'DataBaseName', ]); const hasRelevantChange = changedFields.some((field) => relevantFields.has(field), @@ -184,7 +184,7 @@ const gridOptions: VxeGridProps = { // 获取选中的设备信息 let deviceId = currentFormValues.DeviceId || ''; - let systemName = ''; + let dataBaseName = ''; const deviceType = currentFormValues.DeviceType || ''; // 优先使用选中的设备信息 @@ -195,7 +195,7 @@ const gridOptions: VxeGridProps = { : null); if (deviceInfo) { - systemName = deviceInfo.businessSystemName || ''; + dataBaseName = deviceInfo.businessSystemName || ''; // 根据设备类型获取正确的 id if (Number(deviceType) === 10) { // 集中器类型使用 focusId @@ -213,7 +213,7 @@ const gridOptions: VxeGridProps = { DeviceType: deviceType, IoTDataType: currentFormValues.IoTDataType || '', DeviceId: deviceId, - SystemName: systemName || currentFormValues.SystemName || '', + DataBaseName: dataBaseName || currentFormValues.DataBaseName || '', StartCreationTime: formatDate(currentFormValues.StartCreationTime), EndCreationTime: formatDate(currentFormValues.EndCreationTime), FocusAddress: currentFormValues.FocusAddress || '', diff --git a/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/schema.ts b/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/schema.ts index b5efea8..d5b4612 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/schema.ts +++ b/apps/web-antd/src/views/iotdbdatamanagement/ctwingLog/schema.ts @@ -4,19 +4,20 @@ import { computed } from 'vue'; import dayjs from 'dayjs'; -import { getSelectResultList } from '#/api-client'; +import { getCommonGetSelectList } from '#/api-client'; import { $t } from '#/locales'; export const querySchema = computed(() => [ { component: 'ApiSelect', - fieldName: 'SystemName', - label: $t('abp.IoTDBBase.SystemName'), + fieldName: 'DataBaseName', + label: $t('abp.IoTDBBase.DataBaseName'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'BusinessSystemEnum', + typeName: 'BusinessSystemEnum' + }, }, labelField: 'secondValue', @@ -46,10 +47,10 @@ export const querySchema = computed(() => [ fieldName: 'DeviceType', label: $t('abp.IoTDBBase.DeviceType'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'MeterTypeEnum', + typeName: 'MeterTypeEnum' }, }, labelField: 'value', @@ -79,10 +80,12 @@ export const querySchema = computed(() => [ fieldName: 'IoTDataType', label: $t('abp.IoTDBBase.IoTDataType'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'IoTDBDataTypeConst', + input: { + typeName: 'IoTDBDataTypeConst', + }, }, }, labelField: 'value', diff --git a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/README.md b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/README.md index 74bf825..303c1b0 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/README.md +++ b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/README.md @@ -63,7 +63,7 @@ if (data?.items && data.items.length > 0) { ```typescript // 在 dynamicColumns.ts 中添加字段映射 export const fieldNameMapping: FieldMapping = { - SystemName: '系统名称', + DataBaseName: '数据库名称', ProjectId: '项目ID', // 添加新的字段映射 CustomField: '自定义字段', @@ -96,7 +96,7 @@ export const fieldTypeConfig: FieldTypeConfig = { | 字段名 | 显示名称 | 说明 | |--------|----------|------| -| SystemName | 系统名称 | 系统名称字段 | +| DataBaseName | 数据库名称 | 数据库名称字段 | | ProjectId | 项目ID | 项目标识符 | | ProjectName | 项目名称 | 项目名称 | | IoTDataType | IoT数据类型 | 数据类型标识 | @@ -124,7 +124,7 @@ export const fieldTypeConfig: FieldTypeConfig = { // 固定列定义 const fixedColumns = computed(() => [ { title: '序号', type: 'seq', width: 50 }, - { field: 'SystemName', title: '系统名称', width: 150 }, + { field: 'DataBaseName', title: '数据库名称', width: 150 }, ]); // 动态列 @@ -142,9 +142,9 @@ const allColumns = computed(() => [ ```typescript import { sortFieldsByImportance } from './example'; -const fields = ['CustomField', 'Timestamps', 'SystemName']; +const fields = ['CustomField', 'Timestamps', 'DataBaseName']; const sortedFields = sortFieldsByImportance(fields); -// 结果: ['Timestamps', 'SystemName', 'CustomField'] +// 结果: ['Timestamps', 'DataBaseName', 'CustomField'] ``` ### 3. 数据验证 diff --git a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/dynamicColumns.ts b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/dynamicColumns.ts index 5db7c8d..e5e2327 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/dynamicColumns.ts +++ b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/dynamicColumns.ts @@ -7,12 +7,12 @@ import type { // 字段名映射配置 export const fieldNameMapping: FieldMapping = { - // SystemName: '系统名称', + // DataBaseName: '数据库名称', // ProjectId: '项目ID', // ProjectName: '项目名称', IoTDataType: 'IoT数据类型', DeviceType: '设备类型', - DeviceId: '设备ID', + DeviceAddress: '设备ID', Timestamps: '时间戳', // 可以根据需要添加更多映射 }; @@ -34,10 +34,10 @@ export const fieldTypeConfig: FieldTypeConfig = { // 固定字段列表 - 这些字段已经在固定列中定义,不需要在动态列中重复生成 const FIXED_FIELDS = [ - // 'SystemName', + // 'DataBaseName', 'DeviceType', 'IoTDataType', - 'DeviceId', + 'DeviceAddress', 'Timestamps', 'FormattedTimestamps', 'DeviceAddress', diff --git a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/index.vue b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/index.vue index 7315458..e0e8e55 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/index.vue +++ b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/index.vue @@ -68,7 +68,7 @@ const formatDate = (date: Date | string) => { }; const route = useRoute(); -const { DeviceType, DeviceId, FocusAddress, SystemName } = route.query; +const { DeviceType, DeviceId, FocusAddress, DataBaseName } = route.query; // 动态列定义 const dynamicColumns = ref([]); @@ -91,8 +91,8 @@ const fixedColumns = [ slots: {}, }, { - field: 'SystemName', - title: $t('abp.IoTDBBase.SystemName'), + field: 'DataBaseName', + title: $t('abp.IoTDBBase.DataBaseName'), minWidth: 150, showOverflow: true, slots: {}, @@ -111,13 +111,6 @@ const fixedColumns = [ showOverflow: true, slots: {}, }, - { - field: 'DeviceId', - title: $t('abp.IoTDBBase.DeviceId'), - minWidth: 150, - showOverflow: true, - slots: {}, - }, { field: 'DeviceAddress', title: $t('abp.IoTDBBase.DeviceAddress'), @@ -170,7 +163,7 @@ const formOptions: VbenFormProps = { FocusAddress: FocusAddress as string, DeviceType: DeviceType ? Number(DeviceType) : undefined, DeviceId: DeviceId as string, - SystemName: SystemName as string, + DataBaseName: DataBaseName as string, }, // 禁用表单值变化时自动提交,使用自定义处理函数 submitOnChange: false, @@ -184,7 +177,7 @@ const formOptions: VbenFormProps = { 'FocusAddress', 'IoTDataType', 'StartCreationTime', - 'SystemName', + 'DataBaseName', ]); const hasRelevantChange = changedFields.some((field) => relevantFields.has(field), @@ -336,7 +329,7 @@ const gridOptions: VxeGridProps = { DeviceId: finalDeviceId ? finalDeviceId.toString() : '', FocusAddress: finalFocusAddress || FocusAddress || '', // 添加其他表单参数 - SystemName: currentFormValues.SystemName || SystemName, + DataBaseName: currentFormValues.DataBaseName || DataBaseName, IoTDataType: ioTDataTypeValue || undefined, // 添加日期范围参数 StartCreationTime: startCreationTime || undefined, @@ -443,7 +436,7 @@ const initializeGrid = async () => { } // 如果有路由参数,自动触发查询 - if (DeviceType || DeviceId || FocusAddress || SystemName) { + if (DeviceType || DeviceId || FocusAddress || DataBaseName) { // 延迟一下确保表格已完全初始化 setTimeout(() => { if (gridApi) { @@ -458,7 +451,7 @@ const initializeGrid = async () => { // 监听路由参数变化,当有路由参数时自动触发查询 watch( - () => [DeviceType, DeviceId, FocusAddress, SystemName], + () => [DeviceType, DeviceId, FocusAddress, DataBaseName], async (newValues, oldValues) => { // 如果有路由参数,等待设备信息加载完成后自动触发查询 if (newValues.some(Boolean) && gridApi && isGridInitialized.value) { diff --git a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/schema.ts b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/schema.ts index 1daf1c7..744162c 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/schema.ts +++ b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/schema.ts @@ -2,19 +2,19 @@ import type { VxeGridProps } from '#/adapter/vxe-table'; import { computed } from 'vue'; -import { getSelectResultList } from '#/api-client'; +import { getCommonGetSelectList } from '#/api-client'; import { $t } from '#/locales'; export const querySchema = computed(() => [ { component: 'ApiSelect', - fieldName: 'SystemName', - label: $t('abp.IoTDBBase.SystemName'), + fieldName: 'DataBaseName', + label: $t('abp.IoTDBBase.DataBaseName'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'BusinessSystemEnum', + typeName: 'BusinessSystemEnum', }, }, labelField: 'secondValue', @@ -44,10 +44,10 @@ export const querySchema = computed(() => [ fieldName: 'DeviceType', label: $t('abp.IoTDBBase.DeviceType'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'MeterTypeEnum', + typeName: 'MeterTypeEnum' }, }, labelField: 'value', @@ -77,10 +77,10 @@ export const querySchema = computed(() => [ fieldName: 'IoTDataType', label: $t('abp.IoTDBBase.IoTDataType'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'IoTDBDataTypeConst', + typeName: 'IoTDBDataTypeConst' }, }, labelField: 'value', @@ -147,13 +147,8 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [ minWidth: '150', }, { - field: 'SystemName', - title: $t('abp.IoTDBBase.SystemName'), - minWidth: '150', - }, - { - field: 'ProjectId', - title: $t('abp.IoTDBBase.ProjectId'), + field: 'DataBaseName', + title: $t('abp.IoTDBBase.DataBaseName'), minWidth: '150', }, { @@ -167,8 +162,8 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [ minWidth: '150', }, { - field: 'DeviceId', - title: $t('abp.IoTDBBase.DeviceId'), + field: 'DeviceAddress', + title: $t('abp.IoTDBBase.DeviceAddress'), minWidth: '150', }, ]); diff --git a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/types.ts b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/types.ts index 193d77b..92a9e1a 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/deviceData/types.ts +++ b/apps/web-antd/src/views/iotdbdatamanagement/deviceData/types.ts @@ -1,6 +1,6 @@ // 基础设备数据类型 export interface BaseDeviceData { - SystemName?: string; + DataBaseName?: string; ProjectId?: string; ProjectName?: string; IoTDataType?: string; diff --git a/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/index.vue b/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/index.vue index 053075c..deb24ef 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/index.vue +++ b/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/index.vue @@ -139,7 +139,7 @@ const formOptions: VbenFormProps = { 'EndCreationTime', 'IoTDataType', 'StartCreationTime', - 'SystemName', + 'DataBaseName', ]); const hasRelevantChange = changedFields.some((field) => relevantFields.has(field), @@ -182,7 +182,7 @@ const gridOptions: VxeGridProps = { // 获取选中的设备信息 let deviceId = currentFormValues.DeviceId || ''; - let systemName = ''; + let dataBaseName = ''; const deviceType = currentFormValues.DeviceType || ''; // 优先使用选中的设备信息 @@ -193,7 +193,7 @@ const gridOptions: VxeGridProps = { : null); if (deviceInfo) { - systemName = deviceInfo.businessSystemName || ''; + dataBaseName = deviceInfo.businessSystemName || ''; // 根据设备类型获取正确的 id if (Number(deviceType) === 10) { // 集中器类型使用 focusId @@ -212,7 +212,7 @@ const gridOptions: VxeGridProps = { DeviceType: deviceType, IoTDataType: currentFormValues.IoTDataType || '', DeviceId: deviceId, - SystemName: systemName || currentFormValues.SystemName || '', + DataBaseName: dataBaseName || currentFormValues.DataBaseName || '', StartCreationTime: formatDate(currentFormValues.StartCreationTime), EndCreationTime: formatDate(currentFormValues.EndCreationTime), }; diff --git a/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/schema.ts b/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/schema.ts index 606d52a..80030f8 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/schema.ts +++ b/apps/web-antd/src/views/iotdbdatamanagement/onenetLog/schema.ts @@ -4,19 +4,19 @@ import { computed } from 'vue'; import dayjs from 'dayjs'; -import { getSelectResultList } from '#/api-client'; +import { getCommonGetSelectList } from '#/api-client'; import { $t } from '#/locales'; export const querySchema = computed(() => [ { component: 'ApiSelect', - fieldName: 'SystemName', - label: $t('abp.IoTDBBase.SystemName'), + fieldName: 'DataBaseName', + label: $t('abp.IoTDBBase.DataBaseName'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'BusinessSystemEnum', + typeName: 'BusinessSystemEnum', }, }, labelField: 'secondValue', @@ -46,10 +46,10 @@ export const querySchema = computed(() => [ fieldName: 'DeviceType', label: $t('abp.IoTDBBase.DeviceType'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'MeterTypeEnum', + typeName: 'MeterTypeEnum', }, }, labelField: 'value', @@ -79,10 +79,10 @@ export const querySchema = computed(() => [ fieldName: 'IoTDataType', label: $t('abp.IoTDBBase.IoTDataType'), componentProps: { - api: getSelectResultList, + api: getCommonGetSelectList, params: { query: { - TypeName: 'IoTDBDataTypeConst', + typeName: 'IoTDBDataTypeConst', }, }, labelField: 'value', diff --git a/apps/web-antd/src/views/iotdbdatamanagement/telemetryLog/schema.ts b/apps/web-antd/src/views/iotdbdatamanagement/telemetryLog/schema.ts index 4a7e1a4..fd24237 100644 --- a/apps/web-antd/src/views/iotdbdatamanagement/telemetryLog/schema.ts +++ b/apps/web-antd/src/views/iotdbdatamanagement/telemetryLog/schema.ts @@ -19,7 +19,7 @@ export const querySchema = computed(() => [ 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: 'dataBaseName', title: $t('abp.log.dataBaseName'), minWidth: '150' }, { field: 'projectId', title: $t('abp.log.projectId'),