diff --git a/apps/web-antd/.env.development b/apps/web-antd/.env.development index 650c1ed..6470208 100644 --- a/apps/web-antd/.env.development +++ b/apps/web-antd/.env.development @@ -29,7 +29,8 @@ VITE_REFRESH_ROLE = true # VITE_WEBSOCKET_URL=http://182.43.18.151:44317/signalr/notification # 后端接口地址 -VITE_APP_API_ADDRESS=http://localhost:44315 +VITE_APP_API_ADDRESS=http://47.110.53.196:28080 +# VITE_APP_API_ADDRESS=http://10.10.70.222:44333 # websocket地址 VITE_WEBSOCKET_URL=http://localhost:44315/signalr/notification diff --git a/apps/web-antd/src/api-client/services.gen.ts b/apps/web-antd/src/api-client/services.gen.ts index a53f248..48a099d 100644 --- a/apps/web-antd/src/api-client/services.gen.ts +++ b/apps/web-antd/src/api-client/services.gen.ts @@ -1,6 +1,6 @@ // This file is auto-generated by @hey-api/openapi-ts -import type { Options } from '@hey-api/client-axios'; +import type { Options, OptionsLegacyParser } from '@hey-api/client-axios'; import type { GetApiAbpApiDefinitionData, @@ -140,6 +140,8 @@ import type { PostFilesUploadData, PostFilesUploadError, PostFilesUploadResponse, + PostFoucsCreateData, + postFoucsUpdateData, PostGeneratorDownData, PostGeneratorDownError, PostGeneratorDownResponse, @@ -193,6 +195,8 @@ import type { PostMenusUpdateResponse, PostMenusUserMenuError, PostMenusUserMenuResponse, + postMetersArchivesIssued, + PostMetersCreateData, PostNotificationBatchReadData, PostNotificationBatchReadError, PostNotificationBatchReadResponse, @@ -2934,7 +2938,7 @@ export const postUsersResetTwoFactor = ( export const postUsersNeedChangePassword = < ThrowOnError extends boolean = false, >( - options?: Options, + options?: OptionsLegacyParser, ) => { return (options?.client ?? client).post< PostUsersNeedChangePasswordResponse, @@ -2945,3 +2949,197 @@ export const postUsersNeedChangePassword = < url: '/Users/needChangePassword', }); }; + +/** + * 获取集中器分页 + */ +export const postFocusesPage = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostRolesAllResponse, + PostRolesAllError, + ThrowOnError + >({ + ...options, + // ...formDataBodySerializer, + url: '/Focuses/Page', + }); +}; +/** + * 创建集中器 + */ +export const postFocusesCreate = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostUsersCreateResponse, + PostUsersCreateError, + ThrowOnError + >({ + ...options, + url: '/Focuses/Create', + }); +}; +/** + * 编辑集中器 + */ +export const postFocusesUpdate = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostUsersUpdateResponse, + PostUsersUpdateError, + ThrowOnError + >({ + ...options, + url: '/Focuses/Update', + }); +}; +/** + * 删除集中器 + */ +export const postFocusesDelete = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostUsersDeleteResponse, + PostUsersDeleteError, + ThrowOnError + >({ + ...options, + url: '/Focuses/Delete', + }); +}; + +/** + * 获取表计管理分页 + */ +export const postMetersPage = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostRolesAllResponse, + PostRolesAllError, + ThrowOnError + >({ + ...options, + // ...formDataBodySerializer, + url: '/Meters/Page', + }); +}; +/** + * 创建表计 + */ +export const postMetersCreate = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostUsersCreateResponse, + PostUsersCreateError, + ThrowOnError + >({ + ...options, + url: '/Meters/Create', + }); +}; +/** + * 编辑表计 + */ +export const postMetersUpdate = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostUsersUpdateResponse, + PostUsersUpdateError, + ThrowOnError + >({ + ...options, + url: '/Meters/Update', + }); +}; +/** + * 删除表计 + */ +export const postMetersDelete = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostUsersDeleteResponse, + PostUsersDeleteError, + ThrowOnError + >({ + ...options, + url: '/Meters/Delete', + }); +}; + +/** + * 档案下发 + */ +export const postMetersArchivesDown = ( + options?: Options, +) => { + return (options?.client ?? client).post< + PostUsersDeleteResponse, + PostUsersDeleteError, + ThrowOnError + >({ + ...options, + url: '/Meters/ArchivesDown', + }); +}; + +/** + * 获取集中器状态分页 + */ +export const postTreeModelFocusStatusInfoPage = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => { + return (options?.client ?? client).post< + PostRolesAllResponse, + PostRolesAllError, + ThrowOnError + >({ + ...options, + url: '/TreeModel/FocusStatusInfoPage', + }); +}; + +/** + * 获取日志分页 + */ +export const postTableModelPacketInfoPage = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => { + return (options?.client ?? client).post< + PostRolesAllResponse, + PostRolesAllError, + ThrowOnError + >({ + ...options, + url: '/TableModel/PacketInfoPage', + }); +}; + +/** + * 获取测点数据分页 + */ +export const postTableModelDeviceDataInfoPage = < + ThrowOnError extends boolean = false, +>( + options?: Options, +) => { + return (options?.client ?? client).post< + PostRolesAllResponse, + PostRolesAllError, + ThrowOnError + >({ + ...options, + url: '/TableModel/DeviceDataInfoPage', + }); +}; diff --git a/apps/web-antd/src/api-client/types.gen.ts b/apps/web-antd/src/api-client/types.gen.ts index 2398064..940fb01 100644 --- a/apps/web-antd/src/api-client/types.gen.ts +++ b/apps/web-antd/src/api-client/types.gen.ts @@ -1,15 +1,109 @@ // This file is auto-generated by @hey-api/openapi-ts +export type LoginResultType = 1 | 2 | 3 | 4 | 5; + +export type MultiTenancyInfoDto = { + isEnabled?: boolean; +}; + +/** + * 打开类型 + */ +export type OpenType = 10 | 20 | 30 | 40; + +export type RelationalType = 10 | 20; export type AbpLoginResult = { readonly description?: null | string; result?: LoginResultType; }; +export type OidcConfiguration = { + /** + * 认证地址 + */ + authUri?: null | string; + /** + * client_id + */ + clientId?: null | string; + /** + * 应用名称 + */ + clientName?: null | string; + /** + * 是否启用 + */ + enabled?: boolean; + /** + * 应用图标 + */ + icon?: null | string; + /** + * 类型 + */ + type?: null | string; +}; + +export type ApplicationOidcConfigurationDto = { + /** + * 是否启用 + */ + enabled?: boolean; + oidcConfiguration?: Array | null; +}; + +export type ExtensionEnumFieldDto = { + name?: null | string; + value?: unknown; +}; + +export type ExtensionEnumDto = { + fields?: Array | null; + localizationResource?: null | string; +}; + export type AbpProApplicationConfigurationDto = { multiTenancy?: MultiTenancyInfoDto; oidcConfiguration?: ApplicationOidcConfigurationDto; }; +export type ParameterApiDescriptionModel = { + bindingSourceId?: null | string; + constraintTypes?: Array | null; + defaultValue?: unknown; + descriptorName?: null | string; + isOptional?: boolean; + jsonName?: null | string; + name?: null | string; + nameOnMethod?: null | string; + type?: null | string; + typeSimple?: null | string; +}; + +export type DateTimeFormatDto = { + calendarAlgorithmType?: null | string; + dateSeparator?: null | string; + dateTimeFormatLong?: null | string; + fullDateTimePattern?: null | string; + longTimePattern?: null | string; + shortDatePattern?: null | string; + shortTimePattern?: null | string; +}; + +export type MethodParameterApiDescriptionModel = { + defaultValue?: unknown; + isOptional?: boolean; + name?: null | string; + type?: null | string; + typeAsString?: null | string; + typeSimple?: null | string; +}; + +export type ReturnValueApiDescriptionModel = { + type?: null | string; + typeSimple?: null | string; +}; + export type ActionApiDescriptionModel = { allowAnonymous?: boolean | null; httpMethod?: null | string; @@ -54,6 +148,204 @@ export type AggregateRouteConfig = { routeKey?: null | string; }; +export type EnabledTwoFactorInput = { + /** + * 验证码 + */ + code: string; + /** + * 密钥 + */ + secret: string; +}; + +export type EntityChangeType = 0 | 1 | 2; + +export type ExtensionPropertyApiCreateDto = { + isAvailable?: boolean; +}; + +export type ExtensionPropertyApiGetDto = { + isAvailable?: boolean; +}; + +export type ExtensionPropertyApiUpdateDto = { + isAvailable?: boolean; +}; + +export type ExtensionPropertyAttributeDto = { + config?: null | { + [key: string]: unknown; + }; + typeSimple?: null | string; +}; + +export type ExtensionPropertyFeaturePolicyDto = { + features?: Array | null; + requiresAll?: boolean; +}; + +export type ExtensionPropertyGlobalFeaturePolicyDto = { + features?: Array | null; + requiresAll?: boolean; +}; + +export type ExtensionPropertyPermissionPolicyDto = { + permissionNames?: Array | null; + requiresAll?: boolean; +}; + +export type ExtensionPropertyApiDto = { + onCreate?: ExtensionPropertyApiCreateDto; + onGet?: ExtensionPropertyApiGetDto; + onUpdate?: ExtensionPropertyApiUpdateDto; +}; + +export type LocalizableStringDto = { + name?: null | string; + resource?: null | string; +}; + +export type ExtensionPropertyUiLookupDto = { + displayPropertyName?: null | string; + filterParamName?: null | string; + resultListPropertyName?: null | string; + url?: null | string; + valuePropertyName?: null | string; +}; + +export type ExtensionPropertyUiFormDto = { + isVisible?: boolean; +}; + +export type ExtensionPropertyUiTableDto = { + isVisible?: boolean; +}; + +export type ExtensionPropertyPolicyDto = { + features?: ExtensionPropertyFeaturePolicyDto; + globalFeatures?: ExtensionPropertyGlobalFeaturePolicyDto; + permissions?: ExtensionPropertyPermissionPolicyDto; +}; + +export type ExtensionPropertyUiDto = { + lookup?: ExtensionPropertyUiLookupDto; + onCreateForm?: ExtensionPropertyUiFormDto; + onEditForm?: ExtensionPropertyUiFormDto; + onTable?: ExtensionPropertyUiTableDto; +}; + +export type ExtensionPropertyDto = { + api?: ExtensionPropertyApiDto; + attributes?: Array | null; + configuration?: null | { + [key: string]: unknown; + }; + defaultValue?: unknown; + displayName?: LocalizableStringDto; + policy?: ExtensionPropertyPolicyDto; + type?: null | string; + typeSimple?: null | string; + ui?: ExtensionPropertyUiDto; +}; + +export type EntityExtensionDto = { + configuration?: null | { + [key: string]: unknown; + }; + properties?: null | { + [key: string]: ExtensionPropertyDto; + }; +}; + +/** + * 菜单类型 + */ +export type MenuType = 10 | 20; + +/** + * 消息等级 + */ +export type MessageLevel = 10 | 20 | 30; + +/** + * 消息类型 + */ +export type MessageType = 10 | 20; + +export type ModuleExtensionDto = { + configuration?: null | { + [key: string]: unknown; + }; + entities?: null | { + [key: string]: EntityExtensionDto; + }; +}; + +export type ObjectExtensionsDto = { + enums?: null | { + [key: string]: ExtensionEnumDto; + }; + modules?: null | { + [key: string]: ModuleExtensionDto; + }; +}; + +export type InterfaceMethodApiDescriptionModel = { + name?: null | string; + parametersOnMethod?: Array | null; + returnValue?: ReturnValueApiDescriptionModel; +}; + +export type ControllerInterfaceApiDescriptionModel = { + methods?: Array | null; + name?: null | string; + type?: null | string; +}; + +export type ControllerApiDescriptionModel = { + actions?: null | { + [key: string]: ActionApiDescriptionModel; + }; + apiVersion?: null | string; + controllerGroupName?: null | string; + controllerName?: null | string; + interfaces?: Array | null; + isIntegrationService?: boolean; + isRemoteService?: boolean; + type?: null | string; +}; + +export type ModuleApiDescriptionModel = { + controllers?: null | { + [key: string]: ControllerApiDescriptionModel; + }; + remoteServiceName?: null | string; + rootPath?: null | string; +}; + +export type PropertyApiDescriptionModel = { + isRequired?: boolean; + jsonName?: null | string; + maximum?: null | string; + maxLength?: null | number; + minimum?: null | string; + minLength?: null | number; + name?: null | string; + regex?: null | string; + type?: null | string; + typeSimple?: null | string; +}; + +export type TypeApiDescriptionModel = { + baseType?: null | string; + enumNames?: Array | null; + enumValues?: Array | null; + genericArguments?: Array | null; + isEnum?: boolean; + properties?: Array | null; +}; + export type ApplicationApiDescriptionModel = { modules?: null | { [key: string]: ModuleApiDescriptionModel; @@ -69,21 +361,62 @@ export type ApplicationAuthConfigurationDto = { }; }; -export type ApplicationConfigurationDto = { - auth?: ApplicationAuthConfigurationDto; - clock?: ClockDto; - currentTenant?: CurrentTenantDto; - currentUser?: CurrentUserDto; - extraProperties?: null | { - [key: string]: unknown; - }; - features?: ApplicationFeatureConfigurationDto; - globalFeatures?: ApplicationGlobalFeatureConfigurationDto; - localization?: ApplicationLocalizationConfigurationDto; - multiTenancy?: MultiTenancyInfoDto; - objectExtensions?: ObjectExtensionsDto; - setting?: ApplicationSettingConfigurationDto; - timing?: TimingDto; +export type ClockDto = { + kind?: null | string; +}; + +export type CurrentTenantDto = { + id?: null | string; + isAvailable?: boolean; + name?: null | string; +}; + +export type CurrentCultureDto = { + cultureName?: null | string; + dateTimeFormat?: DateTimeFormatDto; + displayName?: null | string; + englishName?: null | string; + isRightToLeft?: boolean; + name?: null | string; + nativeName?: null | string; + threeLetterIsoLanguageName?: null | string; + twoLetterIsoLanguageName?: null | string; +}; + +export type CurrentUserDto = { + email?: null | string; + emailVerified?: boolean; + id?: null | string; + impersonatorTenantId?: null | string; + impersonatorTenantName?: null | string; + impersonatorUserId?: null | string; + impersonatorUserName?: null | string; + isAuthenticated?: boolean; + name?: null | string; + phoneNumber?: null | string; + phoneNumberVerified?: boolean; + roles?: Array | null; + sessionId?: null | string; + surName?: null | string; + tenantId?: null | string; + userName?: null | string; +}; + +export type NameValue = { + name?: null | string; + value?: null | string; +}; + +export type LanguageInfo = { + cultureName?: null | string; + displayName?: null | string; + readonly twoLetterISOLanguageName?: null | string; + uiCultureName?: null | string; +}; + +export type LockUserInput = { + locked?: boolean; + userId?: string; }; export type ApplicationFeatureConfigurationDto = { @@ -92,6 +425,24 @@ export type ApplicationFeatureConfigurationDto = { }; }; +export type ApplicationLocalizationResourceDto = { + baseResources?: Array | null; + texts?: null | { + [key: string]: string; + }; +}; + +export type ApplicationSettingConfigurationDto = { + values?: null | { + [key: string]: null | string; + }; +}; + +export type ChangePasswordInput = { + currentPassword?: null | string; + newPassword: string; +}; + export type ApplicationGlobalFeatureConfigurationDto = { enabledFeatures?: Array | null; }; @@ -116,6 +467,40 @@ export type ApplicationLocalizationConfigurationDto = { }; }; +export type IanaTimeZone = { + timeZoneName?: null | string; +}; + +export type WindowsTimeZone = { + timeZoneId?: null | string; +}; + +export type TimeZone = { + iana?: IanaTimeZone; + windows?: WindowsTimeZone; +}; + +export type TimingDto = { + timeZone?: TimeZone; +}; + +export type ApplicationConfigurationDto = { + auth?: ApplicationAuthConfigurationDto; + clock?: ClockDto; + currentTenant?: CurrentTenantDto; + currentUser?: CurrentUserDto; + extraProperties?: null | { + [key: string]: unknown; + }; + features?: ApplicationFeatureConfigurationDto; + globalFeatures?: ApplicationGlobalFeatureConfigurationDto; + localization?: ApplicationLocalizationConfigurationDto; + multiTenancy?: MultiTenancyInfoDto; + objectExtensions?: ObjectExtensionsDto; + setting?: ApplicationSettingConfigurationDto; + timing?: TimingDto; +}; + export type ApplicationLocalizationDto = { currentCulture?: CurrentCultureDto; resources?: null | { @@ -123,55 +508,6 @@ export type ApplicationLocalizationDto = { }; }; -export type ApplicationLocalizationResourceDto = { - baseResources?: Array | null; - texts?: null | { - [key: string]: string; - }; -}; - -export type ApplicationOidcConfigurationDto = { - /** - * 是否启用 - */ - enabled?: boolean; - oidcConfiguration?: Array | null; -}; - -export type ApplicationSettingConfigurationDto = { - values?: null | { - [key: string]: null | string; - }; -}; - -export type ChangePasswordInput = { - currentPassword?: null | string; - newPassword: string; -}; - -export type ClockDto = { - kind?: null | string; -}; - -export type ControllerApiDescriptionModel = { - actions?: null | { - [key: string]: ActionApiDescriptionModel; - }; - apiVersion?: null | string; - controllerGroupName?: null | string; - controllerName?: null | string; - interfaces?: Array | null; - isIntegrationService?: boolean; - isRemoteService?: boolean; - type?: null | string; -}; - -export type ControllerInterfaceApiDescriptionModel = { - methods?: Array | null; - name?: null | string; - type?: null | string; -}; - /** * 控制策略 */ @@ -451,6 +787,8 @@ export type CreateProjectInput = { supportTenant?: boolean; }; +export type TemplateType = 10 | 20; + export type CreateTemplateDetailInput = { /** * 模板内容 @@ -506,43 +844,6 @@ export type CreateTextTemplateInput = { name: string; }; -export type CurrentCultureDto = { - cultureName?: null | string; - dateTimeFormat?: DateTimeFormatDto; - displayName?: null | string; - englishName?: null | string; - isRightToLeft?: boolean; - name?: null | string; - nativeName?: null | string; - threeLetterIsoLanguageName?: null | string; - twoLetterIsoLanguageName?: null | string; -}; - -export type CurrentTenantDto = { - id?: null | string; - isAvailable?: boolean; - name?: null | string; -}; - -export type CurrentUserDto = { - email?: null | string; - emailVerified?: boolean; - id?: null | string; - impersonatorTenantId?: null | string; - impersonatorTenantName?: null | string; - impersonatorUserId?: null | string; - impersonatorUserName?: null | string; - isAuthenticated?: boolean; - name?: null | string; - phoneNumber?: null | string; - phoneNumberVerified?: boolean; - roles?: Array | null; - sessionId?: null | string; - surName?: null | string; - tenantId?: null | string; - userName?: null | string; -}; - export type DataTypeDto = { /** * 编码 @@ -559,16 +860,6 @@ export type DataTypeDto = { isEnum?: boolean; }; -export type DateTimeFormatDto = { - calendarAlgorithmType?: null | string; - dateSeparator?: null | string; - dateTimeFormatLong?: null | string; - fullDateTimePattern?: null | string; - longTimePattern?: null | string; - shortDatePattern?: null | string; - shortTimePattern?: null | string; -}; - export type DeleteAggregateInput = { id?: string; }; @@ -704,28 +995,6 @@ export type DownloadFileObjectInput = { id?: string; }; -export type EnabledTwoFactorInput = { - /** - * 验证码 - */ - code: string; - /** - * 密钥 - */ - secret: string; -}; - -export type EntityChangeType = 0 | 1 | 2; - -export type EntityExtensionDto = { - configuration?: null | { - [key: string]: unknown; - }; - properties?: null | { - [key: string]: ExtensionPropertyDto; - }; -}; - export type EntityOutput = { /** * 编码 @@ -746,97 +1015,24 @@ export type EntityOutput = { id?: string; }; -export type ExtensionEnumDto = { - fields?: Array | null; - localizationResource?: null | string; -}; - -export type ExtensionEnumFieldDto = { +export type FeatureProviderDto = { + key?: null | string; name?: null | string; - value?: unknown; }; -export type ExtensionPropertyApiCreateDto = { - isAvailable?: boolean; -}; - -export type ExtensionPropertyApiDto = { - onCreate?: ExtensionPropertyApiCreateDto; - onGet?: ExtensionPropertyApiGetDto; - onUpdate?: ExtensionPropertyApiUpdateDto; -}; - -export type ExtensionPropertyApiGetDto = { - isAvailable?: boolean; -}; - -export type ExtensionPropertyApiUpdateDto = { - isAvailable?: boolean; -}; - -export type ExtensionPropertyAttributeDto = { - config?: null | { +export type IValueValidator = { + readonly name?: null | string; + readonly properties?: null | { [key: string]: unknown; }; - typeSimple?: null | string; }; -export type ExtensionPropertyDto = { - api?: ExtensionPropertyApiDto; - attributes?: Array | null; - configuration?: null | { +export type IStringValueType = { + readonly name?: null | string; + readonly properties?: null | { [key: string]: unknown; }; - defaultValue?: unknown; - displayName?: LocalizableStringDto; - policy?: ExtensionPropertyPolicyDto; - type?: null | string; - typeSimple?: null | string; - ui?: ExtensionPropertyUiDto; -}; - -export type ExtensionPropertyFeaturePolicyDto = { - features?: Array | null; - requiresAll?: boolean; -}; - -export type ExtensionPropertyGlobalFeaturePolicyDto = { - features?: Array | null; - requiresAll?: boolean; -}; - -export type ExtensionPropertyPermissionPolicyDto = { - permissionNames?: Array | null; - requiresAll?: boolean; -}; - -export type ExtensionPropertyPolicyDto = { - features?: ExtensionPropertyFeaturePolicyDto; - globalFeatures?: ExtensionPropertyGlobalFeaturePolicyDto; - permissions?: ExtensionPropertyPermissionPolicyDto; -}; - -export type ExtensionPropertyUiDto = { - lookup?: ExtensionPropertyUiLookupDto; - onCreateForm?: ExtensionPropertyUiFormDto; - onEditForm?: ExtensionPropertyUiFormDto; - onTable?: ExtensionPropertyUiTableDto; -}; - -export type ExtensionPropertyUiFormDto = { - isVisible?: boolean; -}; - -export type ExtensionPropertyUiLookupDto = { - displayPropertyName?: null | string; - filterParamName?: null | string; - resultListPropertyName?: null | string; - url?: null | string; - valuePropertyName?: null | string; -}; - -export type ExtensionPropertyUiTableDto = { - isVisible?: boolean; + validator?: IValueValidator; }; export type FeatureDto = { @@ -856,11 +1052,6 @@ export type FeatureGroupDto = { name?: null | string; }; -export type FeatureProviderDto = { - key?: null | string; - name?: null | string; -}; - export type FileAggregateRoute = { aggregator?: null | string; priority?: number; @@ -882,11 +1073,12 @@ export type FileCacheOptions = { ttlSeconds?: number; }; -export type FileConfiguration = { - aggregates?: Array | null; - dynamicRoutes?: Array | null; - globalConfiguration?: FileGlobalConfiguration; - routes?: Array | null; +export type FileRateLimitRule = { + clientWhitelist?: Array | null; + enableRateLimiting?: boolean; + limit?: number; + period?: null | string; + periodTimespan?: number; }; export type FileDynamicRoute = { @@ -895,23 +1087,6 @@ export type FileDynamicRoute = { serviceName?: null | string; }; -export type FileGlobalConfiguration = { - baseUrl?: null | string; - downstreamHttpVersion?: null | string; - downstreamScheme?: null | string; - httpHandlerOptions?: FileHttpHandlerOptions; - loadBalancerOptions?: FileLoadBalancerOptions; - qoSOptions?: FileQoSOptions; - rateLimitOptions?: FileRateLimitOptions; - requestIdKey?: null | string; - serviceDiscoveryProvider?: FileServiceDiscoveryProvider; -}; - -export type FileHostAndPort = { - host?: null | string; - port?: number; -}; - export type FileHttpHandlerOptions = { allowAutoRedirect?: boolean; maxConnectionsPerServer?: number; @@ -940,12 +1115,37 @@ export type FileRateLimitOptions = { rateLimitCounterPrefix?: null | string; }; -export type FileRateLimitRule = { - clientWhitelist?: Array | null; - enableRateLimiting?: boolean; - limit?: number; - period?: null | string; - periodTimespan?: number; +export type FileServiceDiscoveryProvider = { + configurationKey?: null | string; + host?: null | string; + namespace?: null | string; + pollingInterval?: number; + port?: number; + scheme?: null | string; + token?: null | string; + type?: null | string; +}; + +export type FileGlobalConfiguration = { + baseUrl?: null | string; + downstreamHttpVersion?: null | string; + downstreamScheme?: null | string; + httpHandlerOptions?: FileHttpHandlerOptions; + loadBalancerOptions?: FileLoadBalancerOptions; + qoSOptions?: FileQoSOptions; + rateLimitOptions?: FileRateLimitOptions; + requestIdKey?: null | string; + serviceDiscoveryProvider?: FileServiceDiscoveryProvider; +}; + +export type FileHostAndPort = { + host?: null | string; + port?: number; +}; + +export type FileSecurityOptions = { + ipAllowedList?: Array | null; + ipBlockedList?: Array | null; }; export type FileRoute = { @@ -996,20 +1196,11 @@ export type FileRoute = { upstreamPathTemplate?: null | string; }; -export type FileSecurityOptions = { - ipAllowedList?: Array | null; - ipBlockedList?: Array | null; -}; - -export type FileServiceDiscoveryProvider = { - configurationKey?: null | string; - host?: null | string; - namespace?: null | string; - pollingInterval?: number; - port?: number; - scheme?: null | string; - token?: null | string; - type?: null | string; +export type FileConfiguration = { + aggregates?: Array | null; + dynamicRoutes?: Array | null; + globalConfiguration?: FileGlobalConfiguration; + routes?: Array | null; }; export type FindByUserNameInput = { @@ -1048,22 +1239,16 @@ export type GetEntityModelInput = { id?: string; }; -export type GetEntityModelOutput = { +export type GetEnumTypeOutput = { /** - * 编码 + * 枚举编码 */ code?: null | string; /** - * 描述 + * 枚举描述 */ description?: null | string; - entityModelOutputs?: Array | null; - /** - * 实体模型属性集合 - */ - entityModelProperties?: Array | null; id?: string; - relationalType?: RelationalType; }; export type GetEntityModelPropertyOutput = { @@ -1113,6 +1298,24 @@ export type GetEntityModelPropertyOutput = { minLength?: null | number; }; +export type GetEntityModelOutput = { + /** + * 编码 + */ + code?: null | string; + /** + * 描述 + */ + description?: null | string; + entityModelOutputs?: Array | null; + /** + * 实体模型属性集合 + */ + entityModelProperties?: Array | null; + id?: string; + relationalType?: RelationalType; +}; + export type GetEntityModelTreeInput = { projectId?: string; }; @@ -1146,18 +1349,6 @@ export type GetEntityModelTreeOutput = { title?: null | string; }; -export type GetEnumTypeOutput = { - /** - * 枚举编码 - */ - code?: null | string; - /** - * 枚举描述 - */ - description?: null | string; - id?: string; -}; - export type GetFeatureListResultDto = { groups?: Array | null; }; @@ -1287,6 +1478,18 @@ export type GetProjectAndEntityInput = { id?: string; }; +export type ProjectOutput = { + /** + * 公司名称 + */ + companyName?: null | string; + id?: string; + /** + * 项目名称 + */ + projectName?: null | string; +}; + export type GetProjectAndEntityOutput = { entities?: Array | null; project?: ProjectOutput; @@ -1469,10 +1672,6 @@ export type HttpStatusCode = | 510 | 511; -export type IanaTimeZone = { - timeZoneName?: null | string; -}; - export type IdentityRoleCreateDto = { readonly extraProperties?: null | { [key: string]: unknown; @@ -1574,48 +1773,38 @@ export type IdentityUserUpdateDto = { userName: string; }; +export type IdentityFocusUpdateDto = { + apn?: null | string; + enabled?: boolean; + focusAddress: number | string; + focusCode?: null | string; + id?: string; + name: string; + selfDevelop?: boolean; + status?: boolean; +}; + +export type IdentityMetersUpdateDto = { + dynamicPassword?: boolean; + haveValve?: boolean; + id?: string; + meterAddress: number; + meterName: string; + meterType?: number; + password?: number | string; + selfDevelop?: boolean; + singleRate?: number | string; +}; +export type IdentityMetersArchivesDown = { + focusAddress: number | string; + meterAddress: number | string; + meterType: number | string; +}; + export type IdInput = { id?: string; }; -export type InterfaceMethodApiDescriptionModel = { - name?: null | string; - parametersOnMethod?: Array | null; - returnValue?: ReturnValueApiDescriptionModel; -}; - -export type IStringValueType = { - readonly name?: null | string; - readonly properties?: null | { - [key: string]: unknown; - }; - validator?: IValueValidator; -}; - -export type IValueValidator = { - readonly name?: null | string; - readonly properties?: null | { - [key: string]: unknown; - }; -}; - -export type LanguageInfo = { - cultureName?: null | string; - displayName?: null | string; - readonly twoLetterISOLanguageName?: null | string; - uiCultureName?: null | string; -}; - -export type LocalizableStringDto = { - name?: null | string; - resource?: null | string; -}; - -export type LockUserInput = { - locked?: boolean; - userId?: string; -}; - /** * 登录 */ @@ -1671,53 +1860,6 @@ export type LoginOutput = { userName?: null | string; }; -export type LoginResultType = 1 | 2 | 3 | 4 | 5; - -/** - * 菜单类型 - */ -export type MenuType = 10 | 20; - -/** - * 消息等级 - */ -export type MessageLevel = 10 | 20 | 30; - -/** - * 消息类型 - */ -export type MessageType = 10 | 20; - -export type MethodParameterApiDescriptionModel = { - defaultValue?: unknown; - isOptional?: boolean; - name?: null | string; - type?: null | string; - typeAsString?: null | string; - typeSimple?: null | string; -}; - -export type ModuleApiDescriptionModel = { - controllers?: null | { - [key: string]: ControllerApiDescriptionModel; - }; - remoteServiceName?: null | string; - rootPath?: null | string; -}; - -export type ModuleExtensionDto = { - configuration?: null | { - [key: string]: unknown; - }; - entities?: null | { - [key: string]: EntityExtensionDto; - }; -}; - -export type MultiTenancyInfoDto = { - isEnabled?: boolean; -}; - export type MyProfileOutput = { email?: null | string; isActive?: boolean; @@ -1729,57 +1871,11 @@ export type MyProfileOutput = { userName?: null | string; }; -export type NameValue = { - name?: null | string; - value?: null | string; -}; - export type NeedChangePasswordOutput = { message?: null | string; needChangePassword?: boolean; }; -export type ObjectExtensionsDto = { - enums?: null | { - [key: string]: ExtensionEnumDto; - }; - modules?: null | { - [key: string]: ModuleExtensionDto; - }; -}; - -export type OidcConfiguration = { - /** - * 认证地址 - */ - authUri?: null | string; - /** - * client_id - */ - clientId?: null | string; - /** - * 应用名称 - */ - clientName?: null | string; - /** - * 是否启用 - */ - enabled?: boolean; - /** - * 应用图标 - */ - icon?: null | string; - /** - * 类型 - */ - type?: null | string; -}; - -/** - * 打开类型 - */ -export type OpenType = 10 | 20 | 30 | 40; - export type PageEntityModelInput = { filter?: null | string; id?: string; @@ -2541,6 +2637,32 @@ export type PagingAuditLogInput = { userName?: null | string; }; +export type PagingEntityPropertyChangeOutput = { + entityChangeId?: string; + id?: string; + newValue?: null | string; + originalValue?: null | string; + propertyName?: null | string; + propertyTypeFullName?: null | string; + tenantId?: null | string; +}; + +export type PagingEntityChangeOutput = { + auditLogId?: string; + changeTime?: null | string; + changeType?: EntityChangeType; + changeTypeDescription?: null | string; + entityId?: null | string; + entityTenantId?: null | string; + entityTypeFullName?: null | string; + extraProperties?: null | { + [key: string]: unknown; + }; + id?: string; + propertyChanges?: Array | null; + tenantId?: null | string; +}; + export type PagingAuditLogOutput = { actions?: Array | null; applicationName?: null | string; @@ -2671,32 +2793,6 @@ export type PagingDataDictionaryOutputPagedResultDto = { totalCount?: number; }; -export type PagingEntityChangeOutput = { - auditLogId?: string; - changeTime?: null | string; - changeType?: EntityChangeType; - changeTypeDescription?: null | string; - entityId?: null | string; - entityTenantId?: null | string; - entityTypeFullName?: null | string; - extraProperties?: null | { - [key: string]: unknown; - }; - id?: string; - propertyChanges?: Array | null; - tenantId?: null | string; -}; - -export type PagingEntityPropertyChangeOutput = { - entityChangeId?: string; - id?: string; - newValue?: null | string; - originalValue?: null | string; - propertyName?: null | string; - propertyTypeFullName?: null | string; - tenantId?: null | string; -}; - export type PagingIdentitySecurityLogInput = { /** * 请求地址 @@ -3050,17 +3146,10 @@ export type PagingUserListInput = { sorting?: null | string; }; -export type ParameterApiDescriptionModel = { - bindingSourceId?: null | string; - constraintTypes?: Array | null; - defaultValue?: unknown; - descriptorName?: null | string; - isOptional?: boolean; - jsonName?: null | string; - name?: null | string; - nameOnMethod?: null | string; - type?: null | string; - typeSimple?: null | string; +export type PermissionTreeDto = { + children?: Array | null; + key?: null | string; + title?: null | string; }; export type PermissionOutput = { @@ -3069,12 +3158,6 @@ export type PermissionOutput = { permissions?: Array | null; }; -export type PermissionTreeDto = { - children?: Array | null; - key?: null | string; - title?: null | string; -}; - export type PreViewCodeInput = { entityId?: Array | null; projectId?: string; @@ -3119,31 +3202,6 @@ export type ProjectDtoPagedResultDto = { totalCount?: number; }; -export type ProjectOutput = { - /** - * 公司名称 - */ - companyName?: null | string; - id?: string; - /** - * 项目名称 - */ - projectName?: null | string; -}; - -export type PropertyApiDescriptionModel = { - isRequired?: boolean; - jsonName?: null | string; - maximum?: null | string; - maxLength?: null | number; - minimum?: null | string; - minLength?: null | number; - name?: null | string; - regex?: null | string; - type?: null | string; - typeSimple?: null | string; -}; - export type RefreshTokenInput = { refreshToken: string; userId?: string; @@ -3156,7 +3214,10 @@ export type RefreshTokenOutput = { token?: null | string; }; -export type RelationalType = 10 | 20; +export type RemoteServiceValidationErrorInfo = { + members?: Array | null; + message?: null | string; +}; export type RemoteServiceErrorInfo = { code?: null | string; @@ -3172,11 +3233,6 @@ export type RemoteServiceErrorResponse = { error?: RemoteServiceErrorInfo; }; -export type RemoteServiceValidationErrorInfo = { - members?: Array | null; - message?: null | string; -}; - export type RemoteStreamContent = { readonly contentLength?: null | number; contentType?: null | string; @@ -3202,11 +3258,6 @@ export type ResetTwoFactorInput = { userId?: string; }; -export type ReturnValueApiDescriptionModel = { - type?: null | string; - typeSimple?: null | string; -}; - export type SendBroadCastMessageInput = { /** * 消息内容 @@ -3388,8 +3439,6 @@ export type TemplateTreeDto = { title?: null | string; }; -export type TemplateType = 10 | 20; - export type TenantCreateDto = { adminEmailAddress: string; adminPassword: string; @@ -3413,30 +3462,12 @@ export type TenantDtoPagedResultDto = { totalCount?: number; }; -export type TimeZone = { - iana?: IanaTimeZone; - windows?: WindowsTimeZone; -}; - -export type TimingDto = { - timeZone?: TimeZone; -}; - export type TreeOutput = { children?: Array | null; key?: string; title?: null | string; }; -export type TypeApiDescriptionModel = { - baseType?: null | string; - enumNames?: Array | null; - enumValues?: Array | null; - genericArguments?: Array | null; - isEnum?: boolean; - properties?: Array | null; -}; - export type UpdateAggregateInput = { /** * 编码 @@ -3574,16 +3605,16 @@ export type UpdateFeatureDto = { value?: null | string; }; +export type UpdateFeaturesDto = { + features?: Array | null; +}; + export type UpdateFeatureInput = { providerKey?: null | string; providerName?: null | string; updateFeaturesDto?: UpdateFeaturesDto; }; -export type UpdateFeaturesDto = { - features?: Array | null; -}; - /** * 删除语言 */ @@ -3831,10 +3862,6 @@ export type UserLoginInfo = { userNameOrEmailAddress: string; }; -export type WindowsTimeZone = { - timeZoneId?: null | string; -}; - export type GetApiAbpApiDefinitionData = { query?: { IncludeTypes?: boolean; @@ -4903,6 +4930,14 @@ export type PostUsersCreateData = { body?: IdentityUserCreateDto; }; +export type PostFoucsCreateData = { + body?: IdentityFocusUpdateDto; +}; + +export type PostMetersCreateData = { + body?: IdentityMetersUpdateDto; +}; + export type PostUsersCreateResponse = IdentityUserDto; export type PostUsersCreateError = RemoteServiceErrorResponse; @@ -4911,6 +4946,18 @@ export type PostUsersUpdateData = { body?: UpdateUserInput; }; +export type postFoucsUpdateData = { + body?: IdentityFocusUpdateDto; +}; + +export type postMetersUpdateData = { + body?: IdentityMetersUpdateDto; +}; + +export type postMetersArchivesIssued = { + body?: IdentityMetersArchivesDown; +}; + export type PostUsersUpdateResponse = IdentityUserDto; export type PostUsersUpdateError = 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 cab0e93..23a1f2d 100644 --- a/apps/web-antd/src/locales/langs/en-US/abp.json +++ b/apps/web-antd/src/locales/langs/en-US/abp.json @@ -66,17 +66,36 @@ "permissions": "Permissions" }, "log": { - "loginTime": "LoginTime", - "userName": "UserName", + "loginTime": "Login Time", + "userName": "Username", "tenant": "Tenant", - "executionTime": "ExecutionTime", - "responseTime": "ResponseTime(ms)", - "clientIp": "ClientIp", + "executionTime": "Execution Time", + "responseTime": "Response Time (ms)", + "clientIp": "Client IP", "exception": "Exception", - "applicationName": "ApplicationName", - "loginMode": "LoginMode", - "loginUrl": "LoginUrl", - "detail": "Detail" + "applicationName": "Application Name", + "loginMode": "Login Method", + "loginUrl": "Login URL", + "detail": "Details", + "systemName": "System Name", + "projectId": "Project ID", + "dataType": "Data Type", + "deviceType": "Device Type", + "timestamps": "Timestamps", + "manualOrNot": "Manual Operation", + "isTimeout": "Timeout Status", + "afn": "AFN Function Code", + "fn": "Reading Function Code", + "pn": "Reading Measurement Point", + "itemCode": "Collection Item Code", + "isSend": "Send Status", + "sendNum": "Number of Sends", + "nextSendTime": "Next Send Time", + "issuedMessageHexString": "Issued Message (Hex)", + "receivedMessageHexString": "Received Message (Hex)", + "receivedTime": "Received Time", + "isReceived": "Received Status", + "receivedRemark": "Report Parsing Remarks" }, "message": { "title": "Title", @@ -159,5 +178,49 @@ "componentType": "Component", "internalLink": "InternalLink", "externalLink": "ExternalLink" + }, + "focus": { + "name": "concentratorName", + "focusAddress": "concentratorLocation", + "selfDevelop": "selfDevelopedOrNot", + "apn": "APN", + "masterStation": "masterStation", + "status": "OnlineStatus", + "heartbeatInterval": "heartbeatInterval", + "lastRefreshTime": "lastRefreshTime", + "deviceNo": "deviceNo", + "focusCode": "Self developed model", + "checkFocusAddress": "The concentrator address is 9 bits", + "statusData": "statusData" + }, + "meters": { + "meterName": "meterName", + "meterAddress": "meterAddress", + "meterType": "meterType", + "dynamicPassword": "dynamicPassword", + "password": "password", + "singleRate": "singleRate", + "selfDevelop": "selfDevelopedOrNot", + "brandType": "BrandAndModel", + "archiveStatus": "File distribution status", + "tripState": "Valve control status", + "timesA": "CT", + "timev": "PT", + "haveValve": "With or without valve", + "gatherCount": "Quantity of collected items", + "functionCount": "Number of functions", + "checkmeterAddress": "Table The communication address is 9 pure numbers", + "ElectricityMeter": "ElectricityMeter", + "waterMeter": "waterMeter", + "GasMeter": "GasMeter", + "HeatMeter": "HeatMeter", + "WaterMeterFlowmeter": "WaterMeterFlowmeter", + "GasMeterFlowmeter": "GasMeterFlowmeter", + "MultipleRate": "MultipleRate", + "SingleRate": "SingleRate", + "meteringCode": "meteringCode", + "DeviceType": "DeviceType", + "pointData": "pointData", + "archivesIssued": "archivesIssued" } } 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 85b3a51..3128697 100644 --- a/apps/web-antd/src/locales/langs/en-US/common.json +++ b/apps/web-antd/src/locales/langs/en-US/common.json @@ -3,39 +3,49 @@ "edit": "Edit", "delete": "Delete", "search": "Search", + "save": "Save", "export": "Export", - "save": "save", - "seq": "Seq", - "isEnable": "IsEnable", + "isEnable": "Enabled Status", "enabled": "Enabled", "disabled": "Disabled", + "seq": "Sequence", "action": "Action", - "createTime": "CreationTime", + "createTime": "Creation Time", "pleaseInput": "Please input", - "addSuccess": "Add Success", - "editSuccess": "Edit Success", - "deleteSuccess": "Delete Success", - "yes": "yes", - "no": "no", - "confirmDelete": "Confirm to delete", - "askConfirmDelete": "Confirm to delete?", - "warning": "warning", - "info": "info", - "error": "error", + "pleaseSelect": "Please select", + "addSuccess": "Added successfully!", + "editSuccess": "Edited successfully!", + "deleteSuccess": "Deleted successfully!", + "addFail": "Failed to add!", + "editFail": "Failed to edit!", + "deleteFail": "Failed to delete!", + "yes": "Yes", + "no": "No", + "confirmDelete": "Confirm deletion", + "askConfirmDelete": "Are you sure to delete?", + "warning": "Warning", + "info": "Info", + "error": "Error", "success": "Success", "keyword": "Keyword", - "mesage403": "You don't have permission to access this page or function!", - "mesage401": "You are not logged in or the login has timed out. Please log in again!", + "mesage403": "You don't have permission to access this page or feature!", + "mesage401": "Not logged in or session expired, please login again!", "mesage500": "Internal server error!", - "mesage404": "The page you are trying to access does not exist!", + "mesage404": "The page you requested does not exist!", "mesage400": "Request error!", - "mesage405": "Incorrect request method!", - "timeOut": "Request timed out!", - "expandAll": "EexpandAll", - "collapseAll": "CollapseAll", - "description": "description", - "comfirm": "Comfirm", - "valid": "Valid", + "mesage405": "Request method error!", + "timeOut": "Request timeout!", + "expandAll": "Expand all", + "collapseAll": "Collapse all", + "description": "Description", + "comfirm": "Confirm", + "valid": "Validate", "upload": "Upload", - "download": "Download" + "download": "Download", + "numberType": "Number type", + "Issued": "Issued", + "Undistributed": "Undistributed", + "SwitchOff": "Tripped", + "Closing": "Closed", + "MustGreaterTthan0": "Must be greater than 0" } 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 ee05d2f..0eff28e 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/abp.json +++ b/apps/web-antd/src/locales/langs/zh-CN/abp.json @@ -76,7 +76,26 @@ "applicationName": "应用名称", "loginMode": "登录方式", "loginUrl": "登录地址", - "detail": "详情" + "detail": "详情", + "systemName": "系统名称", + "projectId": "项目编码", + "dataType": "数据类型", + "deviceType": "设备类型", + "timestamps": "时标", + "manualOrNot": "是否手动操作", + "isTimeout": "是否超时", + "afn": "AFN功能码", + "fn": "抄读功能码", + "pn": "抄读计量点", + "itemCode": "采集项编码", + "isSend": "是否发送", + "sendNum": "发送次数", + "nextSendTime": "下次发送时间", + "issuedMessageHexString": "下发消息内容", + "receivedMessageHexString": "消息上报内容", + "receivedTime": "消息上报时间", + "isReceived": "是否已上报", + "receivedRemark": "上报报文解析备注" }, "message": { "title": "标题", @@ -159,5 +178,49 @@ "componentType": "组件", "internalLink": "内链", "externalLink": "外链" + }, + "focus": { + "name": "集中器名称", + "focusAddress": "集中器地址", + "selfDevelop": "是否自研", + "apn": "APN", + "masterStation": "主站", + "status": "是否在线状态", + "heartbeatInterval": "心跳间隔(分钟)", + "lastRefreshTime": "最后一次刷新时间", + "deviceNo": "设备编号", + "focusCode": "自研型号", + "checkFocusAddress": "集中器地址为9位", + "statusData": "状态数据" + }, + "meters": { + "meterName": "表计名称", + "meterAddress": "表通信地址", + "meterType": "表计类型", + "dynamicPassword": "是否动态密码", + "password": "表密码", + "singleRate": "费率类型", + "selfDevelop": "是否自研", + "brandType": "品牌型号", + "archiveStatus": "档案下发状态", + "tripState": "阀控状态", + "timesA": "CT", + "timev": "PT", + "haveValve": "是否带阀", + "gatherCount": "采集项数量", + "functionCount": "功能数量", + "checkmeterAddress": "表通信地址为9纯数字", + "ElectricityMeter": "电表", + "waterMeter": "水表", + "GasMeter": "燃气表", + "HeatMeter": "热能表", + "WaterMeterFlowmeter": "水表流量计", + "GasMeterFlowmeter": "燃气表流量计", + "MultipleRate": "复费率", + "SingleRate": "单费率", + "meteringCode": "计量点", + "DeviceType": "设备类型", + "pointData": "测点数据", + "archivesIssued": "档案下发" } } 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 3204c62..7490cfd 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/common.json +++ b/apps/web-antd/src/locales/langs/zh-CN/common.json @@ -12,9 +12,13 @@ "action": "操作", "createTime": "创建时间", "pleaseInput": "请输入", + "pleaseSelect": "请选择", "addSuccess": "新增成功!", "editSuccess": "编辑成功!", "deleteSuccess": "删除成功!", + "addFail": "新增失败!", + "editFail": "编辑失败!", + "deleteFail": "删除失败!", "yes": "是", "no": "否", "confirmDelete": "确认删除", @@ -37,5 +41,11 @@ "comfirm": "确认", "valid": "验证", "upload": "上传", - "download": "下载" + "download": "下载", + "numberType": "数字类型", + "Issued": "已下发", + "Undistributed": "未下发", + "SwitchOff": "跳闸", + "Closing": "合闸", + "MustGreaterTthan0": "必须大于0" } diff --git a/apps/web-antd/src/views/dataManger/collectionLog/index.vue b/apps/web-antd/src/views/dataManger/collectionLog/index.vue new file mode 100644 index 0000000..f910ffc --- /dev/null +++ b/apps/web-antd/src/views/dataManger/collectionLog/index.vue @@ -0,0 +1,102 @@ + + + diff --git a/apps/web-antd/src/views/dataManger/collectionLog/schema.ts b/apps/web-antd/src/views/dataManger/collectionLog/schema.ts new file mode 100644 index 0000000..4a7e1a4 --- /dev/null +++ b/apps/web-antd/src/views/dataManger/collectionLog/schema.ts @@ -0,0 +1,107 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { computed } from 'vue'; + +import { $t } from '#/locales'; + +export const querySchema = computed(() => [ + { + component: 'Input', + fieldName: 'focusAddress', + label: $t('abp.focus.focusAddress'), + }, + { + component: 'Input', + fieldName: 'meterAddress', + label: $t('abp.meters.meterAddress'), + }, +]); + +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: 'meterAddress', + title: $t('abp.meters.meterAddress'), + minWidth: '150', + }, + { + field: 'focusAddress', + title: $t('abp.focus.focusAddress'), + minWidth: '100', + }, + { + field: 'deviceType', + title: $t('abp.log.deviceType'), + minWidth: '100', + slots: { default: 'isdeviceType' }, + }, + { + field: 'timestamps', + title: $t('abp.log.timestamps'), + minWidth: '100', + }, + { + field: 'manualOrNot', + title: $t('abp.log.manualOrNot'), + minWidth: '150', + slots: { default: 'ismanualOrNot' }, + }, + { + field: 'isTimeout', + title: $t('abp.log.isTimeout'), + minWidth: '150', + slots: { default: 'isTimeout' }, + }, + { field: 'afn', title: $t('abp.log.afn'), minWidth: '150' }, + { field: 'fn', title: $t('abp.log.fn'), minWidth: '100' }, + { field: 'pn', title: $t('abp.log.pn'), minWidth: '100' }, + { field: 'itemCode', title: $t('abp.log.itemCode'), minWidth: '100' }, + { + field: 'isSend', + title: $t('abp.log.isSend'), + minWidth: '150', + slots: { default: 'isSend' }, + }, + { + field: 'sendNum', + title: $t('abp.log.sendNum'), + minWidth: '100', + }, + { + field: 'nextSendTime', + title: $t('abp.log.nextSendTime'), + minWidth: '150', + }, + { + field: 'issuedMessageHexString', + title: $t('abp.log.issuedMessageHexString'), + minWidth: '150', + }, + { + field: 'receivedMessageHexString', + title: $t('abp.log.receivedMessageHexString'), + minWidth: '150', + }, + { + field: 'receivedTime', + title: $t('abp.log.receivedTime'), + minWidth: '150', + }, + { + field: 'isReceived', + title: $t('abp.log.isReceived'), + minWidth: '150', + slots: { default: 'isReceived' }, + }, + { + field: 'receivedRemark', + title: $t('abp.log.receivedRemark'), + minWidth: '150', + }, +]); diff --git a/apps/web-antd/src/views/dataManger/concentratorStatus/index.vue b/apps/web-antd/src/views/dataManger/concentratorStatus/index.vue new file mode 100644 index 0000000..7fece70 --- /dev/null +++ b/apps/web-antd/src/views/dataManger/concentratorStatus/index.vue @@ -0,0 +1,66 @@ + + + diff --git a/apps/web-antd/src/views/dataManger/concentratorStatus/schema.ts b/apps/web-antd/src/views/dataManger/concentratorStatus/schema.ts new file mode 100644 index 0000000..e84633b --- /dev/null +++ b/apps/web-antd/src/views/dataManger/concentratorStatus/schema.ts @@ -0,0 +1,47 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { computed } from 'vue'; + +import dayjs from 'dayjs'; + +import { $t } from '#/locales'; + +export const querySchema = computed(() => [ + { + component: 'DatePicker', + fieldName: 'Timestamps', + label: $t('abp.log.timestamps'), + }, +]); +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: 'type', + title: $t('abp.dataDictionary.status'), + minWidth: '100', + }, + { + field: 'times', + title: $t('abp.log.timestamps'), + minWidth: '150', + formatter: ({ cellValue }) => { + return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss'); + }, + }, +]); diff --git a/apps/web-antd/src/views/dataManger/measuringPoint/index.vue b/apps/web-antd/src/views/dataManger/measuringPoint/index.vue new file mode 100644 index 0000000..439bb1f --- /dev/null +++ b/apps/web-antd/src/views/dataManger/measuringPoint/index.vue @@ -0,0 +1,64 @@ + + + diff --git a/apps/web-antd/src/views/dataManger/measuringPoint/schema.ts b/apps/web-antd/src/views/dataManger/measuringPoint/schema.ts new file mode 100644 index 0000000..4ca1afc --- /dev/null +++ b/apps/web-antd/src/views/dataManger/measuringPoint/schema.ts @@ -0,0 +1,42 @@ +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'); + }, + }, +]); diff --git a/apps/web-antd/src/views/device/focus/index.vue b/apps/web-antd/src/views/device/focus/index.vue new file mode 100644 index 0000000..350a2fa --- /dev/null +++ b/apps/web-antd/src/views/device/focus/index.vue @@ -0,0 +1,295 @@ + + + diff --git a/apps/web-antd/src/views/device/focus/schema.ts b/apps/web-antd/src/views/device/focus/schema.ts new file mode 100644 index 0000000..01ed1b2 --- /dev/null +++ b/apps/web-antd/src/views/device/focus/schema.ts @@ -0,0 +1,216 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { computed } from 'vue'; + +import { z } from '@vben/common-ui'; + +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: 'name', title: $t('abp.focus.name'), minWidth: '150' }, + { + field: 'focusAddress', + title: $t('abp.focus.focusAddress'), + minWidth: '150', + }, + { field: 'focusCode', title: $t('abp.focus.focusCode'), minWidth: '150' }, + { + field: 'selfDevelop', + title: $t('abp.focus.selfDevelop'), + minWidth: '150', + slots: { default: 'isSelfDevelop' }, + }, + { + field: 'enabled', + title: $t('common.isEnable'), + minWidth: '150', + slots: { default: 'isEnable' }, + }, + { field: 'apn', title: $t('abp.focus.apn'), minWidth: '100' }, + { + field: 'masterStation', + title: $t('abp.focus.masterStation'), + minWidth: '150', + }, + { + field: 'status', + title: $t('abp.focus.status'), + minWidth: '150', + slots: { default: 'isStatus' }, + }, + { + field: 'heartbeatInterval', + title: $t('abp.focus.heartbeatInterval'), + minWidth: '150', + }, + { + field: 'lastRefreshTime', + title: $t('abp.focus.lastRefreshTime'), + minWidth: '150', + formatter: ({ cellValue }) => { + return cellValue ? dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss') : '-'; + }, + }, + { + field: 'deviceNo', + title: $t('abp.focus.deviceNo'), + minWidth: '150', + }, + { + title: $t('common.action'), + field: 'action', + fixed: 'right', + width: '150', + slots: { default: 'action' }, + }, +]); + +export const addUserFormSchema: any = computed(() => [ + { + component: 'Input', + componentProps: {}, + fieldName: 'name', + label: $t('abp.focus.name'), + rules: z.string().min(1, { + message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.focus.name')}`, + }), + }, + { + component: 'Input', + componentProps: {}, + fieldName: 'focusAddress', + label: $t('abp.focus.focusAddress'), + rules: z + .string() + .min(1, { + message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.focus.focusAddress')}`, + }) + .refine((value) => value.length === 9, { + message: $t('abp.focus.checkFocusAddress'), + }), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'selfDevelop', + label: $t('abp.focus.selfDevelop'), + }, + { + component: 'Input', + componentProps: {}, + fieldName: 'focusCode', + label: $t('abp.focus.focusCode'), + rules: z.string().optional(), + }, + { + component: 'Input', + componentProps: {}, + fieldName: 'apn', + label: $t('abp.focus.apn'), + rules: z.string().optional(), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'enabled', + label: $t('common.isEnable'), + }, + // { + // component: 'Input', + // componentProps: {}, + // fieldName: 'phoneNumber', + // label: $t('abp.focus.phone'), + // rules: z + // .string() + // .min(1, { message: $t('common.pleaseInput') + $t('abp.focus.phone') }), + // }, + // { + // component: 'Input', + // componentProps: {}, + // fieldName: 'password', + // label: $t('abp.focus.password'), + // rules: z + // .string() + // .min(1, { message: $t('common.pleaseInput') + $t('abp.focus.password') }), + // }, + // { + // component: 'Input', + // componentProps: {}, + // fieldName: 'confirmPassword', + // label: $t('abp.focus.comfirmPassword'), + // rules: z.string().min(1, { + // message: $t('common.pleaseInput') + $t('abp.focus.comfirmPassword'), + // }), + // }, +]); + +export const editUserFormSchemaEdit: any = computed(() => [ + { + component: 'Input', + componentProps: {}, + fieldName: 'name', + label: $t('abp.focus.name'), + rules: z.string().min(1, { + message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.focus.name')}`, + }), + }, + { + component: 'Input', + componentProps: {}, + fieldName: 'focusAddress', + label: $t('abp.focus.focusAddress'), + rules: z + .string() + .min(1, { + message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.focus.focusAddress')}`, + }) + .refine((value) => value.length === 9, { + message: $t('abp.focus.checkFocusAddress'), + }), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'selfDevelop', + label: $t('abp.focus.selfDevelop'), + }, + { + component: 'Input', + componentProps: {}, + fieldName: 'focusCode', + label: $t('abp.focus.focusCode'), + rules: z.string().optional(), + }, + { + component: 'Input', + componentProps: {}, + fieldName: 'apn', + label: $t('abp.focus.apn'), + rules: z.string().optional(), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'enabled', + label: $t('common.isEnable'), + }, +]); diff --git a/apps/web-antd/src/views/device/meter/index.vue b/apps/web-antd/src/views/device/meter/index.vue new file mode 100644 index 0000000..9a3e3c8 --- /dev/null +++ b/apps/web-antd/src/views/device/meter/index.vue @@ -0,0 +1,326 @@ + + + diff --git a/apps/web-antd/src/views/device/meter/schema.ts b/apps/web-antd/src/views/device/meter/schema.ts new file mode 100644 index 0000000..ff24414 --- /dev/null +++ b/apps/web-antd/src/views/device/meter/schema.ts @@ -0,0 +1,442 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { computed } from 'vue'; + +import { z } from '@vben/common-ui'; + +import { $t } from '#/locales'; + +export const querySchema = computed(() => [ + { + component: 'Input', + fieldName: 'meterAddress', + label: $t('abp.meters.meterAddress'), + }, +]); +export const meterTypeOptions = [ + { + label: $t('abp.meters.ElectricityMeter'), + value: 1, + }, + { + label: $t('abp.meters.waterMeter'), + value: 2, + }, + { + label: $t('abp.meters.GasMeter'), + value: 3, + }, + { + label: $t('abp.meters.HeatMeter'), + value: 4, + }, + { + label: $t('abp.meters.WaterMeterFlowmeter'), + value: 5, + }, + { + label: $t('abp.meters.GasMeterFlowmeter'), + value: 6, + }, +]; +export const rateOptions = [ + { + label: $t('abp.meters.MultipleRate'), + value: false, + }, + { + label: $t('abp.meters.SingleRate'), + value: true, + }, +]; +export const tableSchema: any = computed((): VxeGridProps['columns'] => [ + { title: $t('common.seq'), type: 'seq', width: 50 }, + { field: 'meterName', title: $t('abp.meters.meterName'), minWidth: '150' }, + { + field: 'meterAddress', + title: $t('abp.meters.meterAddress'), + minWidth: '150', + }, + { + field: 'meterType', + title: $t('abp.meters.meterType'), + minWidth: '150', + slots: { default: 'isMeterType' }, + }, + { + field: 'dynamicPassword', + title: $t('abp.meters.dynamicPassword'), + minWidth: '150', + slots: { default: 'isDynamicPassword' }, + }, + { + field: 'password', + title: $t('abp.meters.password'), + minWidth: '100', + }, + { + field: 'singleRate', + title: $t('abp.meters.singleRate'), + minWidth: '150', + slots: { default: 'isSingleRate' }, + }, + { + field: 'selfDevelop', + title: $t('abp.meters.selfDevelop'), + minWidth: '150', + slots: { default: 'isSelfDevelop' }, + }, + { field: 'brandType', title: $t('abp.meters.brandType'), minWidth: '150' }, + { + field: 'archiveStatus', + title: $t('abp.meters.archiveStatus'), + minWidth: '150', + slots: { default: 'isArchiveStatus' }, + }, + { + field: 'tripState', + title: $t('abp.meters.tripState'), + minWidth: '150', + slots: { default: 'isTripState' }, + }, + { field: 'timesA', title: $t('abp.meters.timesA'), minWidth: '100' }, + { field: 'timev', title: $t('abp.meters.timev'), minWidth: '100' }, + { + field: 'haveValve', + title: $t('abp.meters.haveValve'), + minWidth: '150', + slots: { default: 'isHaveValve' }, + }, + { + field: 'enabled', + title: $t('common.isEnable'), + minWidth: '150', + slots: { default: 'isEnable' }, + }, + { + title: $t('common.action'), + field: 'action', + fixed: 'right', + width: '150', + slots: { default: 'action' }, + }, +]); + +export const addUserFormSchema: any = computed(() => [ + { + component: 'Input', + fieldName: 'meterName', + label: $t('abp.meters.meterName'), + rules: z.string().min(1, { + message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.meters.meterName')}`, + }), + }, + { + component: 'Input', + fieldName: 'meterAddress', + label: $t('abp.meters.meterAddress'), + rules: z + .string() + .min(1, { + message: `${$t('common.pleaseInput')}${$t('common.numberType')}${$t('abp.meters.meterAddress')}`, + }) + .refine((value) => /^\d+$/.test(value), { + message: $t('abp.meters.checkmeterAddress'), + }), + }, + { + component: 'Select', + componentProps: { + allowClear: true, + options: meterTypeOptions, + placeholder: `${$t('common.pleaseSelect')}${$t('abp.meters.meterType')}`, + }, + fieldName: 'meterType', + label: $t('abp.meters.meterType'), + rules: z + .number() + .min(1, { + message: `${$t('common.pleaseSelect')}${$t('abp.meters.meterType')}`, + }) + .default(1), + }, + { + component: 'Select', + componentProps: { + allowClear: true, + options: rateOptions, + placeholder: `${$t('common.pleaseSelect')}${$t('abp.meters.singleRate')}`, + }, + dependencies: { + show(values: any) { + return values.meterType === 1; + }, + rules(values: any) { + if (values.meterType === 1) { + return 'required'; + } + return null; + }, + triggerFields: ['meterType'], + }, + fieldName: 'singleRate', + label: $t('abp.meters.singleRate'), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'selfDevelop', + label: $t('abp.meters.selfDevelop'), + }, + { + component: 'Input', + fieldName: 'brandType', + label: $t('abp.meters.brandType'), + rules: z.string().optional(), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'dynamicPassword', + label: $t('abp.meters.dynamicPassword'), + }, + { + component: 'Input', + fieldName: 'password', + label: $t('abp.meters.password'), + rules: z.string().optional(), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + dependencies: { + show(values: any) { + return values.meterType === 2; + }, + triggerFields: ['meterType'], + }, + fieldName: 'haveValve', + label: $t('abp.meters.haveValve'), + }, + { + component: 'Input', + fieldName: 'timesA', + label: $t('abp.meters.timesA'), + componentProps: { + allowClear: true, + placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.timesA')}`, + }, + dependencies: { + show(values: any) { + return values.meterType === 1; + }, + triggerFields: ['meterType'], + }, + rules: z + .string({ + message: `${$t('common.pleaseInput')}${$t('abp.meters.timesA')}`, + }) + .default('1'), + }, + { + component: 'Input', + fieldName: 'timev', + label: $t('abp.meters.timev'), + componentProps: { + allowClear: true, + placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.timev')}`, + }, + dependencies: { + show(values: any) { + return values.meterType === 1; + }, + triggerFields: ['meterType'], + }, + rules: z + .string({ + message: `${$t('common.pleaseInput')}${$t('abp.meters.timesA')}`, + }) + .default('1'), + }, + { + component: 'Input', + fieldName: 'meteringCode', + label: $t('abp.meters.meteringCode'), + componentProps: { + allowClear: true, + placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`, + }, + rules: z + .string({ + message: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`, + }) + .default('1'), + }, +]); + +export const editUserFormSchemaEdit: any = computed(() => [ + { + component: 'Input', + fieldName: 'meterName', + label: $t('abp.meters.meterName'), + rules: z.string().min(1, { + message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.meters.meterName')}`, + }), + }, + { + component: 'Input', + fieldName: 'meterAddress', + label: $t('abp.meters.meterAddress'), + rules: z + .string() + .min(1, { + message: `${$t('common.pleaseInput')}${$t('common.numberType')}${$t('abp.meters.meterAddress')}`, + }) + .refine((value) => /^\d+$/.test(value), { + message: $t('abp.meters.checkmeterAddress'), + }), + }, + { + component: 'Select', + componentProps: { + allowClear: true, + options: meterTypeOptions, + placeholder: `${$t('common.pleaseSelect')}${$t('abp.meters.meterType')}`, + }, + fieldName: 'meterType', + label: $t('abp.meters.meterType'), + rules: z + .number() + .min(1, { + message: `${$t('common.pleaseSelect')}${$t('abp.meters.meterType')}`, + }) + .default(1), + }, + { + component: 'Select', + componentProps: { + allowClear: true, + options: rateOptions, + placeholder: `${$t('common.pleaseSelect')}${$t('abp.meters.singleRate')}`, + }, + dependencies: { + show(values: any) { + return values.meterType === 1; + }, + rules(values: any) { + if (values.meterType === 1) { + return 'required'; + } + return null; + }, + triggerFields: ['meterType'], + }, + fieldName: 'singleRate', + label: $t('abp.meters.singleRate'), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'selfDevelop', + label: $t('abp.meters.selfDevelop'), + }, + { + component: 'Input', + fieldName: 'brandType', + label: $t('abp.meters.brandType'), + rules: z.string().optional(), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + fieldName: 'dynamicPassword', + label: $t('abp.meters.dynamicPassword'), + }, + { + component: 'Input', + fieldName: 'password', + label: $t('abp.meters.password'), + rules: z.string().optional(), + }, + { + component: 'Switch', + componentProps: { + class: 'w-auto', + }, + dependencies: { + show(values: any) { + return values.meterType === 2; + }, + triggerFields: ['meterType'], + }, + fieldName: 'haveValve', + label: $t('abp.meters.haveValve'), + }, + { + component: 'Input', + fieldName: 'timesA', + label: $t('abp.meters.timesA'), + componentProps: { + allowClear: true, + placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.timesA')}`, + }, + dependencies: { + show(values: any) { + return values.meterType === 1; + }, + triggerFields: ['meterType'], + }, + rules: z + .string({ + message: `${$t('common.pleaseInput')}${$t('abp.meters.timesA')}`, + }) + .default('1'), + }, + { + component: 'Input', + fieldName: 'timev', + label: $t('abp.meters.timev'), + componentProps: { + allowClear: true, + placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.timev')}`, + }, + dependencies: { + show(values: any) { + return values.meterType === 1; + }, + triggerFields: ['meterType'], + }, + rules: z + .string({ + message: `${$t('common.pleaseInput')}${$t('abp.meters.timev')}`, + }) + .default('1'), + }, + { + component: 'Input', + fieldName: 'meteringCode', + label: $t('abp.meters.meteringCode'), + componentProps: { + allowClear: true, + placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`, + }, + rules: z + .string({ + message: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`, + }) + .min(1, { + message: `${$t('common.MustGreaterTthan0')}`, + }) + .default('1'), + }, +]);