diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index 1de9782..de22655 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -112,6 +112,7 @@ export type ComponentType = | 'DatePicker' | 'DefaultButton' | 'DeviceSelect' + | 'StandardThingModelCodeSelect' | 'Divider' | 'IconPicker' | 'Input' @@ -171,8 +172,11 @@ async function initComponentAdapter() { DatePicker, // 自定义设备选择组件 DeviceSelect: defineAsyncComponent( - () => - import('../../views/iotdbdatamanagement/deviceData/DeviceSelect.vue'), + () => import('#/views/iotdbdatamanagement/deviceData/DeviceSelect.vue') as any, + ), + // 自定义标准物模型编码选择组件(分页搜索) + StandardThingModelCodeSelect: defineAsyncComponent( + () => import('#/views/devicemanagement/thingmodelinfo/StandardThingModelCodeSelect.vue') as any, ), // 自定义默认按钮 DefaultButton: (props, { attrs, slots }) => { diff --git a/apps/web-antd/src/api-client/schemas.gen.ts b/apps/web-antd/src/api-client/schemas.gen.ts index 272c843..2166b0c 100644 --- a/apps/web-antd/src/api-client/schemas.gen.ts +++ b/apps/web-antd/src/api-client/schemas.gen.ts @@ -8399,6 +8399,49 @@ export const ReturnValueApiDescriptionModelSchema = { additionalProperties: false } as const; +export const SelectDataDictionaryDetailInputSchema = { + type: 'object', + properties: { + pageIndex: { + type: 'integer', + description: '当前页面.默认从1开始', + format: 'int32' + }, + pageSize: { + type: 'integer', + description: '每页多少条.每页显示多少记录', + format: 'int32' + }, + skipCount: { + type: 'integer', + description: '跳过多少条', + format: 'int32', + readOnly: true + }, + sorting: { + type: 'string', + description: `排序 + + name desc +`, + nullable: true + }, + dataDictionaryId: { + type: 'string', + format: 'uuid' + }, + filter: { + type: 'string', + nullable: true + }, + typeCode: { + type: 'string', + nullable: true + } + }, + additionalProperties: false +} as const; + export const SelectResultSchema = { type: 'object', properties: { diff --git a/apps/web-antd/src/api-client/services.gen.ts b/apps/web-antd/src/api-client/services.gen.ts index b9f3987..b54c514 100644 --- a/apps/web-antd/src/api-client/services.gen.ts +++ b/apps/web-antd/src/api-client/services.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts import { createClient, createConfig, type Options, formDataBodySerializer } from '@hey-api/client-axios'; -import type { GetApiAbpApiDefinitionData, GetApiAbpApiDefinitionError, GetApiAbpApiDefinitionResponse, GetApiAbpApplicationConfigurationData, GetApiAbpApplicationConfigurationError, GetApiAbpApplicationConfigurationResponse, GetApiAbpApplicationLocalizationData, GetApiAbpApplicationLocalizationError, GetApiAbpApplicationLocalizationResponse, PostApiAppAccountLoginData, PostApiAppAccountLoginError, PostApiAppAccountLoginResponse, PostApiAppAccountLogin2FaData, PostApiAppAccountLogin2FaError, PostApiAppAccountLogin2FaResponse, PostApiAppAccountLoginOidcData, PostApiAppAccountLoginOidcError, PostApiAppAccountLoginOidcResponse, PostApiAppAccountRefreshTokenData, PostApiAppAccountRefreshTokenError, PostApiAppAccountRefreshTokenResponse, PostApiAppAccountLogoutError, PostApiAppAccountLogoutResponse, PostAuditLogsPageData, PostAuditLogsPageError, PostAuditLogsPageResponse, PostAggregationBusinessReceiveCommandInfoAsyncData, PostAggregationBusinessReceiveCommandInfoAsyncError, PostAggregationBusinessReceiveCommandInfoAsyncResponse, PostAggregationBusinessBatchQueryDeviceDataInfoAsyncData, PostAggregationBusinessBatchQueryDeviceDataInfoAsyncError, PostAggregationBusinessBatchQueryDeviceDataInfoAsyncResponse, PostAggregationBusinessBatchCreateDeviceInfoAsyncData, PostAggregationBusinessBatchCreateDeviceInfoAsyncError, PostAggregationBusinessBatchCreateDeviceInfoAsyncResponse, GetCommonGetSelectListData, GetCommonGetSelectListError, GetCommonGetSelectListResponse, PostCtWingAccountInsertAsyncData, PostCtWingAccountInsertAsyncError, PostCtWingAccountInsertAsyncResponse, PostCtWingAccountModifyAsyncData, PostCtWingAccountModifyAsyncError, PostCtWingAccountModifyAsyncResponse, PostCtWingAccountDeleteAsyncData, PostCtWingAccountDeleteAsyncError, PostCtWingAccountDeleteAsyncResponse, PostCtWingAccountListAsyncData, PostCtWingAccountListAsyncError, PostCtWingAccountListAsyncResponse, PostCtWingProductInsertAsyncData, PostCtWingProductInsertAsyncError, PostCtWingProductInsertAsyncResponse, PostCtWingProductModifyAsyncData, PostCtWingProductModifyAsyncError, PostCtWingProductModifyAsyncResponse, PostCtWingProductDeleteAsyncData, PostCtWingProductDeleteAsyncError, PostCtWingProductDeleteAsyncResponse, PostCtWingProductGetAsyncData, PostCtWingProductGetAsyncError, PostCtWingProductGetAsyncResponse, PostCtWingProductProductStatusChangeAsyncData, PostCtWingProductProductStatusChangeAsyncError, PostCtWingProductProductStatusChangeAsyncResponse, PostCtWingProductListAsyncData, PostCtWingProductListAsyncError, PostCtWingProductListAsyncResponse, PostCtWingServiceReceiveStatusChangeError, PostCtWingServiceReceiveStatusChangeResponse, PostCtWingServiceReceiveDataChangeError, PostCtWingServiceReceiveDataChangeResponse, PostCtWingServiceReceiveCommandChangeError, PostCtWingServiceReceiveCommandChangeResponse, PostCtWingServiceReceiveEventChangeError, PostCtWingServiceReceiveEventChangeResponse, PostCtWingServiceReceiveDeviceChangeError, PostCtWingServiceReceiveDeviceChangeResponse, PostDataDictionaryPageData, PostDataDictionaryPageError, PostDataDictionaryPageResponse, PostDataDictionaryPageDetailData, PostDataDictionaryPageDetailError, PostDataDictionaryPageDetailResponse, PostDataDictionaryCreateData, PostDataDictionaryCreateError, PostDataDictionaryCreateResponse, PostDataDictionaryCreateDetailData, PostDataDictionaryCreateDetailError, PostDataDictionaryCreateDetailResponse, PostDataDictionaryStatusData, PostDataDictionaryStatusError, PostDataDictionaryStatusResponse, PostDataDictionaryUpdateDetailData, PostDataDictionaryUpdateDetailError, PostDataDictionaryUpdateDetailResponse, PostDataDictionaryDeleteData, PostDataDictionaryDeleteError, PostDataDictionaryDeleteResponse, PostDataDictionaryDeleteDataDictionaryTypeData, PostDataDictionaryDeleteDataDictionaryTypeError, PostDataDictionaryDeleteDataDictionaryTypeResponse, PostDataDictionaryUpdateData, PostDataDictionaryUpdateError, PostDataDictionaryUpdateResponse, PostAggregationDeviceCreateAsyncData, PostAggregationDeviceCreateAsyncError, PostAggregationDeviceCreateAsyncResponse, PostAggregationDeviceBatchCreateAsyncData, PostAggregationDeviceBatchCreateAsyncError, PostAggregationDeviceBatchCreateAsyncResponse, PostAggregationDeviceDeleteAsyncData, PostAggregationDeviceDeleteAsyncError, PostAggregationDeviceDeleteAsyncResponse, PostAggregationDeviceFindByIdAsyncData, PostAggregationDeviceFindByIdAsyncError, PostAggregationDeviceFindByIdAsyncResponse, PostAggregationDeviceRepushDeviceInfoToIoTplatformData, PostAggregationDeviceRepushDeviceInfoToIoTplatformError, PostAggregationDeviceRepushDeviceInfoToIoTplatformResponse, PostAggregationDeviceDeviceCommandForApiAsyncData, PostAggregationDeviceDeviceCommandForApiAsyncError, PostAggregationDeviceDeviceCommandForApiAsyncResponse, PostDeviceInfoFindByDeviceAddressData, PostDeviceInfoFindByDeviceAddressError, PostDeviceInfoFindByDeviceAddressResponse, PostDeviceInfoPageData, PostDeviceInfoPageError, PostDeviceInfoPageResponse, PostDeviceInfoCacheDeviceDataToRedisError, PostDeviceInfoCacheDeviceDataToRedisResponse, PostThingModelInfoCreateAsyncData, PostThingModelInfoCreateAsyncError, PostThingModelInfoCreateAsyncResponse, PostThingModelInfoUpdateAsyncData, PostThingModelInfoUpdateAsyncError, PostThingModelInfoUpdateAsyncResponse, PostThingModelInfoDeleteAsyncData, PostThingModelInfoDeleteAsyncError, PostThingModelInfoDeleteAsyncResponse, PostThingModelInfoFindByIdAsyncData, PostThingModelInfoFindByIdAsyncError, PostThingModelInfoFindByIdAsyncResponse, PostThingModelInfoFindByPlatformProductIdAsyncData, PostThingModelInfoFindByPlatformProductIdAsyncError, PostThingModelInfoFindByPlatformProductIdAsyncResponse, PostThingModelInfoCopyAnotherThingModelAsyncData, PostThingModelInfoCopyAnotherThingModelAsyncError, PostThingModelInfoCopyAnotherThingModelAsyncResponse, PostThingModelInfoCopyStandardThingModelData, PostThingModelInfoCopyStandardThingModelError, PostThingModelInfoCopyStandardThingModelResponse, PostThingModelInfoPageAsyncData, PostThingModelInfoPageAsyncError, PostThingModelInfoPageAsyncResponse, PostThingModelInfoStandardThingModelPageAsyncError, PostThingModelInfoStandardThingModelPageAsyncResponse, PostFeaturesListData, PostFeaturesListError, PostFeaturesListResponse, PostFeaturesUpdateData, PostFeaturesUpdateError, PostFeaturesUpdateResponse, PostFeaturesDeleteData, PostFeaturesDeleteError, PostFeaturesDeleteResponse, PostFilesPageData, PostFilesPageError, PostFilesPageResponse, PostFilesUploadData, PostFilesUploadError, PostFilesUploadResponse, PostFilesDeleteData, PostFilesDeleteError, PostFilesDeleteResponse, PostFilesDownloadData, PostFilesDownloadError, PostFilesDownloadResponse, PostIdentitySecurityLogsPageData, PostIdentitySecurityLogsPageError, PostIdentitySecurityLogsPageResponse, PostLanguagesAllError, PostLanguagesAllResponse, PostLanguagesPageData, PostLanguagesPageError, PostLanguagesPageResponse, PostLanguagesCreateData, PostLanguagesCreateError, PostLanguagesCreateResponse, PostLanguagesUpdateData, PostLanguagesUpdateError, PostLanguagesUpdateResponse, PostLanguagesDeleteData, PostLanguagesDeleteError, PostLanguagesDeleteResponse, PostLanguagesSetDefaultData, PostLanguagesSetDefaultError, PostLanguagesSetDefaultResponse, PostLanguageTextsAllResourceError, PostLanguageTextsAllResourceResponse, PostLanguageTextsPageData, PostLanguageTextsPageError, PostLanguageTextsPageResponse, PostLanguageTextsCreateData, PostLanguageTextsCreateError, PostLanguageTextsCreateResponse, PostLanguageTextsUpdateData, PostLanguageTextsUpdateError, PostLanguageTextsUpdateResponse, PostMenusUserMenuError, PostMenusUserMenuResponse, PostMenusPageData, PostMenusPageError, PostMenusPageResponse, PostMenusCreateData, PostMenusCreateError, PostMenusCreateResponse, PostMenusUpdateData, PostMenusUpdateError, PostMenusUpdateResponse, PostMenusDeleteData, PostMenusDeleteError, PostMenusDeleteResponse, PostMenusTreeError, PostMenusTreeResponse, PostNotificationNotificationPageData, PostNotificationNotificationPageError, PostNotificationNotificationPageResponse, PostNotificationNotificationSubscriptionPageData, PostNotificationNotificationSubscriptionPageError, PostNotificationNotificationSubscriptionPageResponse, PostNotificationDeleteData, PostNotificationDeleteError, PostNotificationDeleteResponse, PostNotificationSendCommonWarningMessageData, PostNotificationSendCommonWarningMessageError, PostNotificationSendCommonWarningMessageResponse, PostNotificationSendCommonInformationMessageData, PostNotificationSendCommonInformationMessageError, PostNotificationSendCommonInformationMessageResponse, PostNotificationSendCommonErrorMessageData, PostNotificationSendCommonErrorMessageError, PostNotificationSendCommonErrorMessageResponse, PostNotificationSendBroadCastWarningMessageData, PostNotificationSendBroadCastWarningMessageError, PostNotificationSendBroadCastWarningMessageResponse, PostNotificationSendBroadCastInformationMessageData, PostNotificationSendBroadCastInformationMessageError, PostNotificationSendBroadCastInformationMessageResponse, PostNotificationSendBroadCastErrorMessageData, PostNotificationSendBroadCastErrorMessageError, PostNotificationSendBroadCastErrorMessageResponse, PostNotificationReadData, PostNotificationReadError, PostNotificationReadResponse, PostNotificationBatchReadData, PostNotificationBatchReadError, PostNotificationBatchReadResponse, PostOneNetAccountInsertAsyncData, PostOneNetAccountInsertAsyncError, PostOneNetAccountInsertAsyncResponse, PostOneNetAccountModifyAsyncData, PostOneNetAccountModifyAsyncError, PostOneNetAccountModifyAsyncResponse, PostOneNetAccountDeleteAsyncData, PostOneNetAccountDeleteAsyncError, PostOneNetAccountDeleteAsyncResponse, PostOneNetAccountListAsyncData, PostOneNetAccountListAsyncError, PostOneNetAccountListAsyncResponse, PostOneNetProductInsertAsyncData, PostOneNetProductInsertAsyncError, PostOneNetProductInsertAsyncResponse, PostOneNetProductModifyAsyncData, PostOneNetProductModifyAsyncError, PostOneNetProductModifyAsyncResponse, PostOneNetProductDeleteAsyncData, PostOneNetProductDeleteAsyncError, PostOneNetProductDeleteAsyncResponse, PostOneNetProductGetAsyncData, PostOneNetProductGetAsyncError, PostOneNetProductGetAsyncResponse, PostOneNetProductProductStatusChangeAsyncData, PostOneNetProductProductStatusChangeAsyncError, PostOneNetProductProductStatusChangeAsyncResponse, PostOneNetProductListAsyncData, PostOneNetProductListAsyncError, PostOneNetProductListAsyncResponse, PostOneNetServiceReceivePlaintextDataChangeData, PostOneNetServiceReceivePlaintextDataChangeError, PostOneNetServiceReceivePlaintextDataChangeResponse, GetOneNetServiceReceivePlaintextDataChangeData, GetOneNetServiceReceivePlaintextDataChangeError, GetOneNetServiceReceivePlaintextDataChangeResponse, PostOneNetServiceReceiveCiphertextDataChangeData, PostOneNetServiceReceiveCiphertextDataChangeError, PostOneNetServiceReceiveCiphertextDataChangeResponse, GetOneNetServiceReceiveCiphertextDataChangeData, GetOneNetServiceReceiveCiphertextDataChangeError, GetOneNetServiceReceiveCiphertextDataChangeResponse, PostOrganizationUnitsTreeError, PostOrganizationUnitsTreeResponse, PostOrganizationUnitsCreateData, PostOrganizationUnitsCreateError, PostOrganizationUnitsCreateResponse, PostOrganizationUnitsDeleteData, PostOrganizationUnitsDeleteError, PostOrganizationUnitsDeleteResponse, PostOrganizationUnitsUpdateData, PostOrganizationUnitsUpdateError, PostOrganizationUnitsUpdateResponse, PostOrganizationUnitsAddRoleToOrganizationUnitAsyncData, PostOrganizationUnitsAddRoleToOrganizationUnitAsyncError, PostOrganizationUnitsAddRoleToOrganizationUnitAsyncResponse, PostOrganizationUnitsRemoveRoleFromOrganizationUnitAsyncData, PostOrganizationUnitsRemoveRoleFromOrganizationUnitAsyncError, PostOrganizationUnitsRemoveRoleFromOrganizationUnitAsyncResponse, PostOrganizationUnitsAddUserToOrganizationUnitData, PostOrganizationUnitsAddUserToOrganizationUnitError, PostOrganizationUnitsAddUserToOrganizationUnitResponse, PostOrganizationUnitsRemoveUserFromOrganizationUnitData, PostOrganizationUnitsRemoveUserFromOrganizationUnitError, PostOrganizationUnitsRemoveUserFromOrganizationUnitResponse, PostOrganizationUnitsGetUsersData, PostOrganizationUnitsGetUsersError, PostOrganizationUnitsGetUsersResponse, PostOrganizationUnitsGetRolesData, PostOrganizationUnitsGetRolesError, PostOrganizationUnitsGetRolesResponse, PostOrganizationUnitsGetUnAddUsersData, PostOrganizationUnitsGetUnAddUsersError, PostOrganizationUnitsGetUnAddUsersResponse, PostOrganizationUnitsGetUnAddRolesData, PostOrganizationUnitsGetUnAddRolesError, PostOrganizationUnitsGetUnAddRolesResponse, PostPermissionsTreeData, PostPermissionsTreeError, PostPermissionsTreeResponse, PostPermissionsUpdateData, PostPermissionsUpdateError, PostPermissionsUpdateResponse, PostRolesAllError, PostRolesAllResponse, PostRolesPageData, PostRolesPageError, PostRolesPageResponse, PostRolesCreateData, PostRolesCreateError, PostRolesCreateResponse, PostRolesUpdateData, PostRolesUpdateError, PostRolesUpdateResponse, PostRolesDeleteData, PostRolesDeleteError, PostRolesDeleteResponse, GetApiAppAbpProBasicApplicationConfigurationError, GetApiAppAbpProBasicApplicationConfigurationResponse, PostSettingsAllError, PostSettingsAllResponse, PostSettingsUpdateData, PostSettingsUpdateError, PostSettingsUpdateResponse, PostTableModelPacketInfoPageData, PostTableModelPacketInfoPageError, PostTableModelPacketInfoPageResponse, PostTableModelDeviceDataInfoPageData, PostTableModelDeviceDataInfoPageError, PostTableModelDeviceDataInfoPageResponse, PostTableModelCtWingLogInfoData, PostTableModelCtWingLogInfoError, PostTableModelCtWingLogInfoResponse, PostTableModelOneNetLogInfoData, PostTableModelOneNetLogInfoError, PostTableModelOneNetLogInfoResponse, PostTenantsFindData, PostTenantsFindError, PostTenantsFindResponse, PostTenantsPageData, PostTenantsPageError, PostTenantsPageResponse, PostTenantsCreateData, PostTenantsCreateError, PostTenantsCreateResponse, PostTenantsUpdateData, PostTenantsUpdateError, PostTenantsUpdateResponse, PostTenantsDeleteData, PostTenantsDeleteError, PostTenantsDeleteResponse, PostTenantsPageConnectionStringData, PostTenantsPageConnectionStringError, PostTenantsPageConnectionStringResponse, PostTenantsAddOrUpdateConnectionStringData, PostTenantsAddOrUpdateConnectionStringError, PostTenantsAddOrUpdateConnectionStringResponse, PostTenantsDeleteConnectionStringData, PostTenantsDeleteConnectionStringError, PostTenantsDeleteConnectionStringResponse, PostTextTemplatesPageData, PostTextTemplatesPageError, PostTextTemplatesPageResponse, PostTextTemplatesCreateData, PostTextTemplatesCreateError, PostTextTemplatesCreateResponse, PostTextTemplatesUpdateData, PostTextTemplatesUpdateError, PostTextTemplatesUpdateResponse, PostTextTemplatesDeleteData, PostTextTemplatesDeleteError, PostTextTemplatesDeleteResponse, PostTextTemplatesExportData, PostTextTemplatesExportError, PostTextTemplatesExportResponse, PostTreeModelDeviceDataInfoPageData, PostTreeModelDeviceDataInfoPageError, PostTreeModelDeviceDataInfoPageResponse, PostUsersPageData, PostUsersPageError, PostUsersPageResponse, PostUsersListData, PostUsersListError, PostUsersListResponse, PostUsersExportData, PostUsersExportError, PostUsersExportResponse, PostUsersCreateData, PostUsersCreateError, PostUsersCreateResponse, PostUsersUpdateData, PostUsersUpdateError, PostUsersUpdateResponse, PostUsersDeleteData, PostUsersDeleteError, PostUsersDeleteResponse, PostUsersRoleData, PostUsersRoleError, PostUsersRoleResponse, PostUsersChangePasswordData, PostUsersChangePasswordError, PostUsersChangePasswordResponse, PostUsersResetPasswordData, PostUsersResetPasswordError, PostUsersResetPasswordResponse, PostUsersLockData, PostUsersLockError, PostUsersLockResponse, PostUsersFindByUserNameData, PostUsersFindByUserNameError, PostUsersFindByUserNameResponse, PostUsersMyProfileError, PostUsersMyProfileResponse, PostUsersCanUseTwoFactorError, PostUsersCanUseTwoFactorResponse, PostUsersGetQrCodeError, PostUsersGetQrCodeResponse, PostUsersEnabledTwoFactorData, PostUsersEnabledTwoFactorError, PostUsersEnabledTwoFactorResponse, PostUsersDisabledTwoFactorData, PostUsersDisabledTwoFactorError, PostUsersDisabledTwoFactorResponse, PostUsersResetTwoFactorData, PostUsersResetTwoFactorError, PostUsersResetTwoFactorResponse, PostUsersNeedChangePasswordError, PostUsersNeedChangePasswordResponse, PostAggregationWorkshopReceiveWorkshopProductionInfoAsyncData, PostAggregationWorkshopReceiveWorkshopProductionInfoAsyncError, PostAggregationWorkshopReceiveWorkshopProductionInfoAsyncResponse, PostAggregationWorkshopGetProductListAsyncData, PostAggregationWorkshopGetProductListAsyncError, PostAggregationWorkshopGetProductListAsyncResponse } from './types.gen'; +import type { GetApiAbpApiDefinitionData, GetApiAbpApiDefinitionError, GetApiAbpApiDefinitionResponse, GetApiAbpApplicationConfigurationData, GetApiAbpApplicationConfigurationError, GetApiAbpApplicationConfigurationResponse, GetApiAbpApplicationLocalizationData, GetApiAbpApplicationLocalizationError, GetApiAbpApplicationLocalizationResponse, PostApiAppAccountLoginData, PostApiAppAccountLoginError, PostApiAppAccountLoginResponse, PostApiAppAccountLogin2FaData, PostApiAppAccountLogin2FaError, PostApiAppAccountLogin2FaResponse, PostApiAppAccountLoginOidcData, PostApiAppAccountLoginOidcError, PostApiAppAccountLoginOidcResponse, PostApiAppAccountRefreshTokenData, PostApiAppAccountRefreshTokenError, PostApiAppAccountRefreshTokenResponse, PostApiAppAccountLogoutError, PostApiAppAccountLogoutResponse, PostAuditLogsPageData, PostAuditLogsPageError, PostAuditLogsPageResponse, PostAggregationBusinessReceiveCommandInfoAsyncData, PostAggregationBusinessReceiveCommandInfoAsyncError, PostAggregationBusinessReceiveCommandInfoAsyncResponse, PostAggregationBusinessBatchQueryDeviceDataInfoAsyncData, PostAggregationBusinessBatchQueryDeviceDataInfoAsyncError, PostAggregationBusinessBatchQueryDeviceDataInfoAsyncResponse, PostAggregationBusinessBatchCreateDeviceInfoAsyncData, PostAggregationBusinessBatchCreateDeviceInfoAsyncError, PostAggregationBusinessBatchCreateDeviceInfoAsyncResponse, GetCommonGetSelectListData, GetCommonGetSelectListError, GetCommonGetSelectListResponse, PostCtWingAccountInsertAsyncData, PostCtWingAccountInsertAsyncError, PostCtWingAccountInsertAsyncResponse, PostCtWingAccountModifyAsyncData, PostCtWingAccountModifyAsyncError, PostCtWingAccountModifyAsyncResponse, PostCtWingAccountDeleteAsyncData, PostCtWingAccountDeleteAsyncError, PostCtWingAccountDeleteAsyncResponse, PostCtWingAccountListAsyncData, PostCtWingAccountListAsyncError, PostCtWingAccountListAsyncResponse, PostCtWingProductInsertAsyncData, PostCtWingProductInsertAsyncError, PostCtWingProductInsertAsyncResponse, PostCtWingProductModifyAsyncData, PostCtWingProductModifyAsyncError, PostCtWingProductModifyAsyncResponse, PostCtWingProductDeleteAsyncData, PostCtWingProductDeleteAsyncError, PostCtWingProductDeleteAsyncResponse, PostCtWingProductGetAsyncData, PostCtWingProductGetAsyncError, PostCtWingProductGetAsyncResponse, PostCtWingProductProductStatusChangeAsyncData, PostCtWingProductProductStatusChangeAsyncError, PostCtWingProductProductStatusChangeAsyncResponse, PostCtWingProductListAsyncData, PostCtWingProductListAsyncError, PostCtWingProductListAsyncResponse, PostCtWingServiceReceiveStatusChangeError, PostCtWingServiceReceiveStatusChangeResponse, PostCtWingServiceReceiveDataChangeError, PostCtWingServiceReceiveDataChangeResponse, PostCtWingServiceReceiveCommandChangeError, PostCtWingServiceReceiveCommandChangeResponse, PostCtWingServiceReceiveEventChangeError, PostCtWingServiceReceiveEventChangeResponse, PostCtWingServiceReceiveDeviceChangeError, PostCtWingServiceReceiveDeviceChangeResponse, PostDataDictionaryPageData, PostDataDictionaryPageError, PostDataDictionaryPageResponse, PostDataDictionaryPageDetailData, PostDataDictionaryPageDetailError, PostDataDictionaryPageDetailResponse, PostDataDictionarySelectDetailData, PostDataDictionarySelectDetailError, PostDataDictionarySelectDetailResponse, PostDataDictionaryCreateData, PostDataDictionaryCreateError, PostDataDictionaryCreateResponse, PostDataDictionaryCreateDetailData, PostDataDictionaryCreateDetailError, PostDataDictionaryCreateDetailResponse, PostDataDictionaryStatusData, PostDataDictionaryStatusError, PostDataDictionaryStatusResponse, PostDataDictionaryUpdateDetailData, PostDataDictionaryUpdateDetailError, PostDataDictionaryUpdateDetailResponse, PostDataDictionaryDeleteData, PostDataDictionaryDeleteError, PostDataDictionaryDeleteResponse, PostDataDictionaryDeleteDataDictionaryTypeData, PostDataDictionaryDeleteDataDictionaryTypeError, PostDataDictionaryDeleteDataDictionaryTypeResponse, PostDataDictionaryUpdateData, PostDataDictionaryUpdateError, PostDataDictionaryUpdateResponse, PostAggregationDeviceCreateAsyncData, PostAggregationDeviceCreateAsyncError, PostAggregationDeviceCreateAsyncResponse, PostAggregationDeviceBatchCreateAsyncData, PostAggregationDeviceBatchCreateAsyncError, PostAggregationDeviceBatchCreateAsyncResponse, PostAggregationDeviceDeleteAsyncData, PostAggregationDeviceDeleteAsyncError, PostAggregationDeviceDeleteAsyncResponse, PostAggregationDeviceFindByIdAsyncData, PostAggregationDeviceFindByIdAsyncError, PostAggregationDeviceFindByIdAsyncResponse, PostAggregationDeviceRepushDeviceInfoToIoTplatformData, PostAggregationDeviceRepushDeviceInfoToIoTplatformError, PostAggregationDeviceRepushDeviceInfoToIoTplatformResponse, PostAggregationDeviceDeviceCommandForApiAsyncData, PostAggregationDeviceDeviceCommandForApiAsyncError, PostAggregationDeviceDeviceCommandForApiAsyncResponse, PostDeviceInfoFindByDeviceAddressData, PostDeviceInfoFindByDeviceAddressError, PostDeviceInfoFindByDeviceAddressResponse, PostDeviceInfoPageData, PostDeviceInfoPageError, PostDeviceInfoPageResponse, PostDeviceInfoCacheDeviceDataToRedisError, PostDeviceInfoCacheDeviceDataToRedisResponse, PostThingModelInfoCreateAsyncData, PostThingModelInfoCreateAsyncError, PostThingModelInfoCreateAsyncResponse, PostThingModelInfoUpdateAsyncData, PostThingModelInfoUpdateAsyncError, PostThingModelInfoUpdateAsyncResponse, PostThingModelInfoDeleteAsyncData, PostThingModelInfoDeleteAsyncError, PostThingModelInfoDeleteAsyncResponse, PostThingModelInfoFindByIdAsyncData, PostThingModelInfoFindByIdAsyncError, PostThingModelInfoFindByIdAsyncResponse, PostThingModelInfoFindByPlatformProductIdAsyncData, PostThingModelInfoFindByPlatformProductIdAsyncError, PostThingModelInfoFindByPlatformProductIdAsyncResponse, PostThingModelInfoCopyAnotherThingModelAsyncData, PostThingModelInfoCopyAnotherThingModelAsyncError, PostThingModelInfoCopyAnotherThingModelAsyncResponse, PostThingModelInfoCopyStandardThingModelData, PostThingModelInfoCopyStandardThingModelError, PostThingModelInfoCopyStandardThingModelResponse, PostThingModelInfoPageAsyncData, PostThingModelInfoPageAsyncError, PostThingModelInfoPageAsyncResponse, PostThingModelInfoStandardThingModelPageAsyncError, PostThingModelInfoStandardThingModelPageAsyncResponse, PostFeaturesListData, PostFeaturesListError, PostFeaturesListResponse, PostFeaturesUpdateData, PostFeaturesUpdateError, PostFeaturesUpdateResponse, PostFeaturesDeleteData, PostFeaturesDeleteError, PostFeaturesDeleteResponse, PostFilesPageData, PostFilesPageError, PostFilesPageResponse, PostFilesUploadData, PostFilesUploadError, PostFilesUploadResponse, PostFilesDeleteData, PostFilesDeleteError, PostFilesDeleteResponse, PostFilesDownloadData, PostFilesDownloadError, PostFilesDownloadResponse, PostIdentitySecurityLogsPageData, PostIdentitySecurityLogsPageError, PostIdentitySecurityLogsPageResponse, PostLanguagesAllError, PostLanguagesAllResponse, PostLanguagesPageData, PostLanguagesPageError, PostLanguagesPageResponse, PostLanguagesCreateData, PostLanguagesCreateError, PostLanguagesCreateResponse, PostLanguagesUpdateData, PostLanguagesUpdateError, PostLanguagesUpdateResponse, PostLanguagesDeleteData, PostLanguagesDeleteError, PostLanguagesDeleteResponse, PostLanguagesSetDefaultData, PostLanguagesSetDefaultError, PostLanguagesSetDefaultResponse, PostLanguageTextsAllResourceError, PostLanguageTextsAllResourceResponse, PostLanguageTextsPageData, PostLanguageTextsPageError, PostLanguageTextsPageResponse, PostLanguageTextsCreateData, PostLanguageTextsCreateError, PostLanguageTextsCreateResponse, PostLanguageTextsUpdateData, PostLanguageTextsUpdateError, PostLanguageTextsUpdateResponse, PostMenusUserMenuError, PostMenusUserMenuResponse, PostMenusPageData, PostMenusPageError, PostMenusPageResponse, PostMenusCreateData, PostMenusCreateError, PostMenusCreateResponse, PostMenusUpdateData, PostMenusUpdateError, PostMenusUpdateResponse, PostMenusDeleteData, PostMenusDeleteError, PostMenusDeleteResponse, PostMenusTreeError, PostMenusTreeResponse, PostNotificationNotificationPageData, PostNotificationNotificationPageError, PostNotificationNotificationPageResponse, PostNotificationNotificationSubscriptionPageData, PostNotificationNotificationSubscriptionPageError, PostNotificationNotificationSubscriptionPageResponse, PostNotificationDeleteData, PostNotificationDeleteError, PostNotificationDeleteResponse, PostNotificationSendCommonWarningMessageData, PostNotificationSendCommonWarningMessageError, PostNotificationSendCommonWarningMessageResponse, PostNotificationSendCommonInformationMessageData, PostNotificationSendCommonInformationMessageError, PostNotificationSendCommonInformationMessageResponse, PostNotificationSendCommonErrorMessageData, PostNotificationSendCommonErrorMessageError, PostNotificationSendCommonErrorMessageResponse, PostNotificationSendBroadCastWarningMessageData, PostNotificationSendBroadCastWarningMessageError, PostNotificationSendBroadCastWarningMessageResponse, PostNotificationSendBroadCastInformationMessageData, PostNotificationSendBroadCastInformationMessageError, PostNotificationSendBroadCastInformationMessageResponse, PostNotificationSendBroadCastErrorMessageData, PostNotificationSendBroadCastErrorMessageError, PostNotificationSendBroadCastErrorMessageResponse, PostNotificationReadData, PostNotificationReadError, PostNotificationReadResponse, PostNotificationBatchReadData, PostNotificationBatchReadError, PostNotificationBatchReadResponse, PostOneNetAccountInsertAsyncData, PostOneNetAccountInsertAsyncError, PostOneNetAccountInsertAsyncResponse, PostOneNetAccountModifyAsyncData, PostOneNetAccountModifyAsyncError, PostOneNetAccountModifyAsyncResponse, PostOneNetAccountDeleteAsyncData, PostOneNetAccountDeleteAsyncError, PostOneNetAccountDeleteAsyncResponse, PostOneNetAccountListAsyncData, PostOneNetAccountListAsyncError, PostOneNetAccountListAsyncResponse, PostOneNetProductInsertAsyncData, PostOneNetProductInsertAsyncError, PostOneNetProductInsertAsyncResponse, PostOneNetProductModifyAsyncData, PostOneNetProductModifyAsyncError, PostOneNetProductModifyAsyncResponse, PostOneNetProductDeleteAsyncData, PostOneNetProductDeleteAsyncError, PostOneNetProductDeleteAsyncResponse, PostOneNetProductGetAsyncData, PostOneNetProductGetAsyncError, PostOneNetProductGetAsyncResponse, PostOneNetProductProductStatusChangeAsyncData, PostOneNetProductProductStatusChangeAsyncError, PostOneNetProductProductStatusChangeAsyncResponse, PostOneNetProductListAsyncData, PostOneNetProductListAsyncError, PostOneNetProductListAsyncResponse, PostOneNetServiceReceivePlaintextDataChangeData, PostOneNetServiceReceivePlaintextDataChangeError, PostOneNetServiceReceivePlaintextDataChangeResponse, GetOneNetServiceReceivePlaintextDataChangeData, GetOneNetServiceReceivePlaintextDataChangeError, GetOneNetServiceReceivePlaintextDataChangeResponse, PostOneNetServiceReceiveCiphertextDataChangeData, PostOneNetServiceReceiveCiphertextDataChangeError, PostOneNetServiceReceiveCiphertextDataChangeResponse, GetOneNetServiceReceiveCiphertextDataChangeData, GetOneNetServiceReceiveCiphertextDataChangeError, GetOneNetServiceReceiveCiphertextDataChangeResponse, PostOrganizationUnitsTreeError, PostOrganizationUnitsTreeResponse, PostOrganizationUnitsCreateData, PostOrganizationUnitsCreateError, PostOrganizationUnitsCreateResponse, PostOrganizationUnitsDeleteData, PostOrganizationUnitsDeleteError, PostOrganizationUnitsDeleteResponse, PostOrganizationUnitsUpdateData, PostOrganizationUnitsUpdateError, PostOrganizationUnitsUpdateResponse, PostOrganizationUnitsAddRoleToOrganizationUnitAsyncData, PostOrganizationUnitsAddRoleToOrganizationUnitAsyncError, PostOrganizationUnitsAddRoleToOrganizationUnitAsyncResponse, PostOrganizationUnitsRemoveRoleFromOrganizationUnitAsyncData, PostOrganizationUnitsRemoveRoleFromOrganizationUnitAsyncError, PostOrganizationUnitsRemoveRoleFromOrganizationUnitAsyncResponse, PostOrganizationUnitsAddUserToOrganizationUnitData, PostOrganizationUnitsAddUserToOrganizationUnitError, PostOrganizationUnitsAddUserToOrganizationUnitResponse, PostOrganizationUnitsRemoveUserFromOrganizationUnitData, PostOrganizationUnitsRemoveUserFromOrganizationUnitError, PostOrganizationUnitsRemoveUserFromOrganizationUnitResponse, PostOrganizationUnitsGetUsersData, PostOrganizationUnitsGetUsersError, PostOrganizationUnitsGetUsersResponse, PostOrganizationUnitsGetRolesData, PostOrganizationUnitsGetRolesError, PostOrganizationUnitsGetRolesResponse, PostOrganizationUnitsGetUnAddUsersData, PostOrganizationUnitsGetUnAddUsersError, PostOrganizationUnitsGetUnAddUsersResponse, PostOrganizationUnitsGetUnAddRolesData, PostOrganizationUnitsGetUnAddRolesError, PostOrganizationUnitsGetUnAddRolesResponse, PostPermissionsTreeData, PostPermissionsTreeError, PostPermissionsTreeResponse, PostPermissionsUpdateData, PostPermissionsUpdateError, PostPermissionsUpdateResponse, PostRolesAllError, PostRolesAllResponse, PostRolesPageData, PostRolesPageError, PostRolesPageResponse, PostRolesCreateData, PostRolesCreateError, PostRolesCreateResponse, PostRolesUpdateData, PostRolesUpdateError, PostRolesUpdateResponse, PostRolesDeleteData, PostRolesDeleteError, PostRolesDeleteResponse, GetApiAppAbpProBasicApplicationConfigurationError, GetApiAppAbpProBasicApplicationConfigurationResponse, PostSettingsAllError, PostSettingsAllResponse, PostSettingsUpdateData, PostSettingsUpdateError, PostSettingsUpdateResponse, PostTableModelPacketInfoPageData, PostTableModelPacketInfoPageError, PostTableModelPacketInfoPageResponse, PostTableModelDeviceDataInfoPageData, PostTableModelDeviceDataInfoPageError, PostTableModelDeviceDataInfoPageResponse, PostTableModelCtWingLogInfoData, PostTableModelCtWingLogInfoError, PostTableModelCtWingLogInfoResponse, PostTableModelOneNetLogInfoData, PostTableModelOneNetLogInfoError, PostTableModelOneNetLogInfoResponse, PostTenantsFindData, PostTenantsFindError, PostTenantsFindResponse, PostTenantsPageData, PostTenantsPageError, PostTenantsPageResponse, PostTenantsCreateData, PostTenantsCreateError, PostTenantsCreateResponse, PostTenantsUpdateData, PostTenantsUpdateError, PostTenantsUpdateResponse, PostTenantsDeleteData, PostTenantsDeleteError, PostTenantsDeleteResponse, PostTenantsPageConnectionStringData, PostTenantsPageConnectionStringError, PostTenantsPageConnectionStringResponse, PostTenantsAddOrUpdateConnectionStringData, PostTenantsAddOrUpdateConnectionStringError, PostTenantsAddOrUpdateConnectionStringResponse, PostTenantsDeleteConnectionStringData, PostTenantsDeleteConnectionStringError, PostTenantsDeleteConnectionStringResponse, PostTextTemplatesPageData, PostTextTemplatesPageError, PostTextTemplatesPageResponse, PostTextTemplatesCreateData, PostTextTemplatesCreateError, PostTextTemplatesCreateResponse, PostTextTemplatesUpdateData, PostTextTemplatesUpdateError, PostTextTemplatesUpdateResponse, PostTextTemplatesDeleteData, PostTextTemplatesDeleteError, PostTextTemplatesDeleteResponse, PostTextTemplatesExportData, PostTextTemplatesExportError, PostTextTemplatesExportResponse, PostTreeModelDeviceDataInfoPageData, PostTreeModelDeviceDataInfoPageError, PostTreeModelDeviceDataInfoPageResponse, PostUsersPageData, PostUsersPageError, PostUsersPageResponse, PostUsersListData, PostUsersListError, PostUsersListResponse, PostUsersExportData, PostUsersExportError, PostUsersExportResponse, PostUsersCreateData, PostUsersCreateError, PostUsersCreateResponse, PostUsersUpdateData, PostUsersUpdateError, PostUsersUpdateResponse, PostUsersDeleteData, PostUsersDeleteError, PostUsersDeleteResponse, PostUsersRoleData, PostUsersRoleError, PostUsersRoleResponse, PostUsersChangePasswordData, PostUsersChangePasswordError, PostUsersChangePasswordResponse, PostUsersResetPasswordData, PostUsersResetPasswordError, PostUsersResetPasswordResponse, PostUsersLockData, PostUsersLockError, PostUsersLockResponse, PostUsersFindByUserNameData, PostUsersFindByUserNameError, PostUsersFindByUserNameResponse, PostUsersMyProfileError, PostUsersMyProfileResponse, PostUsersCanUseTwoFactorError, PostUsersCanUseTwoFactorResponse, PostUsersGetQrCodeError, PostUsersGetQrCodeResponse, PostUsersEnabledTwoFactorData, PostUsersEnabledTwoFactorError, PostUsersEnabledTwoFactorResponse, PostUsersDisabledTwoFactorData, PostUsersDisabledTwoFactorError, PostUsersDisabledTwoFactorResponse, PostUsersResetTwoFactorData, PostUsersResetTwoFactorError, PostUsersResetTwoFactorResponse, PostUsersNeedChangePasswordError, PostUsersNeedChangePasswordResponse, PostAggregationWorkshopReceiveWorkshopProductionInfoAsyncData, PostAggregationWorkshopReceiveWorkshopProductionInfoAsyncError, PostAggregationWorkshopReceiveWorkshopProductionInfoAsyncResponse, PostAggregationWorkshopGetProductListAsyncData, PostAggregationWorkshopGetProductListAsyncError, PostAggregationWorkshopGetProductListAsyncResponse } from './types.gen'; export const client = createClient(createConfig()); @@ -296,6 +296,16 @@ export const postDataDictionaryPageDetail = (options?: Options) => { + return (options?.client ?? client).post({ + ...options, + url: '/DataDictionary/selectDetail' + }); +}; + /** * 创建字典类型 */ diff --git a/apps/web-antd/src/api-client/types.gen.ts b/apps/web-antd/src/api-client/types.gen.ts index 4afc622..2b91fc7 100644 --- a/apps/web-antd/src/api-client/types.gen.ts +++ b/apps/web-antd/src/api-client/types.gen.ts @@ -4351,6 +4351,31 @@ export type ReturnValueApiDescriptionModel = { typeSimple?: (string) | null; }; +export type SelectDataDictionaryDetailInput = { + /** + * 当前页面.默认从1开始 + */ + pageIndex?: number; + /** + * 每页多少条.每页显示多少记录 + */ + pageSize?: number; + /** + * 跳过多少条 + */ + readonly skipCount?: number; + /** + * 排序 + * + * name desc + * + */ + sorting?: (string) | null; + dataDictionaryId?: string; + filter?: (string) | null; + typeCode?: (string) | null; +}; + /** * 下拉框选项元素 */ @@ -5036,6 +5061,14 @@ export type PostDataDictionaryPageDetailResponse = (PagingDataDictionaryDetailOu export type PostDataDictionaryPageDetailError = (RemoteServiceErrorResponse); +export type PostDataDictionarySelectDetailData = { + body?: SelectDataDictionaryDetailInput; +}; + +export type PostDataDictionarySelectDetailResponse = (PagingDataDictionaryDetailOutputPagedResultDto); + +export type PostDataDictionarySelectDetailError = (RemoteServiceErrorResponse); + export type PostDataDictionaryCreateData = { body?: CreateDataDictinaryInput; }; diff --git a/apps/web-antd/src/locales/langs/en-US/common.json b/apps/web-antd/src/locales/langs/en-US/common.json index 0eb7d0c..e1cf2ed 100644 --- a/apps/web-antd/src/locales/langs/en-US/common.json +++ b/apps/web-antd/src/locales/langs/en-US/common.json @@ -66,6 +66,7 @@ "AppSecret": "AppSecret", "operationSuccess": "OperationSuccess", "operationFailed": "OperationFailed", - "required":"Required", + "required": "Required", + "SearchKeyWords": "搜索关键字", "loading": "Loading" } diff --git a/apps/web-antd/src/locales/langs/zh-CN/common.json b/apps/web-antd/src/locales/langs/zh-CN/common.json index 8a107cd..24a2a07 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/common.json +++ b/apps/web-antd/src/locales/langs/zh-CN/common.json @@ -68,5 +68,6 @@ "operationSuccess": "操作成功", "operationFailed": "操作失败", "required": "必填", + "SearchKeyWords": "搜索关键字", "loading": "正在处理" } diff --git a/apps/web-antd/src/types/vue-shim.d.ts b/apps/web-antd/src/types/vue-shim.d.ts new file mode 100644 index 0000000..ad184cf --- /dev/null +++ b/apps/web-antd/src/types/vue-shim.d.ts @@ -0,0 +1,7 @@ +declare module '*.vue' { + import type { DefineComponent } from 'vue'; + const component: DefineComponent<{}, {}, any>; + export default component; +} + + diff --git a/apps/web-antd/src/views/devicemanagement/thingmodelinfo/StandardThingModelCodeSelect.vue b/apps/web-antd/src/views/devicemanagement/thingmodelinfo/StandardThingModelCodeSelect.vue new file mode 100644 index 0000000..ae1bed1 --- /dev/null +++ b/apps/web-antd/src/views/devicemanagement/thingmodelinfo/StandardThingModelCodeSelect.vue @@ -0,0 +1,155 @@ + + + + + + + + e.preventDefault()"> + + + {{ `${query.pageIndex}/${maxPage}` }} + + + + + + + + + + diff --git a/apps/web-antd/src/views/devicemanagement/thingmodelinfo/schema.ts b/apps/web-antd/src/views/devicemanagement/thingmodelinfo/schema.ts index 806edae..47366b9 100644 --- a/apps/web-antd/src/views/devicemanagement/thingmodelinfo/schema.ts +++ b/apps/web-antd/src/views/devicemanagement/thingmodelinfo/schema.ts @@ -4,72 +4,73 @@ import { z } from '@vben/common-ui'; import dayjs from 'dayjs'; +import { getCommonGetSelectList } from '#/api-client'; import { $t } from '#/locales'; export const querySchema = computed(() => [ { component: 'Input', fieldName: 'SearchKeyWords', - label: $t('common.keyword'), + label: $t('common.SearchKeyWords'), }, ]); export const tableSchema = computed(() => [ { field: 'filedType', - title: '物模型类型', + title: $t('abp.thingModelInfos.FiledType'), minWidth: 120, showOverflow: 'tooltip', formatter: ({ cellValue }: { cellValue: any }) => { const typeMap: Record = { - 'Property': '属性', - 'Service': '服务', - 'Event': '事件', + Property: '属性', + Service: '服务', + Event: '事件', }; return typeMap[cellValue] || cellValue; }, }, { field: 'ioTPlatformRawFieldName', - title: '平台原始字段名', + title: $t('abp.thingModelInfos.IoTPlatformRawFieldName'), minWidth: 150, showOverflow: 'tooltip', }, { field: 'standardFieldName', - title: '标准字段名', + title: $t('abp.thingModelInfos.StandardFieldName'), minWidth: 150, showOverflow: 'tooltip', }, { field: 'standardFieldDisplayName', - title: '标准字段显示名称', + title: $t('abp.thingModelInfos.StandardFieldDisplayName'), minWidth: 150, showOverflow: 'tooltip', }, { field: 'standardFieldValueType', - title: '标准字段值类型', + title: $t('abp.thingModelInfos.StandardFieldValueType'), minWidth: 120, showOverflow: 'tooltip', formatter: ({ cellValue }: { cellValue: any }) => { const typeMap: Record = { - 'String': '字符串', - 'Int32': '整数', - 'Int64': '长整数', - 'Float': '浮点数', - 'Double': '双精度', - 'Boolean': '布尔值', - 'DateTime': '日期时间', - 'Object': 'JSON对象', - 'Array': '数组', + String: '字符串', + Int32: '整数', + Int64: '长整数', + Float: '浮点数', + Double: '双精度', + Boolean: '布尔值', + DateTime: '日期时间', + Object: 'JSON对象', + Array: '数组', }; return typeMap[cellValue] || cellValue; }, }, { field: 'isValueNeedConvert', - title: '需要值类型转换', + title: $t('abp.thingModelInfos.IsValueNeedConvert'), minWidth: 120, slots: { default: 'isValueNeedConvert' }, }, @@ -93,140 +94,218 @@ export const tableSchema = computed(() => [ // 添加物模型表单schema export const addThingModelFormSchema = computed(() => [ { - component: 'Select', + component: 'ApiSelect', fieldName: 'filedType', - label: '物模型类型', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.FiledType'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), componentProps: { - options: [ - { label: '属性', value: 'Property' }, - { label: '服务', value: 'Service' }, - { label: '事件', value: 'Event' }, - ], - placeholder: '请选择物模型类型', + api: getCommonGetSelectList, + params: { + query: { + typeName: 'DataDictionaryTypeConst', + }, + }, + labelField: 'value', + valueField: 'key', + optionsPropName: 'options', + immediate: true, + allowClear: true, + placeholder: + $t('common.pleaseSelect') + $t('abp.thingModelInfos.FiledType'), + afterFetch: (res: any) => { + // 确保返回的是数组格式 + if (Array.isArray(res)) { + return res; + } + if (res && Array.isArray(res.items)) { + return res.items; + } + if (res && Array.isArray(res.data)) { + return res.data; + } + return []; + }, }, }, { component: 'Input', fieldName: 'ioTPlatformRawFieldName', - label: '平台原始字段名', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.IoTPlatformRawFieldName'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), componentProps: { - placeholder: '请输入物联网平台中的原始字段名', + placeholder: + $t('common.pleaseInput') + + $t('abp.thingModelInfos.IoTPlatformRawFieldName'), }, }, { - component: 'Input', + component: 'StandardThingModelCodeSelect', fieldName: 'standardFieldName', - label: '标准字段名', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.StandardFieldName'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + dependencies: { + show(values: any) { + return !!values?.filedType; + }, + triggerFields: ['filedType'], + }, componentProps: { - placeholder: '请输入管理后台产品标准的字段名', + // 传入联动的类型编码 + typeCode: (formValues: any) => formValues?.filedType, + placeholder: + $t('common.pleaseSelect') + $t('abp.thingModelInfos.StandardFieldName'), }, }, { - component: 'Select', + component: 'ApiSelect', fieldName: 'standardFieldValueType', - label: '标准字段值类型', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.StandardFieldValueType'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), componentProps: { - options: [ - { label: '字符串', value: 'String' }, - { label: '整数', value: 'Int32' }, - { label: '长整数', value: 'Int64' }, - { label: '浮点数', value: 'Float' }, - { label: '双精度', value: 'Double' }, - { label: '布尔值', value: 'Boolean' }, - { label: '日期时间', value: 'DateTime' }, - { label: 'JSON对象', value: 'Object' }, - { label: '数组', value: 'Array' }, - ], - placeholder: '请选择标准字段值类型', + api: getCommonGetSelectList, + params: { + query: { + typeName: 'StandardThingModelDataTypeEnum', + }, + }, + labelField: 'value', + valueField: 'secondValue', + optionsPropName: 'options', + immediate: true, + placeholder: + $t('common.pleaseSelect') + + $t('abp.thingModelInfos.StandardFieldValueType'), + afterFetch: (res: any) => { + if (Array.isArray(res)) return res; + if (res && Array.isArray(res.items)) return res.items; + if (res && Array.isArray(res.data)) return res.data; + return []; + }, }, }, { component: 'Input', fieldName: 'standardFieldDisplayName', - label: '标准字段显示名称', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.StandardFieldDisplayName'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), componentProps: { - placeholder: '请输入标准字段的显示名称', + placeholder: + $t('common.pleaseInput') + + $t('abp.thingModelInfos.StandardFieldDisplayName'), }, }, { component: 'Switch', fieldName: 'isValueNeedConvert', - label: '是否需要值类型转换', + label: $t('abp.thingModelInfos.IsValueNeedConvert'), defaultValue: false, + componentProps: { + style: { width: 'auto' }, + }, }, ]); // 编辑物模型表单schema export const editThingModelFormSchema = computed(() => [ { - component: 'Select', + component: 'ApiSelect', fieldName: 'filedType', - label: '物模型类型', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.FiledType'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), componentProps: { - options: [ - { label: '属性', value: 'Property' }, - { label: '服务', value: 'Service' }, - { label: '事件', value: 'Event' }, - ], - placeholder: '请选择物模型类型', + api: getCommonGetSelectList, + params: { + query: { + typeName: 'DataDictionaryTypeConst', + }, + }, + labelField: 'value', + valueField: 'value', + optionsPropName: 'options', + immediate: true, + placeholder: $t('abp.thingModelInfos.PleaseSelectFiledType'), + afterFetch: (res: any) => { + // 确保返回的是数组格式 + if (Array.isArray(res)) { + return res; + } + if (res && Array.isArray(res.items)) { + return res.items; + } + if (res && Array.isArray(res.data)) { + return res.data; + } + return []; + }, }, }, { component: 'Input', fieldName: 'ioTPlatformRawFieldName', - label: '平台原始字段名', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.IoTPlatformRawFieldName'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), componentProps: { - placeholder: '请输入物联网平台中的原始字段名', + placeholder: $t('abp.thingModelInfos.PleaseInputIoTPlatformRawFieldName'), }, }, { - component: 'Input', + component: 'StandardThingModelCodeSelect', fieldName: 'standardFieldName', - label: '标准字段名', - rules: z.string().min(1, $t('common.required')), + label: $t('abp.thingModelInfos.StandardFieldName'), + rules: z.preprocess((v) => (v == null ? '' : v), z.string().min(1, $t('common.required'))), + dependencies: { + show(values: any) { + return !!values?.filedType; + }, + triggerFields: ['filedType'], + }, componentProps: { - placeholder: '请输入管理后台产品标准的字段名', + typeCode: (formValues: any) => formValues?.filedType, + placeholder: $t('abp.thingModelInfos.PleaseSelectStandardFieldName'), }, }, { - component: 'Select', + component: 'ApiSelect', fieldName: 'standardFieldValueType', - label: '标准字段值类型', + label: $t('abp.thingModelInfos.StandardFieldValueType'), rules: z.string().min(1, $t('common.required')), componentProps: { - options: [ - { label: '字符串', value: 'String' }, - { label: '整数', value: 'Int32' }, - { label: '长整数', value: 'Int64' }, - { label: '浮点数', value: 'Float' }, - { label: '双精度', value: 'Double' }, - { label: '布尔值', value: 'Boolean' }, - { label: '日期时间', value: 'DateTime' }, - { label: 'JSON对象', value: 'Object' }, - { label: '数组', value: 'Array' }, - ], - placeholder: '请选择标准字段值类型', + api: getCommonGetSelectList, + params: { + query: { + typeName: 'StandardThingModelDataTypeEnum', + }, + }, + labelField: 'value', + valueField: 'value', + optionsPropName: 'options', + immediate: true, + placeholder: $t('abp.thingModelInfos.PleaseSelectStandardFieldValueType'), + afterFetch: (res: any) => { + if (Array.isArray(res)) return res; + if (res && Array.isArray(res.items)) return res.items; + if (res && Array.isArray(res.data)) return res.data; + return []; + }, }, }, { component: 'Input', fieldName: 'standardFieldDisplayName', - label: '标准字段显示名称', + label: $t('abp.thingModelInfos.StandardFieldDisplayName'), rules: z.string().min(1, $t('common.required')), componentProps: { - placeholder: '请输入标准字段的显示名称', + placeholder: $t( + 'abp.thingModelInfos.PleaseInputStandardFieldDisplayName', + ), }, }, { component: 'Switch', fieldName: 'isValueNeedConvert', - label: '是否需要值类型转换', + label: $t('abp.thingModelInfos.IsValueNeedConvert'), + componentProps: { + style: { width: 'auto' }, + }, }, ]);