From 73c66e6b3807cda398cf9b1937c78e691b3365bd Mon Sep 17 00:00:00 2001
From: ChenYi <296215406@outlook.com>
Date: Wed, 30 Jul 2025 11:29:39 +0800
Subject: [PATCH] =?UTF-8?q?CTWing=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/web-antd/src/api-client/schemas.gen.ts | 1407 ++++++++---------
apps/web-antd/src/api-client/services.gen.ts | 158 +-
apps/web-antd/src/api-client/types.gen.ts | 912 ++++++-----
.../web-antd/src/locales/langs/en-US/abp.json | 22 +
.../web-antd/src/locales/langs/zh-CN/abp.json | 22 +
.../views/ctwingmanagement/account/index.vue | 150 +-
.../views/ctwingmanagement/account/schema.ts | 437 +----
.../ctwingmanagement/privateProduct/index.vue | 348 ++--
.../ctwingmanagement/privateProduct/schema.ts | 678 ++++----
9 files changed, 1898 insertions(+), 2236 deletions(-)
diff --git a/apps/web-antd/src/api-client/schemas.gen.ts b/apps/web-antd/src/api-client/schemas.gen.ts
index 3c13839..6f5de4e 100644
--- a/apps/web-antd/src/api-client/schemas.gen.ts
+++ b/apps/web-antd/src/api-client/schemas.gen.ts
@@ -15,6 +15,13 @@ export const AbpLoginResultSchema = {
additionalProperties: false
} as const;
+export const AccessTypeEnumSchema = {
+ enum: [1, 2, 3, 5],
+ type: 'integer',
+ format: 'int32',
+ '说明:': '设备直连=1,网关接入=2,南向云接入=3,5G定制网=5'
+} as const;
+
export const ActionApiDescriptionModelSchema = {
type: 'object',
properties: {
@@ -130,25 +137,6 @@ export const AddUserToOrganizationUnitInputSchema = {
additionalProperties: false
} as const;
-export const AggregateRouteConfigSchema = {
- type: 'object',
- properties: {
- routeKey: {
- type: 'string',
- nullable: true
- },
- parameter: {
- type: 'string',
- nullable: true
- },
- jsonPath: {
- type: 'string',
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
export const ApplicationApiDescriptionModelSchema = {
type: 'object',
properties: {
@@ -443,6 +431,578 @@ export const ArchivalDataIssuedInputSchema = {
additionalProperties: false
} as const;
+export const AuthTypeEnumSchema = {
+ enum: [1, 2, 3, 4, 6, 7, 8, 9],
+ type: 'integer',
+ format: 'int32',
+ '说明:': '特征串认证=1,SM9认证=2,证书认证=3,IMEI认证=4,SM2认证=6,IPV6标识认证=7,HTTP基本认证=8,HTTP摘要认证=9'
+} as const;
+
+export const CTWingAccountInfoDtoSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ format: 'uuid'
+ },
+ creationTime: {
+ type: 'string',
+ format: 'date-time'
+ },
+ creatorId: {
+ type: 'string',
+ format: 'uuid',
+ nullable: true
+ },
+ lastModificationTime: {
+ type: 'string',
+ format: 'date-time',
+ nullable: true
+ },
+ lastModifierId: {
+ type: 'string',
+ format: 'uuid',
+ nullable: true
+ },
+ isDeleted: {
+ type: 'boolean'
+ },
+ deleterId: {
+ type: 'string',
+ format: 'uuid',
+ nullable: true
+ },
+ deletionTime: {
+ type: 'string',
+ format: 'date-time',
+ nullable: true
+ },
+ tenantId: {
+ type: 'string',
+ description: '租户Id',
+ format: 'uuid',
+ nullable: true
+ },
+ remark: {
+ type: 'string',
+ description: '备注',
+ nullable: true
+ },
+ osaCreatorId: {
+ type: 'integer',
+ description: '旧系统授权创建者Id',
+ format: 'int32',
+ nullable: true
+ },
+ osaLastModifierId: {
+ type: 'integer',
+ description: '旧系统授权最后修改者Id',
+ format: 'int32',
+ nullable: true
+ },
+ osaDeleterId: {
+ type: 'integer',
+ description: '旧系统授权最后删除者Id',
+ format: 'int32',
+ nullable: true
+ },
+ extraProperties: {
+ type: 'object',
+ additionalProperties: {},
+ description: '扩展属性,用于存储自定义字段,JSON格式',
+ nullable: true
+ },
+ accountName: {
+ type: 'string',
+ description: '账号名称',
+ nullable: true
+ },
+ accountId: {
+ type: 'string',
+ description: '账号ID',
+ nullable: true
+ },
+ appId: {
+ type: 'string',
+ description: '应用 ID,最小单位,唯一标识,因为一个账号下可能存在多个应用',
+ nullable: true
+ },
+ appKey: {
+ type: 'string',
+ description: '应用 AppKey',
+ nullable: true
+ },
+ appSecret: {
+ type: 'string',
+ description: '应用 AppSecret',
+ nullable: true
+ },
+ platformTenantId: {
+ type: 'string',
+ description: '平台租户ID',
+ nullable: true
+ },
+ communicationAddress: {
+ type: 'string',
+ description: '通讯服务地址',
+ nullable: true
+ },
+ phoneNumber: {
+ type: 'string',
+ description: '手机号码',
+ nullable: true
+ },
+ productCount: {
+ type: 'integer',
+ description: '产品数量',
+ format: 'int32'
+ }
+ },
+ additionalProperties: false,
+ description: 'CTWing账号信息'
+} as const;
+
+export const CTWingAccountInfoDtoPagedResultDtoSchema = {
+ type: 'object',
+ properties: {
+ items: {
+ type: 'array',
+ items: {
+ '$ref': '#/components/schemas/CTWingAccountInfoDto'
+ },
+ nullable: true
+ },
+ totalCount: {
+ type: 'integer',
+ format: 'int64'
+ }
+ },
+ additionalProperties: false
+} as const;
+
+export const CTWingAccountInsertInputSchema = {
+ required: ['accountId', 'appId', 'appKey', 'appSecret', 'communicationAddress', 'platformTenantId'],
+ type: 'object',
+ properties: {
+ accountName: {
+ type: 'string',
+ description: '账号名称',
+ nullable: true
+ },
+ accountId: {
+ minLength: 1,
+ type: 'string',
+ description: '账号ID'
+ },
+ appId: {
+ minLength: 1,
+ type: 'string',
+ description: '应用 ID,最小单位,唯一标识,因为一个账号下可能存在多个应用'
+ },
+ appKey: {
+ minLength: 1,
+ type: 'string',
+ description: '应用 AppKey'
+ },
+ appSecret: {
+ minLength: 1,
+ type: 'string',
+ description: '应用 AppSecret'
+ },
+ platformTenantId: {
+ minLength: 1,
+ type: 'string',
+ description: '平台租户ID'
+ },
+ communicationAddress: {
+ minLength: 1,
+ type: 'string',
+ description: '通讯服务地址'
+ },
+ phoneNumber: {
+ type: 'string',
+ description: '手机号码',
+ nullable: true
+ }
+ },
+ additionalProperties: false,
+ description: '添加账号'
+} as const;
+
+export const CTWingAccountListInputSchema = {
+ type: 'object',
+ additionalProperties: false,
+ description: '账号列表输入参数'
+} as const;
+
+export const CTWingAccountModifyInputSchema = {
+ required: ['accountId', 'appId', 'appKey', 'appSecret', 'communicationAddress', 'platformTenantId'],
+ type: 'object',
+ properties: {
+ accountName: {
+ type: 'string',
+ description: '账号名称',
+ nullable: true
+ },
+ accountId: {
+ minLength: 1,
+ type: 'string',
+ description: '账号ID'
+ },
+ appId: {
+ minLength: 1,
+ type: 'string',
+ description: '应用 ID,最小单位,唯一标识,因为一个账号下可能存在多个应用'
+ },
+ appKey: {
+ minLength: 1,
+ type: 'string',
+ description: '应用 AppKey'
+ },
+ appSecret: {
+ minLength: 1,
+ type: 'string',
+ description: '应用 AppSecret'
+ },
+ platformTenantId: {
+ minLength: 1,
+ type: 'string',
+ description: '平台租户ID'
+ },
+ communicationAddress: {
+ minLength: 1,
+ type: 'string',
+ description: '通讯服务地址'
+ },
+ phoneNumber: {
+ type: 'string',
+ description: '手机号码',
+ nullable: true
+ },
+ id: {
+ type: 'string',
+ description: '数据ID',
+ format: 'uuid'
+ }
+ },
+ additionalProperties: false,
+ description: '修改账号信息'
+} as const;
+
+export const CTWingPrivateProductInfoDtoSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ format: 'uuid'
+ },
+ creationTime: {
+ type: 'string',
+ format: 'date-time'
+ },
+ creatorId: {
+ type: 'string',
+ format: 'uuid',
+ nullable: true
+ },
+ lastModificationTime: {
+ type: 'string',
+ format: 'date-time',
+ nullable: true
+ },
+ lastModifierId: {
+ type: 'string',
+ format: 'uuid',
+ nullable: true
+ },
+ isDeleted: {
+ type: 'boolean'
+ },
+ deleterId: {
+ type: 'string',
+ format: 'uuid',
+ nullable: true
+ },
+ deletionTime: {
+ type: 'string',
+ format: 'date-time',
+ nullable: true
+ },
+ tenantId: {
+ type: 'string',
+ description: '租户Id',
+ format: 'uuid',
+ nullable: true
+ },
+ remark: {
+ type: 'string',
+ description: '备注',
+ nullable: true
+ },
+ osaCreatorId: {
+ type: 'integer',
+ description: '旧系统授权创建者Id',
+ format: 'int32',
+ nullable: true
+ },
+ osaLastModifierId: {
+ type: 'integer',
+ description: '旧系统授权最后修改者Id',
+ format: 'int32',
+ nullable: true
+ },
+ osaDeleterId: {
+ type: 'integer',
+ description: '旧系统授权最后删除者Id',
+ format: 'int32',
+ nullable: true
+ },
+ extraProperties: {
+ type: 'object',
+ additionalProperties: {},
+ description: '扩展属性,用于存储自定义字段,JSON格式',
+ nullable: true
+ },
+ ctWingAccountId: {
+ type: 'string',
+ description: '账号ID',
+ nullable: true
+ },
+ communicationAddress: {
+ type: 'string',
+ description: '通讯服务地址',
+ nullable: true
+ },
+ masterKey: {
+ type: 'string',
+ description: 'OpenAPI 通信主密钥',
+ nullable: true
+ },
+ featureAccesskey: {
+ type: 'string',
+ description: '设备访问密钥',
+ nullable: true
+ },
+ ioTPlatformProductId: {
+ type: 'integer',
+ description: '产品ID',
+ format: 'int32'
+ },
+ productName: {
+ type: 'string',
+ description: '产品名称',
+ nullable: true
+ },
+ protocol: {
+ type: 'string',
+ description: '通讯协议',
+ nullable: true
+ },
+ productDesc: {
+ type: 'string',
+ description: '必填,产品描述',
+ nullable: true
+ },
+ productType: {
+ type: 'string',
+ description: '必填,一级分类名,返回结果中,此字段名数据类型为Int类型',
+ nullable: true
+ },
+ secondaryType: {
+ type: 'string',
+ description: '必填,二级分类名,返回结果中,此字段名数据类型为Int类型',
+ nullable: true
+ },
+ thirdType: {
+ type: 'string',
+ description: '必填,三级分类名,返回结果中,此字段名数据类型为Int类型',
+ nullable: true
+ },
+ nodeType: {
+ '$ref': '#/components/schemas/ProductNodeTypeEnum'
+ },
+ accessType: {
+ '$ref': '#/components/schemas/AccessTypeEnum'
+ },
+ networkType: {
+ '$ref': '#/components/schemas/NetworkTypeEnum'
+ },
+ productProtocol: {
+ '$ref': '#/components/schemas/ProductProtocolEnum'
+ },
+ authType: {
+ '$ref': '#/components/schemas/AuthTypeEnum'
+ },
+ dataEncryption: {
+ '$ref': '#/components/schemas/DataEncryptionEnum'
+ },
+ tupIsThrough: {
+ '$ref': '#/components/schemas/TupIsThroughEnum'
+ },
+ tupDeviceModel: {
+ type: 'string',
+ description: '必填,设备型号',
+ nullable: true
+ },
+ deviceCount: {
+ type: 'integer',
+ description: '设备数量',
+ format: 'int32'
+ },
+ deviceThingModelFileId: {
+ type: 'string',
+ description: '设备物模型文件Id',
+ nullable: true
+ },
+ deviceThingModelFileName: {
+ type: 'string',
+ description: '设备物模型文件名称',
+ nullable: true
+ },
+ isEnabled: {
+ type: 'boolean',
+ description: '是否启用'
+ }
+ },
+ additionalProperties: false,
+ description: 'CTWing私有产品信息'
+} as const;
+
+export const CTWingPrivateProductInfoDtoPagedResultDtoSchema = {
+ type: 'object',
+ properties: {
+ items: {
+ type: 'array',
+ items: {
+ '$ref': '#/components/schemas/CTWingPrivateProductInfoDto'
+ },
+ nullable: true
+ },
+ totalCount: {
+ type: 'integer',
+ format: 'int64'
+ }
+ },
+ additionalProperties: false
+} as const;
+
+export const CTWingPrivateProductInfoInsertInputSchema = {
+ type: 'object',
+ properties: {
+ ctWingAccountId: {
+ type: 'string',
+ description: '账号ID',
+ nullable: true
+ },
+ productName: {
+ type: 'string',
+ description: '产品名称',
+ nullable: true
+ },
+ productDesc: {
+ type: 'string',
+ description: '必填,产品描述',
+ nullable: true
+ },
+ deviceThingModelFileId: {
+ type: 'string',
+ description: '设备物模型文件Id',
+ nullable: true
+ },
+ deviceThingModelFileName: {
+ type: 'string',
+ description: '设备物模型文件名称',
+ nullable: true
+ }
+ },
+ additionalProperties: false,
+ description: '添加私有产品信息'
+} as const;
+
+export const CTWingPrivateProductInfoListInputSchema = {
+ 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
+ },
+ ctWingAccountId: {
+ type: 'string',
+ description: 'CTWing账户Id',
+ nullable: true
+ },
+ productName: {
+ type: 'string',
+ description: '产品名称',
+ nullable: true
+ },
+ model: {
+ type: 'string',
+ description: '产品型号',
+ nullable: true
+ }
+ },
+ additionalProperties: false
+} as const;
+
+export const CTWingPrivateProductInfoModifyInputSchema = {
+ type: 'object',
+ properties: {
+ ctWingAccountId: {
+ type: 'string',
+ description: '账号ID',
+ nullable: true
+ },
+ productName: {
+ type: 'string',
+ description: '产品名称',
+ nullable: true
+ },
+ productDesc: {
+ type: 'string',
+ description: '必填,产品描述',
+ nullable: true
+ },
+ deviceThingModelFileId: {
+ type: 'string',
+ description: '设备物模型文件Id',
+ nullable: true
+ },
+ deviceThingModelFileName: {
+ type: 'string',
+ description: '设备物模型文件名称',
+ nullable: true
+ },
+ id: {
+ type: 'string',
+ description: '数据ID',
+ format: 'uuid'
+ }
+ },
+ additionalProperties: false,
+ description: 'CTWing 产品修改'
+} as const;
+
export const ChangePasswordInputSchema = {
required: ['newPassword'],
type: 'object',
@@ -584,28 +1144,6 @@ export const CreateDataDictinaryInputSchema = {
additionalProperties: false
} as const;
-export const CreateDeviceAggregationInputSchema = {
- required: ['deviceAddress', 'ioTPlatform', 'ioTPlatformProductId'],
- type: 'object',
- properties: {
- deviceAddress: {
- minLength: 1,
- type: 'string',
- description: '表通信地址'
- },
- ioTPlatform: {
- '$ref': '#/components/schemas/IoTPlatformTypeEnum'
- },
- ioTPlatformProductId: {
- minLength: 1,
- type: 'string',
- description: '集中器在物联网平台中对应的产品Id'
- }
- },
- additionalProperties: false,
- description: '设备聚合新增设备'
-} as const;
-
export const CreateLanguageInputSchema = {
type: 'object',
properties: {
@@ -923,6 +1461,14 @@ export const CurrentUserDtoSchema = {
additionalProperties: false
} as const;
+export const DataEncryptionEnumSchema = {
+ enum: [1, 2, 3, 4, 5, 6],
+ type: 'integer',
+ description: '数据加密方式',
+ format: 'int32',
+ '说明:': 'sm1=1,sm2=2,sm4=3,dtls=4,明文(只支持MQTT/LWM2M)=5,量子加密=6'
+} as const;
+
export const DateTimeFormatDtoSchema = {
type: 'object',
properties: {
@@ -1835,231 +2381,6 @@ export const FeatureProviderDtoSchema = {
additionalProperties: false
} as const;
-export const FileAggregateRouteSchema = {
- type: 'object',
- properties: {
- routeKeys: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true
- },
- routeKeysConfig: {
- type: 'array',
- items: {
- '$ref': '#/components/schemas/AggregateRouteConfig'
- },
- nullable: true
- },
- upstreamPathTemplate: {
- type: 'string',
- nullable: true
- },
- upstreamHost: {
- type: 'string',
- nullable: true
- },
- routeIsCaseSensitive: {
- type: 'boolean'
- },
- aggregator: {
- type: 'string',
- nullable: true
- },
- upstreamHttpMethod: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true,
- readOnly: true
- },
- priority: {
- type: 'integer',
- format: 'int32'
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileAuthenticationOptionsSchema = {
- type: 'object',
- properties: {
- authenticationProviderKey: {
- type: 'string',
- nullable: true
- },
- allowedScopes: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileCacheOptionsSchema = {
- type: 'object',
- properties: {
- ttlSeconds: {
- type: 'integer',
- format: 'int32'
- },
- region: {
- type: 'string',
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileConfigurationSchema = {
- type: 'object',
- properties: {
- routes: {
- type: 'array',
- items: {
- '$ref': '#/components/schemas/FileRoute'
- },
- nullable: true
- },
- dynamicRoutes: {
- type: 'array',
- items: {
- '$ref': '#/components/schemas/FileDynamicRoute'
- },
- nullable: true
- },
- aggregates: {
- type: 'array',
- items: {
- '$ref': '#/components/schemas/FileAggregateRoute'
- },
- nullable: true
- },
- globalConfiguration: {
- '$ref': '#/components/schemas/FileGlobalConfiguration'
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileDynamicRouteSchema = {
- type: 'object',
- properties: {
- serviceName: {
- type: 'string',
- nullable: true
- },
- rateLimitRule: {
- '$ref': '#/components/schemas/FileRateLimitRule'
- },
- downstreamHttpVersion: {
- type: 'string',
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileGlobalConfigurationSchema = {
- type: 'object',
- properties: {
- requestIdKey: {
- type: 'string',
- nullable: true
- },
- serviceDiscoveryProvider: {
- '$ref': '#/components/schemas/FileServiceDiscoveryProvider'
- },
- rateLimitOptions: {
- '$ref': '#/components/schemas/FileRateLimitOptions'
- },
- qoSOptions: {
- '$ref': '#/components/schemas/FileQoSOptions'
- },
- baseUrl: {
- type: 'string',
- nullable: true
- },
- loadBalancerOptions: {
- '$ref': '#/components/schemas/FileLoadBalancerOptions'
- },
- downstreamScheme: {
- type: 'string',
- nullable: true
- },
- httpHandlerOptions: {
- '$ref': '#/components/schemas/FileHttpHandlerOptions'
- },
- downstreamHttpVersion: {
- type: 'string',
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileHostAndPortSchema = {
- type: 'object',
- properties: {
- host: {
- type: 'string',
- nullable: true
- },
- port: {
- type: 'integer',
- format: 'int32'
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileHttpHandlerOptionsSchema = {
- type: 'object',
- properties: {
- allowAutoRedirect: {
- type: 'boolean'
- },
- useCookieContainer: {
- type: 'boolean'
- },
- useTracing: {
- type: 'boolean'
- },
- useProxy: {
- type: 'boolean'
- },
- maxConnectionsPerServer: {
- type: 'integer',
- format: 'int32'
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileLoadBalancerOptionsSchema = {
- type: 'object',
- properties: {
- type: {
- type: 'string',
- nullable: true
- },
- key: {
- type: 'string',
- nullable: true
- },
- expiry: {
- type: 'integer',
- format: 'int32'
- }
- },
- additionalProperties: false
-} as const;
-
export const FileObjectDtoSchema = {
type: 'object',
properties: {
@@ -2093,299 +2414,6 @@ export const FileObjectDtoSchema = {
description: '文件'
} as const;
-export const FileQoSOptionsSchema = {
- type: 'object',
- properties: {
- exceptionsAllowedBeforeBreaking: {
- type: 'integer',
- format: 'int32'
- },
- durationOfBreak: {
- type: 'integer',
- format: 'int32'
- },
- timeoutValue: {
- type: 'integer',
- format: 'int32'
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileRateLimitOptionsSchema = {
- type: 'object',
- properties: {
- clientIdHeader: {
- type: 'string',
- nullable: true
- },
- quotaExceededMessage: {
- type: 'string',
- nullable: true
- },
- rateLimitCounterPrefix: {
- type: 'string',
- nullable: true
- },
- disableRateLimitHeaders: {
- type: 'boolean'
- },
- httpStatusCode: {
- type: 'integer',
- format: 'int32'
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileRateLimitRuleSchema = {
- type: 'object',
- properties: {
- clientWhitelist: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true
- },
- enableRateLimiting: {
- type: 'boolean'
- },
- period: {
- type: 'string',
- nullable: true
- },
- periodTimespan: {
- type: 'number',
- format: 'double'
- },
- limit: {
- type: 'integer',
- format: 'int64'
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileRouteSchema = {
- type: 'object',
- properties: {
- downstreamPathTemplate: {
- type: 'string',
- nullable: true
- },
- upstreamPathTemplate: {
- type: 'string',
- nullable: true
- },
- upstreamHttpMethod: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true
- },
- downstreamHttpMethod: {
- type: 'string',
- nullable: true
- },
- addHeadersToRequest: {
- type: 'object',
- additionalProperties: {
- type: 'string',
- nullable: true
- },
- nullable: true
- },
- upstreamHeaderTransform: {
- type: 'object',
- additionalProperties: {
- type: 'string',
- nullable: true
- },
- nullable: true
- },
- downstreamHeaderTransform: {
- type: 'object',
- additionalProperties: {
- type: 'string',
- nullable: true
- },
- nullable: true
- },
- addClaimsToRequest: {
- type: 'object',
- additionalProperties: {
- type: 'string',
- nullable: true
- },
- nullable: true
- },
- routeClaimsRequirement: {
- type: 'object',
- additionalProperties: {
- type: 'string',
- nullable: true
- },
- nullable: true
- },
- addQueriesToRequest: {
- type: 'object',
- additionalProperties: {
- type: 'string',
- nullable: true
- },
- nullable: true
- },
- changeDownstreamPathTemplate: {
- type: 'object',
- additionalProperties: {
- type: 'string',
- nullable: true
- },
- nullable: true
- },
- requestIdKey: {
- type: 'string',
- nullable: true
- },
- fileCacheOptions: {
- '$ref': '#/components/schemas/FileCacheOptions'
- },
- routeIsCaseSensitive: {
- type: 'boolean'
- },
- serviceName: {
- type: 'string',
- nullable: true
- },
- serviceNamespace: {
- type: 'string',
- nullable: true
- },
- downstreamScheme: {
- type: 'string',
- nullable: true
- },
- qoSOptions: {
- '$ref': '#/components/schemas/FileQoSOptions'
- },
- loadBalancerOptions: {
- '$ref': '#/components/schemas/FileLoadBalancerOptions'
- },
- rateLimitOptions: {
- '$ref': '#/components/schemas/FileRateLimitRule'
- },
- authenticationOptions: {
- '$ref': '#/components/schemas/FileAuthenticationOptions'
- },
- httpHandlerOptions: {
- '$ref': '#/components/schemas/FileHttpHandlerOptions'
- },
- downstreamHostAndPorts: {
- type: 'array',
- items: {
- '$ref': '#/components/schemas/FileHostAndPort'
- },
- nullable: true
- },
- upstreamHost: {
- type: 'string',
- nullable: true
- },
- key: {
- type: 'string',
- nullable: true
- },
- delegatingHandlers: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true
- },
- priority: {
- type: 'integer',
- format: 'int32'
- },
- timeout: {
- type: 'integer',
- format: 'int32'
- },
- dangerousAcceptAnyServerCertificateValidator: {
- type: 'boolean'
- },
- securityOptions: {
- '$ref': '#/components/schemas/FileSecurityOptions'
- },
- downstreamHttpVersion: {
- type: 'string',
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileSecurityOptionsSchema = {
- type: 'object',
- properties: {
- ipAllowedList: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true
- },
- ipBlockedList: {
- type: 'array',
- items: {
- type: 'string'
- },
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
-export const FileServiceDiscoveryProviderSchema = {
- type: 'object',
- properties: {
- scheme: {
- type: 'string',
- nullable: true
- },
- host: {
- type: 'string',
- nullable: true
- },
- port: {
- type: 'integer',
- format: 'int32'
- },
- type: {
- type: 'string',
- nullable: true
- },
- token: {
- type: 'string',
- nullable: true
- },
- configurationKey: {
- type: 'string',
- nullable: true
- },
- pollingInterval: {
- type: 'integer',
- format: 'int32'
- },
- namespace: {
- type: 'string',
- nullable: true
- }
- },
- additionalProperties: false
-} as const;
-
export const FindByUserNameInputSchema = {
type: 'object',
properties: {
@@ -2873,44 +2901,6 @@ export const GetUnAddUserOutputPagedResultDtoSchema = {
additionalProperties: false
} as const;
-export const HttpDataResultSchema = {
- type: 'object',
- properties: {
- code: {
- '$ref': '#/components/schemas/ResponeResultEnum'
- },
- msg: {
- type: 'string',
- description: '详细描述',
- nullable: true
- },
- success: {
- type: 'boolean',
- description: `是否获取到数据或者逻辑处理成功
-服务内部判断状态采用此属性`
- },
- timestamp: {
- type: 'integer',
- description: '时间戳(毫秒)',
- format: 'int64',
- readOnly: true
- },
- locationCode: {
- type: 'integer',
- description: `位置编码,主要用于接口请求逻辑定位
-使用时必须保证每个请求中不重复出现`,
- format: 'int32'
- },
- extras: {
- type: 'string',
- description: '扩展信息',
- nullable: true
- }
- },
- additionalProperties: false,
- description: 'HTTP 请求返回结果'
-} as const;
-
export const HttpStatusCodeSchema = {
enum: [100, 101, 102, 103, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511],
type: 'integer',
@@ -4187,6 +4177,14 @@ export const NeedChangePasswordOutputSchema = {
additionalProperties: false
} as const;
+export const NetworkTypeEnumSchema = {
+ enum: [1, 2, 3, 4, 5, 6],
+ type: 'integer',
+ description: '网络类型',
+ format: 'int32',
+ '说明:': 'WIFI=1,移动蜂窝数据=2,NB-IoT=3,以太网=4,蓝牙=5,ZigBee=6'
+} as const;
+
export const NodeTypeEnumSchema = {
enum: [1, 2, 3],
type: 'integer',
@@ -4815,143 +4813,6 @@ export const OneNetProductInfoModifyInputSchema = {
description: '修改OneNET产品'
} as const;
-export const OneNetWorkshopProductListOutputSchema = {
- type: 'object',
- properties: {
- nonce: {
- type: 'string',
- description: '用于计算签名字符的随机串',
- nullable: true
- },
- signature: {
- type: 'string',
- description: '加密签名,用以校验推送客户端身份合法性,校验方法见实例验证',
- nullable: true
- },
- timestamp: {
- type: 'integer',
- description: '签名有效期(毫秒)',
- format: 'int64'
- },
- msg: {
- type: 'string',
- description: '消息内容,JSON字符串,具体的设备相关信息',
- nullable: true
- },
- oneNETAccountId: {
- type: 'string',
- description: 'OneNET账户Id',
- nullable: true
- },
- ioTPlatformProductId: {
- type: 'string',
- description: '物联网平台对应的产品Id',
- nullable: true
- },
- productName: {
- type: 'string',
- description: '产品名称',
- nullable: true
- },
- productAccesskey: {
- type: 'string',
- description: '产品访问密钥',
- nullable: true
- },
- communicationAddress: {
- type: 'string',
- description: '通讯服务地址',
- nullable: true
- },
- communicationAddressTLS: {
- type: 'string',
- description: 'TLS通讯服务地址',
- nullable: true
- }
- },
- additionalProperties: false,
- description: '生产车间获取OneNET产品列表'
-} as const;
-
-export const OneNetWorkshopProductListOutputListHttpDataResultSchema = {
- type: 'object',
- properties: {
- code: {
- '$ref': '#/components/schemas/ResponeResultEnum'
- },
- msg: {
- type: 'string',
- description: '详细描述',
- nullable: true
- },
- success: {
- type: 'boolean',
- description: `是否获取到数据或者逻辑处理成功
-服务内部判断状态采用此属性`
- },
- timestamp: {
- type: 'integer',
- description: '时间戳(毫秒)',
- format: 'int64',
- readOnly: true
- },
- locationCode: {
- type: 'integer',
- description: `位置编码,主要用于接口请求逻辑定位
-使用时必须保证每个请求中不重复出现`,
- format: 'int32'
- },
- extras: {
- type: 'string',
- description: '扩展信息',
- nullable: true
- },
- data: {
- type: 'array',
- items: {
- '$ref': '#/components/schemas/OneNetWorkshopProductListOutput'
- },
- description: '扩展字段',
- nullable: true
- },
- total: {
- type: 'integer',
- description: '总数',
- format: 'int64'
- }
- },
- additionalProperties: false,
- description: 'HTTP 请求返回结果'
-} as const;
-
-export const OpenApiRequestSchema = {
- type: 'object',
- properties: {
- nonce: {
- type: 'string',
- description: '用于计算签名字符的随机串',
- nullable: true
- },
- signature: {
- type: 'string',
- description: '加密签名,用以校验推送客户端身份合法性,校验方法见实例验证',
- nullable: true
- },
- timestamp: {
- type: 'integer',
- description: '签名有效期(毫秒)',
- format: 'int64'
- },
- msg: {
- type: 'string',
- description: '消息内容,JSON字符串,具体的设备相关信息',
- nullable: true
- }
- },
- additionalProperties: false,
- description: '开放接口请求入参,所有外部接口请求参数'
-} as const;
-
export const OpenTypeSchema = {
enum: [10, 20, 30, 40],
type: 'integer',
@@ -7014,6 +6875,22 @@ export const PermissionTreeDtoSchema = {
additionalProperties: false
} as const;
+export const ProductNodeTypeEnumSchema = {
+ enum: [1, 2],
+ type: 'integer',
+ description: '产品节点类型',
+ format: 'int32',
+ '说明:': 'Device=1,Gateway=2'
+} as const;
+
+export const ProductProtocolEnumSchema = {
+ enum: [1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
+ type: 'integer',
+ description: '产品协议',
+ format: 'int32',
+ '说明:': 'tlink=1,MQTT=2,LWM2M=3,HTTP=5,JT/T808=6,TCP=7,TCP私有=8,UDP私有=9,MQTT(网关设备)=10,南向云对接=11,MQTT(网关子设备协议)=12,蓝牙(网关子设备协议)=13,ZigBee(网关子设备协议)=14,其他(网关子设备协议)=15,Modbus=16,gb28181=17,GA/T1400=18,ehome=19,UDP=20,TR069=21,GBT_26875_2011=22,银通TCP=23,COAP协议=24,FACP人脸门禁协议=25,ACCP协议=26,FIIA协议=27,SnapEx协议=28,CameraV协议=29,AIVP协议=30'
+} as const;
+
export const ProductStatusEnumSchema = {
enum: [1, 2, 3, 4, 5],
type: 'integer',
@@ -7634,14 +7511,6 @@ export const ResetTwoFactorInputSchema = {
additionalProperties: false
} as const;
-export const ResponeResultEnumSchema = {
- enum: [0, 1, 2, 3, 4, 5, 6, 200, 201, 400, 401, 403, 404, 500, 503, 504, -102, -101],
- type: 'integer',
- description: '响应结果枚举',
- format: 'int32',
- '说明:': 'Success=0,Fail=1,LoginOut=2,TimeOut=3,Exception=4,NotAllowed=5,NotLoggedIn=6,OK=200,NoData=201,BadRequest=400,Unauthorized=401,Forbidden=403,NotFound=404,AepInternalError=500,ServiceUnavailable=503,AsyncService=504,HandlerException=-102,HandlerFail=-101'
-} as const;
-
export const ReturnValueApiDescriptionModelSchema = {
type: 'object',
properties: {
@@ -7657,52 +7526,6 @@ export const ReturnValueApiDescriptionModelSchema = {
additionalProperties: false
} as const;
-export const SelectResultSchema = {
- type: 'object',
- properties: {
- key: {
- type: 'string',
- description: '下拉框 键',
- nullable: true
- },
- value: {
- type: 'string',
- description: '下拉框 值',
- nullable: true
- },
- secondValue: {
- type: 'string',
- description: '下拉框 值2',
- nullable: true
- },
- thirdValue: {
- description: '下拉框 值3',
- nullable: true
- }
- },
- additionalProperties: false,
- description: '下拉框选项元素'
-} as const;
-
-export const SelectResultListInputSchema = {
- required: ['typeName'],
- type: 'object',
- properties: {
- typeName: {
- minLength: 1,
- type: 'string',
- description: '类型名称'
- },
- thirdAttributeTypeName: {
- type: 'string',
- description: '第三级类型',
- nullable: true
- }
- },
- additionalProperties: false,
- description: '获取下拉框数据'
-} as const;
-
export const SendBroadCastMessageInputSchema = {
type: 'object',
properties: {
@@ -7996,6 +7819,14 @@ export const TreeOutputSchema = {
additionalProperties: false
} as const;
+export const TupIsThroughEnumSchema = {
+ enum: [0, 1, 2],
+ type: 'integer',
+ description: '数据解析方式',
+ format: 'int32',
+ '说明:': '透传=0,非透传=1,脚本解析=2'
+} as const;
+
export const TypeApiDescriptionModelSchema = {
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 1caa5bf..01cc2ff 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, GetCommonGetSelectListData, GetCommonGetSelectListError, GetCommonGetSelectListResponse, 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, PostAggregationDeviceDeleteAsyncData, PostAggregationDeviceDeleteAsyncError, PostAggregationDeviceDeleteAsyncResponse, PostAggregationDeviceFindByIdAsyncData, PostAggregationDeviceFindByIdAsyncError, PostAggregationDeviceFindByIdAsyncResponse, PostAggregationDeviceRepushDeviceInfoToIoTplatformData, PostAggregationDeviceRepushDeviceInfoToIoTplatformError, PostAggregationDeviceRepushDeviceInfoToIoTplatformResponse, PostDeviceInfoFindByDeviceAddressData, PostDeviceInfoFindByDeviceAddressError, PostDeviceInfoFindByDeviceAddressResponse, PostDeviceInfoPageData, PostDeviceInfoPageError, PostDeviceInfoPageResponse, PostDeviceInfoCacheDeviceDataToRedisError, PostDeviceInfoCacheDeviceDataToRedisResponse, PostDeviceInfoArchivesDownData, PostDeviceInfoArchivesDownError, PostDeviceInfoArchivesDownResponse, 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, PostAggregationOneNetReceiveWorkshopProductionInfoAsyncData, PostAggregationOneNetReceiveWorkshopProductionInfoAsyncError, PostAggregationOneNetReceiveWorkshopProductionInfoAsyncResponse, PostAggregationOneNetGetProductListAsyncData, PostAggregationOneNetGetProductListAsyncError, PostAggregationOneNetGetProductListAsyncResponse, 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, PostTableModelPacketInfoInsertData, PostTableModelPacketInfoInsertError, PostTableModelPacketInfoInsertResponse, PostTableModelPacketInfoBatchInsertData, PostTableModelPacketInfoBatchInsertError, PostTableModelPacketInfoBatchInsertResponse, 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 } 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, 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, PostDeviceInfoFindByDeviceAddressData, PostDeviceInfoFindByDeviceAddressError, PostDeviceInfoFindByDeviceAddressResponse, PostDeviceInfoPageData, PostDeviceInfoPageError, PostDeviceInfoPageResponse, PostDeviceInfoCacheDeviceDataToRedisError, PostDeviceInfoCacheDeviceDataToRedisResponse, PostDeviceInfoArchivesDownData, PostDeviceInfoArchivesDownError, PostDeviceInfoArchivesDownResponse, 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, PostTableModelPacketInfoInsertData, PostTableModelPacketInfoInsertError, PostTableModelPacketInfoInsertResponse, PostTableModelPacketInfoBatchInsertData, PostTableModelPacketInfoBatchInsertError, PostTableModelPacketInfoBatchInsertResponse, 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 } from './types.gen';
export const client = createClient(createConfig());
@@ -87,22 +87,102 @@ export const postAuditLogsPage = (options?
};
/**
- * 接收业务系统指令信息
+ * 添加CTWing账号
*/
-export const postAggregationBusinessReceiveCommandInfoAsync = (options?: Options) => {
- return (options?.client ?? client).post({
+export const postCtWingAccountInsertAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
...options,
- url: '/Aggregation/Business/ReceiveCommandInfoAsync'
+ url: '/CTWingAccount/InsertAsync'
});
};
/**
- * 根据type名称获取下拉框数据
+ * 修改CTWing账号
*/
-export const getCommonGetSelectList = (options?: Options) => {
- return (options?.client ?? client).get({
+export const postCtWingAccountModifyAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
...options,
- url: '/Common/GetSelectList'
+ url: '/CTWingAccount/ModifyAsync'
+ });
+};
+
+/**
+ * 删除CTWing账号
+ */
+export const postCtWingAccountDeleteAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingAccount/DeleteAsync'
+ });
+};
+
+/**
+ * 获取CTWing账号列表
+ */
+export const postCtWingAccountListAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingAccount/ListAsync'
+ });
+};
+
+/**
+ * 添加CTWing产品
+ */
+export const postCtWingProductInsertAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingProduct/InsertAsync'
+ });
+};
+
+/**
+ * 修改CTWing产品
+ */
+export const postCtWingProductModifyAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingProduct/ModifyAsync'
+ });
+};
+
+/**
+ * 删除CTWing产品
+ */
+export const postCtWingProductDeleteAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingProduct/DeleteAsync'
+ });
+};
+
+/**
+ * 获取CTWing产品
+ */
+export const postCtWingProductGetAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingProduct/GetAsync'
+ });
+};
+
+/**
+ * 产品状态变更
+ */
+export const postCtWingProductProductStatusChangeAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingProduct/ProductStatusChangeAsync'
+ });
+};
+
+/**
+ * 获取CTWing产品列表
+ */
+export const postCtWingProductListAsync = (options?: Options) => {
+ return (options?.client ?? client).post({
+ ...options,
+ url: '/CTWingProduct/ListAsync'
});
};
@@ -246,46 +326,6 @@ export const postDataDictionaryUpdate = (o
});
};
-/**
- * 创建设备信息
- */
-export const postAggregationDeviceCreateAsync = (options?: Options) => {
- return (options?.client ?? client).post({
- ...options,
- url: '/Aggregation/Device/CreateAsync'
- });
-};
-
-/**
- * 删除设备信息
- */
-export const postAggregationDeviceDeleteAsync = (options?: Options) => {
- return (options?.client ?? client).post({
- ...options,
- url: '/Aggregation/Device/DeleteAsync'
- });
-};
-
-/**
- * 根据设备ID查询设备信息
- */
-export const postAggregationDeviceFindByIdAsync = (options?: Options) => {
- return (options?.client ?? client).post({
- ...options,
- url: '/Aggregation/Device/FindByIdAsync'
- });
-};
-
-/**
- * 重新推送设备信息到物联网平台
- */
-export const postAggregationDeviceRepushDeviceInfoToIoTplatform = (options?: Options) => {
- return (options?.client ?? client).post({
- ...options,
- url: '/Aggregation/Device/RepushDeviceInfoToIoTPlatform'
- });
-};
-
/**
* 根据设备地址查询设备信息
*/
@@ -625,26 +665,6 @@ export const postOneNetAccountListAsync =
});
};
-/**
- * 接收车间生产信息
- */
-export const postAggregationOneNetReceiveWorkshopProductionInfoAsync = (options?: Options) => {
- return (options?.client ?? client).post({
- ...options,
- url: '/Aggregation/OneNET/ReceiveWorkshopProductionInfoAsync'
- });
-};
-
-/**
- * 获取OneNET产品列表
- */
-export const postAggregationOneNetGetProductListAsync = (options?: Options) => {
- return (options?.client ?? client).post({
- ...options,
- url: '/Aggregation/OneNET/GetProductListAsync'
- });
-};
-
/**
* 添加OneNET产品
*/
diff --git a/apps/web-antd/src/api-client/types.gen.ts b/apps/web-antd/src/api-client/types.gen.ts
index 09addd4..4cc4ee7 100644
--- a/apps/web-antd/src/api-client/types.gen.ts
+++ b/apps/web-antd/src/api-client/types.gen.ts
@@ -5,6 +5,8 @@ export type AbpLoginResult = {
readonly description?: (string) | null;
};
+export type AccessTypeEnum = 1 | 2 | 3 | 5;
+
export type ActionApiDescriptionModel = {
uniqueName?: (string) | null;
name?: (string) | null;
@@ -43,12 +45,6 @@ export type AddUserToOrganizationUnitInput = {
organizationUnitId?: string;
};
-export type AggregateRouteConfig = {
- routeKey?: (string) | null;
- parameter?: (string) | null;
- jsonPath?: (string) | null;
-};
-
export type ApplicationApiDescriptionModel = {
modules?: {
[key: string]: ModuleApiDescriptionModel;
@@ -164,6 +160,8 @@ export type ArchivalDataIssuedInput = {
focusAddress?: (string) | null;
};
+export type AuthTypeEnum = 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9;
+
export type ChangePasswordInput = {
currentPassword?: (string) | null;
newPassword: string;
@@ -206,21 +204,6 @@ export type CreateDataDictinaryInput = {
description?: (string) | null;
};
-/**
- * 设备聚合新增设备
- */
-export type CreateDeviceAggregationInput = {
- /**
- * 表通信地址
- */
- deviceAddress: string;
- ioTPlatform: IoTPlatformTypeEnum;
- /**
- * 集中器在物联网平台中对应的产品Id
- */
- ioTPlatformProductId: string;
-};
-
/**
* 创建语言
*/
@@ -353,6 +336,380 @@ export type CreateTextTemplateInput = {
cultureName: string;
};
+/**
+ * CTWing账号信息
+ */
+export type CTWingAccountInfoDto = {
+ id?: string;
+ creationTime?: string;
+ creatorId?: (string) | null;
+ lastModificationTime?: (string) | null;
+ lastModifierId?: (string) | null;
+ isDeleted?: boolean;
+ deleterId?: (string) | null;
+ deletionTime?: (string) | null;
+ /**
+ * 租户Id
+ */
+ tenantId?: (string) | null;
+ /**
+ * 备注
+ */
+ remark?: (string) | null;
+ /**
+ * 旧系统授权创建者Id
+ */
+ osaCreatorId?: (number) | null;
+ /**
+ * 旧系统授权最后修改者Id
+ */
+ osaLastModifierId?: (number) | null;
+ /**
+ * 旧系统授权最后删除者Id
+ */
+ osaDeleterId?: (number) | null;
+ /**
+ * 扩展属性,用于存储自定义字段,JSON格式
+ */
+ extraProperties?: {
+ [key: string]: unknown;
+ } | null;
+ /**
+ * 账号名称
+ */
+ accountName?: (string) | null;
+ /**
+ * 账号ID
+ */
+ accountId?: (string) | null;
+ /**
+ * 应用 ID,最小单位,唯一标识,因为一个账号下可能存在多个应用
+ */
+ appId?: (string) | null;
+ /**
+ * 应用 AppKey
+ */
+ appKey?: (string) | null;
+ /**
+ * 应用 AppSecret
+ */
+ appSecret?: (string) | null;
+ /**
+ * 平台租户ID
+ */
+ platformTenantId?: (string) | null;
+ /**
+ * 通讯服务地址
+ */
+ communicationAddress?: (string) | null;
+ /**
+ * 手机号码
+ */
+ phoneNumber?: (string) | null;
+ /**
+ * 产品数量
+ */
+ productCount?: number;
+};
+
+export type CTWingAccountInfoDtoPagedResultDto = {
+ items?: Array | null;
+ totalCount?: number;
+};
+
+/**
+ * 添加账号
+ */
+export type CTWingAccountInsertInput = {
+ /**
+ * 账号名称
+ */
+ accountName?: (string) | null;
+ /**
+ * 账号ID
+ */
+ accountId: string;
+ /**
+ * 应用 ID,最小单位,唯一标识,因为一个账号下可能存在多个应用
+ */
+ appId: string;
+ /**
+ * 应用 AppKey
+ */
+ appKey: string;
+ /**
+ * 应用 AppSecret
+ */
+ appSecret: string;
+ /**
+ * 平台租户ID
+ */
+ platformTenantId: string;
+ /**
+ * 通讯服务地址
+ */
+ communicationAddress: string;
+ /**
+ * 手机号码
+ */
+ phoneNumber?: (string) | null;
+};
+
+/**
+ * 账号列表输入参数
+ */
+export type CTWingAccountListInput = {
+ [key: string]: unknown;
+};
+
+/**
+ * 修改账号信息
+ */
+export type CTWingAccountModifyInput = {
+ /**
+ * 账号名称
+ */
+ accountName?: (string) | null;
+ /**
+ * 账号ID
+ */
+ accountId: string;
+ /**
+ * 应用 ID,最小单位,唯一标识,因为一个账号下可能存在多个应用
+ */
+ appId: string;
+ /**
+ * 应用 AppKey
+ */
+ appKey: string;
+ /**
+ * 应用 AppSecret
+ */
+ appSecret: string;
+ /**
+ * 平台租户ID
+ */
+ platformTenantId: string;
+ /**
+ * 通讯服务地址
+ */
+ communicationAddress: string;
+ /**
+ * 手机号码
+ */
+ phoneNumber?: (string) | null;
+ /**
+ * 数据ID
+ */
+ id?: string;
+};
+
+/**
+ * CTWing私有产品信息
+ */
+export type CTWingPrivateProductInfoDto = {
+ id?: string;
+ creationTime?: string;
+ creatorId?: (string) | null;
+ lastModificationTime?: (string) | null;
+ lastModifierId?: (string) | null;
+ isDeleted?: boolean;
+ deleterId?: (string) | null;
+ deletionTime?: (string) | null;
+ /**
+ * 租户Id
+ */
+ tenantId?: (string) | null;
+ /**
+ * 备注
+ */
+ remark?: (string) | null;
+ /**
+ * 旧系统授权创建者Id
+ */
+ osaCreatorId?: (number) | null;
+ /**
+ * 旧系统授权最后修改者Id
+ */
+ osaLastModifierId?: (number) | null;
+ /**
+ * 旧系统授权最后删除者Id
+ */
+ osaDeleterId?: (number) | null;
+ /**
+ * 扩展属性,用于存储自定义字段,JSON格式
+ */
+ extraProperties?: {
+ [key: string]: unknown;
+ } | null;
+ /**
+ * 账号ID
+ */
+ ctWingAccountId?: (string) | null;
+ /**
+ * 通讯服务地址
+ */
+ communicationAddress?: (string) | null;
+ /**
+ * OpenAPI 通信主密钥
+ */
+ masterKey?: (string) | null;
+ /**
+ * 设备访问密钥
+ */
+ featureAccesskey?: (string) | null;
+ /**
+ * 产品ID
+ */
+ ioTPlatformProductId?: number;
+ /**
+ * 产品名称
+ */
+ productName?: (string) | null;
+ /**
+ * 通讯协议
+ */
+ protocol?: (string) | null;
+ /**
+ * 必填,产品描述
+ */
+ productDesc?: (string) | null;
+ /**
+ * 必填,一级分类名,返回结果中,此字段名数据类型为Int类型
+ */
+ productType?: (string) | null;
+ /**
+ * 必填,二级分类名,返回结果中,此字段名数据类型为Int类型
+ */
+ secondaryType?: (string) | null;
+ /**
+ * 必填,三级分类名,返回结果中,此字段名数据类型为Int类型
+ */
+ thirdType?: (string) | null;
+ nodeType?: ProductNodeTypeEnum;
+ accessType?: AccessTypeEnum;
+ networkType?: NetworkTypeEnum;
+ productProtocol?: ProductProtocolEnum;
+ authType?: AuthTypeEnum;
+ dataEncryption?: DataEncryptionEnum;
+ tupIsThrough?: TupIsThroughEnum;
+ /**
+ * 必填,设备型号
+ */
+ tupDeviceModel?: (string) | null;
+ /**
+ * 设备数量
+ */
+ deviceCount?: number;
+ /**
+ * 设备物模型文件Id
+ */
+ deviceThingModelFileId?: (string) | null;
+ /**
+ * 设备物模型文件名称
+ */
+ deviceThingModelFileName?: (string) | null;
+ /**
+ * 是否启用
+ */
+ isEnabled?: boolean;
+};
+
+export type CTWingPrivateProductInfoDtoPagedResultDto = {
+ items?: Array | null;
+ totalCount?: number;
+};
+
+/**
+ * 添加私有产品信息
+ */
+export type CTWingPrivateProductInfoInsertInput = {
+ /**
+ * 账号ID
+ */
+ ctWingAccountId?: (string) | null;
+ /**
+ * 产品名称
+ */
+ productName?: (string) | null;
+ /**
+ * 必填,产品描述
+ */
+ productDesc?: (string) | null;
+ /**
+ * 设备物模型文件Id
+ */
+ deviceThingModelFileId?: (string) | null;
+ /**
+ * 设备物模型文件名称
+ */
+ deviceThingModelFileName?: (string) | null;
+};
+
+export type CTWingPrivateProductInfoListInput = {
+ /**
+ * 当前页面.默认从1开始
+ */
+ pageIndex?: number;
+ /**
+ * 每页多少条.每页显示多少记录
+ */
+ pageSize?: number;
+ /**
+ * 跳过多少条
+ */
+ readonly skipCount?: number;
+ /**
+ * 排序
+ *
+ * name desc
+ *
+ */
+ sorting?: (string) | null;
+ /**
+ * CTWing账户Id
+ */
+ ctWingAccountId?: (string) | null;
+ /**
+ * 产品名称
+ */
+ productName?: (string) | null;
+ /**
+ * 产品型号
+ */
+ model?: (string) | null;
+};
+
+/**
+ * CTWing 产品修改
+ */
+export type CTWingPrivateProductInfoModifyInput = {
+ /**
+ * 账号ID
+ */
+ ctWingAccountId?: (string) | null;
+ /**
+ * 产品名称
+ */
+ productName?: (string) | null;
+ /**
+ * 必填,产品描述
+ */
+ productDesc?: (string) | null;
+ /**
+ * 设备物模型文件Id
+ */
+ deviceThingModelFileId?: (string) | null;
+ /**
+ * 设备物模型文件名称
+ */
+ deviceThingModelFileName?: (string) | null;
+ /**
+ * 数据ID
+ */
+ id?: string;
+};
+
export type CurrentCultureDto = {
displayName?: (string) | null;
englishName?: (string) | null;
@@ -390,6 +747,11 @@ export type CurrentUserDto = {
sessionId?: (string) | null;
};
+/**
+ * 数据加密方式
+ */
+export type DataEncryptionEnum = 1 | 2 | 3 | 4 | 5 | 6;
+
export type DateTimeFormatDto = {
calendarAlgorithmType?: (string) | null;
dateTimeFormatLong?: (string) | null;
@@ -844,71 +1206,6 @@ export type FeatureProviderDto = {
key?: (string) | null;
};
-export type FileAggregateRoute = {
- routeKeys?: Array<(string)> | null;
- routeKeysConfig?: Array | null;
- upstreamPathTemplate?: (string) | null;
- upstreamHost?: (string) | null;
- routeIsCaseSensitive?: boolean;
- aggregator?: (string) | null;
- readonly upstreamHttpMethod?: Array<(string)> | null;
- priority?: number;
-};
-
-export type FileAuthenticationOptions = {
- authenticationProviderKey?: (string) | null;
- allowedScopes?: Array<(string)> | null;
-};
-
-export type FileCacheOptions = {
- ttlSeconds?: number;
- region?: (string) | null;
-};
-
-export type FileConfiguration = {
- routes?: Array | null;
- dynamicRoutes?: Array | null;
- aggregates?: Array | null;
- globalConfiguration?: FileGlobalConfiguration;
-};
-
-export type FileDynamicRoute = {
- serviceName?: (string) | null;
- rateLimitRule?: FileRateLimitRule;
- downstreamHttpVersion?: (string) | null;
-};
-
-export type FileGlobalConfiguration = {
- requestIdKey?: (string) | null;
- serviceDiscoveryProvider?: FileServiceDiscoveryProvider;
- rateLimitOptions?: FileRateLimitOptions;
- qoSOptions?: FileQoSOptions;
- baseUrl?: (string) | null;
- loadBalancerOptions?: FileLoadBalancerOptions;
- downstreamScheme?: (string) | null;
- httpHandlerOptions?: FileHttpHandlerOptions;
- downstreamHttpVersion?: (string) | null;
-};
-
-export type FileHostAndPort = {
- host?: (string) | null;
- port?: number;
-};
-
-export type FileHttpHandlerOptions = {
- allowAutoRedirect?: boolean;
- useCookieContainer?: boolean;
- useTracing?: boolean;
- useProxy?: boolean;
- maxConnectionsPerServer?: number;
-};
-
-export type FileLoadBalancerOptions = {
- type?: (string) | null;
- key?: (string) | null;
- expiry?: number;
-};
-
/**
* 文件
*/
@@ -935,92 +1232,6 @@ export type FileObjectDto = {
fileName?: (string) | null;
};
-export type FileQoSOptions = {
- exceptionsAllowedBeforeBreaking?: number;
- durationOfBreak?: number;
- timeoutValue?: number;
-};
-
-export type FileRateLimitOptions = {
- clientIdHeader?: (string) | null;
- quotaExceededMessage?: (string) | null;
- rateLimitCounterPrefix?: (string) | null;
- disableRateLimitHeaders?: boolean;
- httpStatusCode?: number;
-};
-
-export type FileRateLimitRule = {
- clientWhitelist?: Array<(string)> | null;
- enableRateLimiting?: boolean;
- period?: (string) | null;
- periodTimespan?: number;
- limit?: number;
-};
-
-export type FileRoute = {
- downstreamPathTemplate?: (string) | null;
- upstreamPathTemplate?: (string) | null;
- upstreamHttpMethod?: Array<(string)> | null;
- downstreamHttpMethod?: (string) | null;
- addHeadersToRequest?: {
- [key: string]: ((string) | null);
- } | null;
- upstreamHeaderTransform?: {
- [key: string]: ((string) | null);
- } | null;
- downstreamHeaderTransform?: {
- [key: string]: ((string) | null);
- } | null;
- addClaimsToRequest?: {
- [key: string]: ((string) | null);
- } | null;
- routeClaimsRequirement?: {
- [key: string]: ((string) | null);
- } | null;
- addQueriesToRequest?: {
- [key: string]: ((string) | null);
- } | null;
- changeDownstreamPathTemplate?: {
- [key: string]: ((string) | null);
- } | null;
- requestIdKey?: (string) | null;
- fileCacheOptions?: FileCacheOptions;
- routeIsCaseSensitive?: boolean;
- serviceName?: (string) | null;
- serviceNamespace?: (string) | null;
- downstreamScheme?: (string) | null;
- qoSOptions?: FileQoSOptions;
- loadBalancerOptions?: FileLoadBalancerOptions;
- rateLimitOptions?: FileRateLimitRule;
- authenticationOptions?: FileAuthenticationOptions;
- httpHandlerOptions?: FileHttpHandlerOptions;
- downstreamHostAndPorts?: Array | null;
- upstreamHost?: (string) | null;
- key?: (string) | null;
- delegatingHandlers?: Array<(string)> | null;
- priority?: number;
- timeout?: number;
- dangerousAcceptAnyServerCertificateValidator?: boolean;
- securityOptions?: FileSecurityOptions;
- downstreamHttpVersion?: (string) | null;
-};
-
-export type FileSecurityOptions = {
- ipAllowedList?: Array<(string)> | null;
- ipBlockedList?: Array<(string)> | null;
-};
-
-export type FileServiceDiscoveryProvider = {
- scheme?: (string) | null;
- host?: (string) | null;
- port?: number;
- type?: (string) | null;
- token?: (string) | null;
- configurationKey?: (string) | null;
- pollingInterval?: number;
- namespace?: (string) | null;
-};
-
export type FindByUserNameInput = {
userName?: (string) | null;
};
@@ -1242,35 +1453,6 @@ export type GetUnAddUserOutputPagedResultDto = {
totalCount?: number;
};
-/**
- * HTTP 请求返回结果
- */
-export type HttpDataResult = {
- code?: ResponeResultEnum;
- /**
- * 详细描述
- */
- msg?: (string) | null;
- /**
- * 是否获取到数据或者逻辑处理成功
- * 服务内部判断状态采用此属性
- */
- success?: boolean;
- /**
- * 时间戳(毫秒)
- */
- readonly timestamp?: number;
- /**
- * 位置编码,主要用于接口请求逻辑定位
- * 使用时必须保证每个请求中不重复出现
- */
- locationCode?: number;
- /**
- * 扩展信息
- */
- extras?: (string) | null;
-};
-
export type HttpStatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 421 | 422 | 423 | 424 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
export type IanaTimeZone = {
@@ -1918,6 +2100,11 @@ export type NeedChangePasswordOutput = {
message?: (string) | null;
};
+/**
+ * 网络类型
+ */
+export type NetworkTypeEnum = 1 | 2 | 3 | 4 | 5 | 6;
+
export type NodeTypeEnum = 1 | 2 | 3;
export type ObjectExtensionsDto = {
@@ -2317,111 +2504,6 @@ export type OneNetProductInfoModifyInput = {
deviceThingModelFileName?: (string) | null;
};
-/**
- * 生产车间获取OneNET产品列表
- */
-export type OneNetWorkshopProductListOutput = {
- /**
- * 用于计算签名字符的随机串
- */
- nonce?: (string) | null;
- /**
- * 加密签名,用以校验推送客户端身份合法性,校验方法见实例验证
- */
- signature?: (string) | null;
- /**
- * 签名有效期(毫秒)
- */
- timestamp?: number;
- /**
- * 消息内容,JSON字符串,具体的设备相关信息
- */
- msg?: (string) | null;
- /**
- * OneNET账户Id
- */
- oneNETAccountId?: (string) | null;
- /**
- * 物联网平台对应的产品Id
- */
- ioTPlatformProductId?: (string) | null;
- /**
- * 产品名称
- */
- productName?: (string) | null;
- /**
- * 产品访问密钥
- */
- productAccesskey?: (string) | null;
- /**
- * 通讯服务地址
- */
- communicationAddress?: (string) | null;
- /**
- * TLS通讯服务地址
- */
- communicationAddressTLS?: (string) | null;
-};
-
-/**
- * HTTP 请求返回结果
- */
-export type OneNetWorkshopProductListOutputListHttpDataResult = {
- code?: ResponeResultEnum;
- /**
- * 详细描述
- */
- msg?: (string) | null;
- /**
- * 是否获取到数据或者逻辑处理成功
- * 服务内部判断状态采用此属性
- */
- success?: boolean;
- /**
- * 时间戳(毫秒)
- */
- readonly timestamp?: number;
- /**
- * 位置编码,主要用于接口请求逻辑定位
- * 使用时必须保证每个请求中不重复出现
- */
- locationCode?: number;
- /**
- * 扩展信息
- */
- extras?: (string) | null;
- /**
- * 扩展字段
- */
- data?: Array | null;
- /**
- * 总数
- */
- total?: number;
-};
-
-/**
- * 开放接口请求入参,所有外部接口请求参数
- */
-export type OpenApiRequest = {
- /**
- * 用于计算签名字符的随机串
- */
- nonce?: (string) | null;
- /**
- * 加密签名,用以校验推送客户端身份合法性,校验方法见实例验证
- */
- signature?: (string) | null;
- /**
- * 签名有效期(毫秒)
- */
- timestamp?: number;
- /**
- * 消息内容,JSON字符串,具体的设备相关信息
- */
- msg?: (string) | null;
-};
-
/**
* 打开类型
*/
@@ -3547,6 +3629,16 @@ export type PermissionTreeDto = {
children?: Array | null;
};
+/**
+ * 产品节点类型
+ */
+export type ProductNodeTypeEnum = 1 | 2;
+
+/**
+ * 产品协议
+ */
+export type ProductProtocolEnum = 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30;
+
/**
* 开发状态枚举
*/
@@ -3901,52 +3993,11 @@ export type ResetTwoFactorInput = {
userId?: string;
};
-/**
- * 响应结果枚举
- */
-export type ResponeResultEnum = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 200 | 201 | 400 | 401 | 403 | 404 | 500 | 503 | 504 | -102 | -101;
-
export type ReturnValueApiDescriptionModel = {
type?: (string) | null;
typeSimple?: (string) | null;
};
-/**
- * 下拉框选项元素
- */
-export type SelectResult = {
- /**
- * 下拉框 键
- */
- key?: (string) | null;
- /**
- * 下拉框 值
- */
- value?: (string) | null;
- /**
- * 下拉框 值2
- */
- secondValue?: (string) | null;
- /**
- * 下拉框 值3
- */
- thirdValue?: unknown;
-};
-
-/**
- * 获取下拉框数据
- */
-export type SelectResultListInput = {
- /**
- * 类型名称
- */
- typeName: string;
- /**
- * 第三级类型
- */
- thirdAttributeTypeName?: (string) | null;
-};
-
export type SendBroadCastMessageInput = {
/**
* 消息标题
@@ -4074,6 +4125,11 @@ export type TreeOutput = {
children?: Array | null;
};
+/**
+ * 数据解析方式
+ */
+export type TupIsThroughEnum = 0 | 1 | 2;
+
export type TypeApiDescriptionModel = {
baseType?: (string) | null;
isEnum?: boolean;
@@ -4369,28 +4425,105 @@ export type PostAuditLogsPageResponse = (PagingAuditLogOutputPagedResultDto);
export type PostAuditLogsPageError = (RemoteServiceErrorResponse);
-export type PostAggregationBusinessReceiveCommandInfoAsyncData = {
+export type PostCtWingAccountInsertAsyncData = {
query?: {
- /**
- * 开放接口请求入参,所有外部接口请求参数
- */
- input?: OpenApiRequest;
+ input?: CTWingAccountInsertInput;
};
};
-export type PostAggregationBusinessReceiveCommandInfoAsyncResponse = (HttpDataResult);
+export type PostCtWingAccountInsertAsyncResponse = (CTWingAccountInfoDto);
-export type PostAggregationBusinessReceiveCommandInfoAsyncError = unknown;
+export type PostCtWingAccountInsertAsyncError = unknown;
-export type GetCommonGetSelectListData = {
+export type PostCtWingAccountModifyAsyncData = {
query?: {
- input?: SelectResultListInput;
+ input?: CTWingAccountModifyInput;
};
};
-export type GetCommonGetSelectListResponse = (Array);
+export type PostCtWingAccountModifyAsyncResponse = (CTWingAccountInfoDto);
-export type GetCommonGetSelectListError = unknown;
+export type PostCtWingAccountModifyAsyncError = unknown;
+
+export type PostCtWingAccountDeleteAsyncData = {
+ query?: {
+ input?: IdInput;
+ };
+};
+
+export type PostCtWingAccountDeleteAsyncResponse = (CTWingAccountInfoDto);
+
+export type PostCtWingAccountDeleteAsyncError = unknown;
+
+export type PostCtWingAccountListAsyncData = {
+ query?: {
+ input?: CTWingAccountListInput;
+ };
+};
+
+export type PostCtWingAccountListAsyncResponse = (CTWingAccountInfoDtoPagedResultDto);
+
+export type PostCtWingAccountListAsyncError = unknown;
+
+export type PostCtWingProductInsertAsyncData = {
+ query?: {
+ input?: CTWingPrivateProductInfoInsertInput;
+ };
+};
+
+export type PostCtWingProductInsertAsyncResponse = (CTWingPrivateProductInfoDto);
+
+export type PostCtWingProductInsertAsyncError = unknown;
+
+export type PostCtWingProductModifyAsyncData = {
+ query?: {
+ input?: CTWingPrivateProductInfoModifyInput;
+ };
+};
+
+export type PostCtWingProductModifyAsyncResponse = (CTWingPrivateProductInfoDto);
+
+export type PostCtWingProductModifyAsyncError = unknown;
+
+export type PostCtWingProductDeleteAsyncData = {
+ query?: {
+ input?: IdInput;
+ };
+};
+
+export type PostCtWingProductDeleteAsyncResponse = (CTWingPrivateProductInfoDto);
+
+export type PostCtWingProductDeleteAsyncError = unknown;
+
+export type PostCtWingProductGetAsyncData = {
+ query?: {
+ input?: IdInput;
+ };
+};
+
+export type PostCtWingProductGetAsyncResponse = (CTWingPrivateProductInfoDto);
+
+export type PostCtWingProductGetAsyncError = unknown;
+
+export type PostCtWingProductProductStatusChangeAsyncData = {
+ query?: {
+ input?: IdInput;
+ };
+};
+
+export type PostCtWingProductProductStatusChangeAsyncResponse = (CTWingPrivateProductInfoDto);
+
+export type PostCtWingProductProductStatusChangeAsyncError = unknown;
+
+export type PostCtWingProductListAsyncData = {
+ query?: {
+ input?: CTWingPrivateProductInfoListInput;
+ };
+};
+
+export type PostCtWingProductListAsyncResponse = (CTWingPrivateProductInfoDtoPagedResultDto);
+
+export type PostCtWingProductListAsyncError = unknown;
export type PostCtWingServiceReceiveStatusChangeResponse = (unknown);
@@ -4484,46 +4617,6 @@ export type PostDataDictionaryUpdateResponse = (unknown);
export type PostDataDictionaryUpdateError = (RemoteServiceErrorResponse);
-export type PostAggregationDeviceCreateAsyncData = {
- query?: {
- input?: CreateDeviceAggregationInput;
- };
-};
-
-export type PostAggregationDeviceCreateAsyncResponse = (boolean);
-
-export type PostAggregationDeviceCreateAsyncError = unknown;
-
-export type PostAggregationDeviceDeleteAsyncData = {
- query?: {
- input?: IdInput;
- };
-};
-
-export type PostAggregationDeviceDeleteAsyncResponse = (boolean);
-
-export type PostAggregationDeviceDeleteAsyncError = unknown;
-
-export type PostAggregationDeviceFindByIdAsyncData = {
- query?: {
- input?: IdInput;
- };
-};
-
-export type PostAggregationDeviceFindByIdAsyncResponse = (DeviceManagementInfoDto);
-
-export type PostAggregationDeviceFindByIdAsyncError = unknown;
-
-export type PostAggregationDeviceRepushDeviceInfoToIoTplatformData = {
- query?: {
- input?: IdInput;
- };
-};
-
-export type PostAggregationDeviceRepushDeviceInfoToIoTplatformResponse = (DeviceManagementInfoDto);
-
-export type PostAggregationDeviceRepushDeviceInfoToIoTplatformError = unknown;
-
export type PostDeviceInfoFindByDeviceAddressData = {
query?: {
deviceAddress?: string;
@@ -4864,29 +4957,6 @@ export type PostOneNetAccountListAsyncResponse = (OneNETAccountInfoDtoPagedResul
export type PostOneNetAccountListAsyncError = unknown;
-export type PostAggregationOneNetReceiveWorkshopProductionInfoAsyncData = {
- query?: {
- input?: OpenApiRequest;
- };
-};
-
-export type PostAggregationOneNetReceiveWorkshopProductionInfoAsyncResponse = (unknown);
-
-export type PostAggregationOneNetReceiveWorkshopProductionInfoAsyncError = unknown;
-
-export type PostAggregationOneNetGetProductListAsyncData = {
- query?: {
- /**
- * 开放接口请求入参,所有外部接口请求参数
- */
- input?: OpenApiRequest;
- };
-};
-
-export type PostAggregationOneNetGetProductListAsyncResponse = (OneNetWorkshopProductListOutputListHttpDataResult);
-
-export type PostAggregationOneNetGetProductListAsyncError = unknown;
-
export type PostOneNetProductInsertAsyncData = {
query?: {
input?: OneNetProductInfoInsertInput;
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 f4a1e6a..b480f81 100644
--- a/apps/web-antd/src/locales/langs/en-US/abp.json
+++ b/apps/web-antd/src/locales/langs/en-US/abp.json
@@ -281,5 +281,27 @@
"IoTPlatformProductCreateTime": "ProductCreateTime",
"CreationTime": "CreationTime",
"LastModificationTime": "LastModificationTime"
+ },
+ "CTWingManagement": {
+ "AccountName": "AccountName",
+ "PhoneNumber": "PhoneNumber",
+ "BelongingAccountName": "BelongingAccountName",
+ "AccountAccesskey": "AccountAccesskey",
+ "ProductCount": "ProductCount",
+ "CTWingAccountId": "CTWingAccountId",
+ "CTWingProductId": "CTWingProductId",
+ "IoTPlatformProductId": "IoTPlatformProductId",
+ "ProductName": "ProductName",
+ "ProductAccesskey": "ProductAccesskey",
+ "IsEncrypted": "IsEncrypted",
+ "BelongingProductName": "Belonging ProductName",
+ "CommunicationAddress": "Communication Address",
+ "CommunicationAddressTLS": "TLS Communication Address",
+ "DeviceThingModelFileName": "DeviceThingModelFileName",
+ "IoTPlatformProductUpdateTime": "ProductUpdateTime",
+ "IoTPlatformProductCreateTime": "ProductCreateTime",
+ "CreationTime": "CreationTime",
+ "LastModificationTime": "LastModificationTime",
+ "CannotDeleteAccountWithProducts": "Cannot delete account with products"
}
}
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 031acea..4ef19f8 100644
--- a/apps/web-antd/src/locales/langs/zh-CN/abp.json
+++ b/apps/web-antd/src/locales/langs/zh-CN/abp.json
@@ -283,5 +283,27 @@
"IoTPlatformProductCreateTime": "平台创建时间",
"CreationTime": "创建时间",
"LastModificationTime": "更新时间"
+ },
+ "CTWingManagement": {
+ "AccountName": "账号名称",
+ "BelongingAccountName": "所属账号",
+ "PhoneNumber": "手机号码",
+ "AccountAccesskey": "账户通信密钥",
+ "ProductCount": "产品数量",
+ "CTWingAccountId": "CTWing账户Id",
+ "CTWingProductId": "CTWing产品Id",
+ "IoTPlatformProductId": "物联网平台对应的产品Id",
+ "ProductName": "产品名称",
+ "ProductAccesskey": "产品密钥",
+ "IsEncrypted": "是否加密",
+ "BelongingProductName": "所属产品",
+ "CommunicationAddress": "通讯地址",
+ "CommunicationAddressTLS": "TLS通讯地址",
+ "DeviceThingModelFileName": "物模型文件",
+ "IoTPlatformProductUpdateTime": "平台更新时间",
+ "IoTPlatformProductCreateTime": "平台创建时间",
+ "CreationTime": "创建时间",
+ "LastModificationTime": "更新时间",
+ "CannotDeleteAccountWithProducts": "该账号下存在产品,无法删除"
}
}
diff --git a/apps/web-antd/src/views/ctwingmanagement/account/index.vue b/apps/web-antd/src/views/ctwingmanagement/account/index.vue
index 84e5714..ebe2d49 100644
--- a/apps/web-antd/src/views/ctwingmanagement/account/index.vue
+++ b/apps/web-antd/src/views/ctwingmanagement/account/index.vue
@@ -2,35 +2,33 @@
import type { VbenFormProps } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
-import { h, ref } from 'vue';
+import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { Page, useVbenModal } from '@vben/common-ui';
-import { message as Message, Modal, Tag } from 'ant-design-vue';
+import { message as Message } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import {
- postDeviceInfoPage,
- postAggregationDeviceDeleteAsync,
- postDeviceInfoPage,
- postAggregationDeviceCreateAsync,
+ postCtWingAccountDeleteAsync,
+ postCtWingAccountListAsync,
+ postCtWingAccountInsertAsync,
+ postCtWingAccountModifyAsync,
} from '#/api-client';
import { TableAction } from '#/components/table-action';
import { $t } from '#/locales';
import {
- addUserFormSchema,
- editUserFormSchemaEdit,
- meterTypeOptions,
+ addAccountFormSchema,
+ editAccountFormSchemaEdit,
querySchema,
- rateOptions,
tableSchema,
} from './schema';
defineOptions({
- name: 'AbpUser',
+ name: 'CTWingAccount',
});
const router = useRouter();
@@ -55,7 +53,7 @@ const gridOptions: VxeGridProps = {
proxyConfig: {
ajax: {
query: async ({ page }, formValues) => {
- const { data } = await postDeviceInfoPage({
+ const { data } = await postCtWingAccountListAsync({
body: {
pageIndex: page.currentPage,
pageSize: page.pageSize,
@@ -75,7 +73,7 @@ const [UserModal, userModalApi] = useVbenModal({
draggable: true,
onConfirm: submit,
onBeforeClose: () => {
- editRow.value = {};
+ // 只在确认提交后重置,而不是每次关闭都重置
return true;
},
});
@@ -91,7 +89,7 @@ const [AddForm, addFormApi] = useVbenForm({
},
},
layout: 'horizontal',
- schema: addUserFormSchema.value,
+ schema: addAccountFormSchema.value,
showCollapseButton: false,
showDefaultActions: false,
wrapperClass: 'grid-cols-2',
@@ -109,7 +107,7 @@ const [EditForm, editFormApi] = useVbenForm({
},
// 提交函数
layout: 'horizontal',
- schema: editUserFormSchemaEdit.value,
+ schema: editAccountFormSchemaEdit.value,
showCollapseButton: false,
showDefaultActions: false,
wrapperClass: 'grid-cols-2',
@@ -119,8 +117,7 @@ const [EditForm, editFormApi] = useVbenForm({
async function submit() {
const isEdit = !!editRow.value.id;
const formApi = isEdit ? editFormApi : addFormApi;
- // TODO: 需要确认设备更新接口,暂时使用创建接口
- const api = postAggregationDeviceCreateAsync;
+ const api = isEdit ? postCtWingAccountModifyAsync : postCtWingAccountInsertAsync;
const { valid } = await formApi.validate();
if (!valid) return;
@@ -129,11 +126,9 @@ async function submit() {
? {
id: editRow.value.id,
...formValues,
- password: formValues.password || '000000',
}
: {
...formValues,
- password: formValues.password || '000000',
};
try {
@@ -144,6 +139,7 @@ async function submit() {
editRow.value.id ? $t('common.editSuccess') : $t('common.addSuccess'),
);
userModalApi.close();
+ editRow.value = {};
gridApi.reload();
} else {
Message.error(
@@ -161,35 +157,30 @@ async function onEdit(record: any) {
editFormApi.setValues({ ...record });
}
-function onDel(row: any) {
- Modal.confirm({
- title: `${$t('common.confirmDelete')}${row.meterName} ?`,
- onOk: async () => {
- const result = await postAggregationDeviceDeleteAsync({ body: { id: row.id } });
- if (result) {
- gridApi.reload();
- Message.success($t('common.deleteSuccess'));
- } else {
- Message.error($t('common.deleteFail'));
- }
- },
- });
-}
-const toStatusData = (row: Record) => {
- // 或者使用编程式导航
- router.push({
- path: '/iotdb/point',
- query: {
- DeviceType: row.meterType,
- DeviceId: row.meterId,
- FocusAddress: row.focusAddress,
- },
- });
-};
const openAddModal = async () => {
editRow.value = {};
userModalApi.open();
};
+
+// 删除函数
+async function onDel(record: any) {
+ if (record.productCount > 0) {
+ Message.warning($t('abp.CTWingManagement.CannotDeleteAccountWithProducts'));
+ return;
+ }
+
+ try {
+ const resp = await postCtWingAccountDeleteAsync({ body: { id: record.id } });
+ if (resp.data) {
+ Message.success($t('common.deleteSuccess'));
+ gridApi.reload();
+ } else {
+ Message.error($t('common.deleteFail'));
+ }
+ } catch {
+ Message.error($t('common.deleteFail'));
+ }
+}
@@ -209,57 +200,6 @@ const openAddModal = async () => {
/>
-
- {{ meterTypeOptions[row.meterType - 1]?.label }}
-
-
- {{ rateOptions.find((item) => item.value === row.singleRate)?.label }}
-
-
- {{
- row.archiveStatus ? $t('common.Issued') : $t('common.Undistributed')
- }}
-
-
- {{ row.tripState ? $t('common.SwitchOff') : $t('common.Closing') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/web-antd/src/views/ctwingmanagement/account/schema.ts b/apps/web-antd/src/views/ctwingmanagement/account/schema.ts
index ff24414..814cf4e 100644
--- a/apps/web-antd/src/views/ctwingmanagement/account/schema.ts
+++ b/apps/web-antd/src/views/ctwingmanagement/account/schema.ts
@@ -9,109 +9,37 @@ import { $t } from '#/locales';
export const querySchema = computed(() => [
{
component: 'Input',
- fieldName: 'meterAddress',
- label: $t('abp.meters.meterAddress'),
+ fieldName: 'phoneNumber',
+ label: $t('abp.CTWingManagement.PhoneNumber'),
},
]);
-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'),
+ field: 'ctWingAccountId',
+ title: $t('abp.CTWingManagement.CTWingAccountId'),
minWidth: '150',
},
{
- field: 'meterType',
- title: $t('abp.meters.meterType'),
+ field: 'accountName',
+ title: $t('abp.CTWingManagement.AccountName'),
minWidth: '150',
- slots: { default: 'isMeterType' },
},
{
- field: 'dynamicPassword',
- title: $t('abp.meters.dynamicPassword'),
+ field: 'phoneNumber',
+ title: $t('abp.CTWingManagement.PhoneNumber'),
minWidth: '150',
- slots: { default: 'isDynamicPassword' },
},
{
- field: 'password',
- title: $t('abp.meters.password'),
- minWidth: '100',
+ field: 'accountAccesskey',
+ title: $t('abp.CTWingManagement.AccountAccesskey'),
+ minWidth: '150',
},
{
- field: 'singleRate',
- title: $t('abp.meters.singleRate'),
+ field: 'productCount',
+ title: $t('abp.CTWingManagement.ProductCount'),
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'),
@@ -122,321 +50,80 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
},
]);
-export const addUserFormSchema: any = computed(() => [
+export const addAccountFormSchema: any = computed(() => [
{
component: 'Input',
- fieldName: 'meterName',
- label: $t('abp.meters.meterName'),
+ fieldName: 'ctWingAccountId',
+ label: $t('abp.CTWingManagement.CTWingAccountId'),
rules: z.string().min(1, {
- message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.meters.meterName')}`,
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.CTWingAccountId')}`,
}),
},
{
component: 'Input',
- fieldName: 'meterAddress',
- label: $t('abp.meters.meterAddress'),
+ fieldName: 'accountName',
+ label: $t('abp.CTWingManagement.AccountName'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.AccountName')}`,
+ }),
+ },
+ {
+ component: 'Input',
+ fieldName: 'accountAccesskey',
+ label: $t('abp.CTWingManagement.AccountAccesskey'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.AccountAccesskey')}`,
+ }),
+ },
+ {
+ component: 'Input',
+ fieldName: 'phoneNumber',
+ label: $t('abp.CTWingManagement.PhoneNumber'),
rules: z
.string()
.min(1, {
- message: `${$t('common.pleaseInput')}${$t('common.numberType')}${$t('abp.meters.meterAddress')}`,
+ message: `${$t('common.pleaseInput')}${$t('abp.CTWingManagement.PhoneNumber')}`,
})
- .refine((value) => /^\d+$/.test(value), {
- message: $t('abp.meters.checkmeterAddress'),
+ .refine((value) => /^1[3-9]\d{9}$/.test(value), {
+ message: $t('common.PhoneNumberFormatError'),
}),
},
- {
- 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(() => [
+export const editAccountFormSchemaEdit: any = computed(() => [
{
component: 'Input',
- fieldName: 'meterName',
- label: $t('abp.meters.meterName'),
+ fieldName: 'ctWingAccountId',
+ label: $t('abp.CTWingManagement.CTWingAccountId'),
+ disabled: true,
+ },
+ {
+ component: 'Input',
+ fieldName: 'accountName',
+ label: $t('abp.CTWingManagement.AccountName'),
rules: z.string().min(1, {
- message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.meters.meterName')}`,
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.AccountName')}`,
}),
},
{
component: 'Input',
- fieldName: 'meterAddress',
- label: $t('abp.meters.meterAddress'),
+ fieldName: 'accountAccesskey',
+ label: $t('abp.CTWingManagement.AccountAccesskey'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.AccountAccesskey')}`,
+ }),
+ },
+ {
+ component: 'Input',
+ fieldName: 'phoneNumber',
+ label: $t('abp.CTWingManagement.PhoneNumber'),
rules: z
.string()
.min(1, {
- message: `${$t('common.pleaseInput')}${$t('common.numberType')}${$t('abp.meters.meterAddress')}`,
+ message: `${$t('common.pleaseInput')}${$t('abp.CTWingManagement.PhoneNumber')}`,
})
- .refine((value) => /^\d+$/.test(value), {
- message: $t('abp.meters.checkmeterAddress'),
+ .refine((value) => /^1[3-9]\d{9}$/.test(value), {
+ message: $t('common.PhoneNumberFormatError'),
}),
},
- {
- 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'),
- },
]);
diff --git a/apps/web-antd/src/views/ctwingmanagement/privateProduct/index.vue b/apps/web-antd/src/views/ctwingmanagement/privateProduct/index.vue
index ec8f104..a3e3f05 100644
--- a/apps/web-antd/src/views/ctwingmanagement/privateProduct/index.vue
+++ b/apps/web-antd/src/views/ctwingmanagement/privateProduct/index.vue
@@ -2,35 +2,37 @@
import type { VbenFormProps } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
-import { h, ref } from 'vue';
+import { h, nextTick, ref } from 'vue';
import { useRouter } from 'vue-router';
import { Page, useVbenModal } from '@vben/common-ui';
-import { message as Message, Modal, Tag } from 'ant-design-vue';
+import { message as Message, Tag } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form';
import { useVbenVxeGrid } from '#/adapter/vxe-table';
import {
- postDeviceInfoPage,
- postAggregationDeviceDeleteAsync,
- postDeviceInfoPage,
- postAggregationDeviceCreateAsync,
+ postFilesDownload,
+ postFilesUpload,
+ postCtWingProductDeleteAsync,
+ postCtWingProductInsertAsync,
+ postCtWingProductListAsync,
+ postCtWingProductModifyAsync,
+ postCtWingProductProductStatusChangeAsync,
} from '#/api-client';
import { TableAction } from '#/components/table-action';
import { $t } from '#/locales';
import {
- addUserFormSchema,
- editUserFormSchemaEdit,
- meterTypeOptions,
+ addProductFormSchema,
+ editProductFormSchemaEdit,
querySchema,
- rateOptions,
+ setFileSelectedCallback,
tableSchema,
} from './schema';
defineOptions({
- name: 'AbpUser',
+ name: 'CTWingProduct',
});
const router = useRouter();
@@ -55,7 +57,7 @@ const gridOptions: VxeGridProps = {
proxyConfig: {
ajax: {
query: async ({ page }, formValues) => {
- const { data } = await postDeviceInfoPage({
+ const { data } = await postCtWingProductListAsync({
body: {
pageIndex: page.currentPage,
pageSize: page.pageSize,
@@ -71,13 +73,41 @@ const gridOptions: VxeGridProps = {
const [Grid, gridApi] = useVbenVxeGrid({ formOptions, gridOptions });
const editRow: Record = ref({});
+// 声明文件变量,用于存储选择的文件
+let selectedFile: File | null = null;
+
+// 设置文件选择回调
+setFileSelectedCallback((file) => {
+ selectedFile = file;
+});
const [UserModal, userModalApi] = useVbenModal({
draggable: true,
+ footer: true,
+ showCancelButton: true,
+ showConfirmButton: true,
onConfirm: submit,
onBeforeClose: () => {
- editRow.value = {};
+ // 只在确认提交后重置,而不是每次关闭都重置
return true;
},
+ onOpen: () => {
+ // 重置文件选择
+ selectedFile = null;
+ },
+ onOpenChange: (isOpen: boolean) => {
+ if (isOpen && editRow.value.id) {
+ // 编辑模式下,模态框打开后设置表单值
+ nextTick(() => {
+ editFormApi.setValues({ ...editRow.value });
+ });
+ }
+ },
+ onCancel: () => {
+ // 取消时也重置文件选择
+ selectedFile = null;
+ // 关闭模态框
+ userModalApi.close();
+ },
});
const [AddForm, addFormApi] = useVbenForm({
@@ -91,7 +121,7 @@ const [AddForm, addFormApi] = useVbenForm({
},
},
layout: 'horizontal',
- schema: addUserFormSchema.value,
+ schema: addProductFormSchema.value,
showCollapseButton: false,
showDefaultActions: false,
wrapperClass: 'grid-cols-2',
@@ -109,7 +139,7 @@ const [EditForm, editFormApi] = useVbenForm({
},
// 提交函数
layout: 'horizontal',
- schema: editUserFormSchemaEdit.value,
+ schema: editProductFormSchemaEdit.value,
showCollapseButton: false,
showDefaultActions: false,
wrapperClass: 'grid-cols-2',
@@ -119,31 +149,69 @@ const [EditForm, editFormApi] = useVbenForm({
async function submit() {
const isEdit = !!editRow.value.id;
const formApi = isEdit ? editFormApi : addFormApi;
- // TODO: 需要确认设备更新接口,暂时使用创建接口
- const api = postAggregationDeviceCreateAsync;
+ const api = isEdit
+ ? postCtWingProductModifyAsync
+ : postCtWingProductInsertAsync;
const { valid } = await formApi.validate();
if (!valid) return;
const formValues = await formApi.getValues();
+
+ // 提交前校验
+ if (!formValues.deviceThingModelFileName) {
+ Message.error('请选择设备模型文件');
+ return;
+ }
+
+ // 如果有文件需要上传,先上传
+ if (selectedFile) {
+ try {
+ userModalApi.setState({ loading: true, confirmLoading: true });
+ const result = await postFilesUpload({ body: { files: [selectedFile] } });
+ if (result.status === 204 || result.status === 200) {
+ const fileInfo = result.data?.[0];
+ if (fileInfo && fileInfo.id) {
+ formValues.deviceThingModelFileId = fileInfo.id;
+ // 文件名已在表单中
+ } else {
+ Message.error('文件上传成功但未获取到文件ID');
+ userModalApi.setState({ loading: false, confirmLoading: false });
+ return;
+ }
+ } else {
+ Message.error('文件上传失败');
+ userModalApi.setState({ loading: false, confirmLoading: false });
+ return;
+ }
+ } catch {
+ Message.error('文件上传失败');
+ userModalApi.setState({ loading: false, confirmLoading: false });
+ return;
+ }
+ }
+
+ // 清空全局变量,防止下次误用
+ selectedFile = null;
+
+ // 继续后续表单提交逻辑
+
const fetchParams: any = isEdit
? {
- id: editRow.value.id,
- ...formValues,
- password: formValues.password || '000000',
- }
+ id: editRow.value.id,
+ ...formValues,
+ }
: {
- ...formValues,
- password: formValues.password || '000000',
- };
+ ...formValues,
+ };
try {
- userModalApi.setState({ loading: true, confirmLoading: true });
const resp = await api({ body: fetchParams });
if (resp.data) {
Message.success(
editRow.value.id ? $t('common.editSuccess') : $t('common.addSuccess'),
);
userModalApi.close();
+ editRow.value = {};
gridApi.reload();
} else {
Message.error(
@@ -158,121 +226,137 @@ async function submit() {
async function onEdit(record: any) {
editRow.value = record;
userModalApi.open();
- editFormApi.setValues({ ...record });
+ // 重置文件选择状态
+ selectedFile = null;
}
-function onDel(row: any) {
- Modal.confirm({
- title: `${$t('common.confirmDelete')}${row.meterName} ?`,
- onOk: async () => {
- const result = await postAggregationDeviceDeleteAsync({ body: { id: row.id } });
- if (result) {
- gridApi.reload();
- Message.success($t('common.deleteSuccess'));
- } else {
- Message.error($t('common.deleteFail'));
- }
- },
- });
-}
-const toStatusData = (row: Record) => {
- // 或者使用编程式导航
- router.push({
- path: '/iotdb/point',
- query: {
- DeviceType: row.meterType,
- DeviceId: row.meterId,
- FocusAddress: row.focusAddress,
- },
- });
-};
-
const openAddModal = async () => {
editRow.value = {};
userModalApi.open();
+ // 重置文件选择状态
+ selectedFile = null;
};
+
+// 删除函数
+async function onDel(record: any) {
+ try {
+ const resp = await postCtWingProductDeleteAsync({
+ body: { id: record.id },
+ });
+ if (resp.data) {
+ Message.success($t('common.deleteSuccess'));
+ // 重置文件选择
+ selectedFile = null;
+ gridApi.reload();
+ } else {
+ Message.error($t('common.deleteFail'));
+ }
+ } catch {
+ Message.error($t('common.deleteFail'));
+ }
+}
+
+// 下载文件函数
+async function onDownloadFile(record: any) {
+ if (!record.deviceThingModelFileId) {
+ Message.error('文件ID不存在,无法下载');
+ return;
+ }
+
+ try {
+ const { data } = await postFilesDownload({
+ body: { id: record.deviceThingModelFileId },
+ responseType: 'blob',
+ });
+ const url = window.URL.createObjectURL(new Blob([data as Blob]));
+ const link = document.createElement('a');
+ link.href = url;
+ link.setAttribute(
+ 'download',
+ record.deviceThingModelFileName || 'device-model-file',
+ );
+ document.body.append(link);
+ link.click();
+ link.remove();
+ window.URL.revokeObjectURL(url);
+ Message.success('文件下载成功');
+ } catch {
+ Message.error('文件下载失败');
+ }
+}
+
+// 状态更改函数
+async function onStatusChange(record: any) {
+ try {
+ const resp = await postCtWingProductProductStatusChangeAsync({
+ body: {
+ id: record.id,
+ enabled: !record.isEnabled,
+ },
+ });
+ if (resp.data) {
+ Message.success(record.isEnabled ? '禁用成功' : '启用成功');
+ gridApi.reload();
+ } else {
+ Message.error(record.isEnabled ? '禁用失败' : '启用失败');
+ }
+ } catch {
+ Message.error(record.isEnabled ? '禁用失败' : '启用失败');
+ }
+}
-
+
-
- {{ meterTypeOptions[row.meterType - 1]?.label }}
-
-
- {{ rateOptions.find((item) => item.value === row.singleRate)?.label }}
-
-
- {{
- row.archiveStatus ? $t('common.Issued') : $t('common.Undistributed')
- }}
-
-
- {{ row.tripState ? $t('common.SwitchOff') : $t('common.Closing') }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ row.deviceThingModelFileName }}
+
+ {{ row.deviceThingModelFileName || '-' }}
-
+ ]" />
-
+
diff --git a/apps/web-antd/src/views/ctwingmanagement/privateProduct/schema.ts b/apps/web-antd/src/views/ctwingmanagement/privateProduct/schema.ts
index ff24414..9475ade 100644
--- a/apps/web-antd/src/views/ctwingmanagement/privateProduct/schema.ts
+++ b/apps/web-antd/src/views/ctwingmanagement/privateProduct/schema.ts
@@ -1,114 +1,136 @@
import type { VxeGridProps } from '#/adapter/vxe-table';
-import { computed } from 'vue';
+import { computed, h } from 'vue';
import { z } from '@vben/common-ui';
+import { postCtWingAccountListAsync } from '#/api-client';
import { $t } from '#/locales';
export const querySchema = computed(() => [
{
component: 'Input',
- fieldName: 'meterAddress',
- label: $t('abp.meters.meterAddress'),
+ fieldName: 'productName',
+ label: $t('abp.CTWingManagement.ProductName'),
},
]);
-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'),
+ field: 'ctWingAccountName',
+ title: $t('abp.CTWingManagement.BelongingAccountName'),
minWidth: '150',
},
{
- field: 'meterType',
- title: $t('abp.meters.meterType'),
+ field: 'ioTPlatformProductId',
+ title: $t('abp.CTWingManagement.CTWingProductId'),
minWidth: '150',
- slots: { default: 'isMeterType' },
},
{
- field: 'dynamicPassword',
- title: $t('abp.meters.dynamicPassword'),
+ field: 'productName',
+ title: $t('abp.CTWingManagement.ProductName'),
minWidth: '150',
- slots: { default: 'isDynamicPassword' },
},
{
- field: 'password',
- title: $t('abp.meters.password'),
- minWidth: '100',
- },
- {
- field: 'singleRate',
- title: $t('abp.meters.singleRate'),
+ field: 'productAccesskey',
+ title: $t('abp.CTWingManagement.ProductAccesskey'),
minWidth: '150',
- slots: { default: 'isSingleRate' },
},
{
- field: 'selfDevelop',
- title: $t('abp.meters.selfDevelop'),
+ field: 'communicationAddress',
+ title: $t('abp.CTWingManagement.CommunicationAddress'),
minWidth: '150',
- slots: { default: 'isSelfDevelop' },
},
- { field: 'brandType', title: $t('abp.meters.brandType'), minWidth: '150' },
{
- field: 'archiveStatus',
- title: $t('abp.meters.archiveStatus'),
+ field: 'communicationAddressTLS',
+ title: $t('abp.CTWingManagement.CommunicationAddressTLS'),
minWidth: '150',
- slots: { default: 'isArchiveStatus' },
},
{
- field: 'tripState',
- title: $t('abp.meters.tripState'),
+ field: 'deviceThingModelFileName',
+ title: $t('abp.CTWingManagement.DeviceThingModelFileName'),
minWidth: '150',
- slots: { default: 'isTripState' },
+ slots: { default: 'deviceThingModelFileName' },
},
- { 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'),
+ field: 'productCreateTime',
+ title: $t('abp.CTWingManagement.IoTPlatformProductCreateTime'),
minWidth: '150',
- slots: { default: 'isHaveValve' },
+ formatter: ({ cellValue }: any) => {
+ if (!cellValue) return '-';
+ const date = new Date(cellValue);
+ if (isNaN(date.getTime())) return '-';
+ return date.toLocaleString('zh-CN', {
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ hour12: false,
+ }).replace(/\//g, '-');
+ },
},
{
- field: 'enabled',
+ field: 'productUpdateTime',
+ title: $t('abp.CTWingManagement.IoTPlatformProductUpdateTime'),
+ minWidth: '150',
+ formatter: ({ cellValue }: any) => {
+ if (!cellValue) return '-';
+ const date = new Date(cellValue);
+ if (isNaN(date.getTime())) return '-';
+ return date.toLocaleString('zh-CN', {
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ hour12: false,
+ }).replace(/\//g, '-');
+ },
+ },
+ {
+ field: 'creationTime',
+ title: $t('abp.CTWingManagement.CreationTime'),
+ minWidth: '150',
+ formatter: ({ cellValue }: any) => {
+ if (!cellValue) return '-';
+ const date = new Date(cellValue);
+ if (isNaN(date.getTime())) return '-';
+ return date.toLocaleString('zh-CN', {
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ hour12: false,
+ }).replace(/\//g, '-');
+ },
+ },
+ {
+ field: 'lastModificationTime',
+ title: $t('abp.CTWingManagement.LastModificationTime'),
+ minWidth: '150',
+ formatter: ({ cellValue }: any) => {
+ if (!cellValue) return '-';
+ const date = new Date(cellValue);
+ if (isNaN(date.getTime())) return '-';
+ return date.toLocaleString('zh-CN', {
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ hour12: false,
+ }).replace(/\//g, '-');
+ },
+ },
+ {
+ field: 'isEnabled',
title: $t('common.isEnable'),
minWidth: '150',
slots: { default: 'isEnable' },
@@ -117,326 +139,318 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
title: $t('common.action'),
field: 'action',
fixed: 'right',
- width: '150',
+ width: '200',
slots: { default: 'action' },
},
]);
-export const addUserFormSchema: any = computed(() => [
+// 全局变量存储选择的文件
+export let selectedFile: File | null = null;
+
+// 文件选择回调函数
+let _onFileSelected: ((file: File) => void) | null = null;
+
+export function setFileSelectedCallback(callback: (file: File) => void) {
+ _onFileSelected = callback;
+}
+
+export const addProductFormSchema: any = computed(() => [
{
- component: 'Input',
- fieldName: 'meterName',
- label: $t('abp.meters.meterName'),
+ component: 'ApiSelect',
+ fieldName: 'ctWingAccountId',
+ label: $t('abp.CTWingManagement.BelongingAccountName'),
+ componentProps: {
+ api: postCtWingAccountListAsync,
+ params: {
+ body: {
+ pageIndex: 1,
+ pageSize: 1000,
+ },
+ },
+ labelField: 'accountName',
+ valueField: 'ctWingAccountId',
+ immediate: true,
+ afterFetch: (res: any) => {
+ // 如果是 Axios 响应对象,提取 data
+ if (res && res.data) {
+ const data = res.data;
+
+ // 确保返回的是数组格式
+ if (Array.isArray(data)) {
+ return data;
+ }
+ // 如果是包装在 items 中的,提取出来
+ if (data && Array.isArray(data.items)) {
+ return data.items;
+ }
+ // 如果是包装在 data 中的,提取出来
+ if (data && Array.isArray(data.data)) {
+ return data.data;
+ }
+ }
+
+ // 如果都不是,返回空数组
+ return [];
+ },
+ placeholder: `${$t('common.pleaseSelect')}${$t('abp.CTWingManagement.BelongingAccountName')}`,
+ },
rules: z.string().min(1, {
- message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.meters.meterName')}`,
+ message: `${$t('common.pleaseSelect')}${$t('abp.CTWingManagement.BelongingAccountName')}`,
}),
},
{
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'),
+ fieldName: 'ioTPlatformProductId',
+ label: $t('abp.CTWingManagement.CTWingProductId'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.CTWingProductId')}`,
+ }),
},
{
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'),
+ fieldName: 'productAccesskey',
+ label: $t('abp.CTWingManagement.ProductAccesskey'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.ProductAccesskey')}`,
+ }),
},
{
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'),
+ fieldName: 'communicationAddress',
+ label: $t('abp.CTWingManagement.CommunicationAddress'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.CommunicationAddress')}`,
+ }),
},
{
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'),
+ fieldName: 'communicationAddressTLS',
+ label: $t('abp.CTWingManagement.CommunicationAddressTLS'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.CommunicationAddressTLS')}`,
+ }),
},
{
component: 'Input',
- fieldName: 'timev',
- label: $t('abp.meters.timev'),
+ fieldName: 'deviceThingModelFileName',
+ label: $t('abp.CTWingManagement.DeviceThingModelFileName'),
componentProps: {
- allowClear: true,
- placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.timev')}`,
+ placeholder: '请选择文件',
+ readonly: true,
+ addonAfter: h(
+ 'button',
+ {
+ type: 'button',
+ style:
+ 'border: none; background: #1890ff; color: white; padding: 4px 8px; border-radius: 4px; cursor: pointer;',
+ onClick: () => {
+ const input = document.createElement('input');
+ input.type = 'file';
+ input.accept = '.json,.xlsx,.xls';
+ input.addEventListener('change', (e: any) => {
+ const file = e.target.files[0];
+ if (file) {
+ // 只显示文件名,不上传
+ const currentInput = document.querySelector(
+ 'input[placeholder="请选择文件"]',
+ ) as HTMLInputElement;
+ if (currentInput) {
+ currentInput.value = file.name;
+ // 触发change事件
+ currentInput.dispatchEvent(
+ new Event('input', { bubbles: true }),
+ );
+ currentInput.dispatchEvent(
+ new Event('change', { bubbles: true }),
+ );
+
+ // 存储文件对象到全局变量,用于后续上传
+ selectedFile = file;
+ // 调用回调函数
+ if (_onFileSelected) {
+ _onFileSelected(file);
+ }
+ }
+ console.log(
+ '文件已选择:',
+ file.name,
+ '大小:',
+ file.size,
+ '字节',
+ );
+ }
+ });
+ input.click();
+ },
+ },
+ '选择文件',
+ ),
},
- dependencies: {
- show(values: any) {
- return values.meterType === 1;
- },
- triggerFields: ['meterType'],
- },
- rules: z
- .string({
- message: `${$t('common.pleaseInput')}${$t('abp.meters.timesA')}`,
- })
- .default('1'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseSelect')}${$t('abp.CTWingManagement.DeviceThingModelFileName')}`,
+ }),
},
{
component: 'Input',
- fieldName: 'meteringCode',
- label: $t('abp.meters.meteringCode'),
+ fieldName: 'deviceThingModelFileId',
+ label: '',
componentProps: {
- allowClear: true,
- placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`,
+ type: 'hidden',
},
- rules: z
- .string({
- message: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`,
- })
- .default('1'),
},
]);
-export const editUserFormSchemaEdit: any = computed(() => [
+export const editProductFormSchemaEdit: any = computed(() => [
{
- component: 'Input',
- fieldName: 'meterName',
- label: $t('abp.meters.meterName'),
+ component: 'ApiSelect',
+ fieldName: 'ctWingAccountId',
+ label: $t('abp.CTWingManagement.BelongingAccountName'),
+ componentProps: {
+ api: postCtWingAccountListAsync,
+ params: {
+ body: {
+ pageIndex: 1,
+ pageSize: 1000,
+ },
+ },
+ labelField: 'accountName',
+ valueField: 'ctWingAccountId',
+ immediate: true,
+ disabled: true, // 编辑时禁用
+ afterFetch: (res: any) => {
+ // 如果是 Axios 响应对象,提取 data
+ if (res && res.data) {
+ const data = res.data;
+
+ // 确保返回的是数组格式
+ if (Array.isArray(data)) {
+ return data;
+ }
+ // 如果是包装在 items 中的,提取出来
+ if (data && Array.isArray(data.items)) {
+ return data.items;
+ }
+ // 如果是包装在 data 中的,提取出来
+ if (data && Array.isArray(data.data)) {
+ return data.data;
+ }
+ }
+
+ // 如果都不是,返回空数组
+ return [];
+ },
+ placeholder: `${$t('common.pleaseSelect')}${$t('abp.CTWingManagement.BelongingAccountName')}`,
+ },
rules: z.string().min(1, {
- message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.meters.meterName')}`,
+ message: `${$t('common.pleaseSelect')}${$t('abp.CTWingManagement.BelongingAccountName')}`,
}),
},
{
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',
+ fieldName: 'ioTPlatformProductId',
+ label: $t('abp.CTWingManagement.CTWingProductId'),
+ disabled: true,
componentProps: {
- allowClear: true,
- options: meterTypeOptions,
- placeholder: `${$t('common.pleaseSelect')}${$t('abp.meters.meterType')}`,
+ readonly: true, // 编辑时只读
},
- 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'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.CTWingProductId')}`,
+ }),
},
{
component: 'Input',
- fieldName: 'brandType',
- label: $t('abp.meters.brandType'),
- rules: z.string().optional(),
- },
- {
- component: 'Switch',
+ fieldName: 'productAccesskey',
+ label: $t('abp.CTWingManagement.ProductAccesskey'),
+ disabled: true,
componentProps: {
- class: 'w-auto',
+ readonly: true, // 编辑时只读
},
- fieldName: 'dynamicPassword',
- label: $t('abp.meters.dynamicPassword'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.ProductAccesskey')}`,
+ }),
},
{
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'),
+ fieldName: 'communicationAddress',
+ label: $t('abp.CTWingManagement.CommunicationAddress'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.CommunicationAddress')}`,
+ }),
},
{
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'),
+ fieldName: 'communicationAddressTLS',
+ label: $t('abp.CTWingManagement.CommunicationAddressTLS'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseInput')}${$t('common.info')}${$t('abp.CTWingManagement.CommunicationAddressTLS')}`,
+ }),
},
{
component: 'Input',
- fieldName: 'timev',
- label: $t('abp.meters.timev'),
+ fieldName: 'deviceThingModelFileName',
+ label: $t('abp.CTWingManagement.DeviceThingModelFileName'),
componentProps: {
- allowClear: true,
- placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.timev')}`,
+ placeholder: '请选择文件',
+ readonly: true,
+ addonAfter: h(
+ 'button',
+ {
+ type: 'button',
+ style:
+ 'border: none; background: #1890ff; color: white; padding: 4px 8px; border-radius: 4px; cursor: pointer;',
+ onClick: () => {
+ const input = document.createElement('input');
+ input.type = 'file';
+ input.accept = '.json,.xlsx,.xls';
+ input.addEventListener('change', (e: any) => {
+ const file = e.target.files[0];
+ if (file) {
+ // 只显示文件名,不上传
+ const currentInput = document.querySelector(
+ 'input[placeholder="请选择文件"]',
+ ) as HTMLInputElement;
+ if (currentInput) {
+ currentInput.value = file.name;
+ // 触发change事件
+ currentInput.dispatchEvent(
+ new Event('input', { bubbles: true }),
+ );
+ currentInput.dispatchEvent(
+ new Event('change', { bubbles: true }),
+ );
+
+ // 存储文件对象到全局变量,用于后续上传
+ selectedFile = file;
+ // 调用回调函数
+ if (_onFileSelected) {
+ _onFileSelected(file);
+ }
+ }
+ console.log(
+ '文件已选择:',
+ file.name,
+ '大小:',
+ file.size,
+ '字节',
+ );
+ }
+ });
+ input.click();
+ },
+ },
+ '选择文件',
+ ),
},
- dependencies: {
- show(values: any) {
- return values.meterType === 1;
- },
- triggerFields: ['meterType'],
- },
- rules: z
- .string({
- message: `${$t('common.pleaseInput')}${$t('abp.meters.timev')}`,
- })
- .default('1'),
+ rules: z.string().min(1, {
+ message: `${$t('common.pleaseSelect')}${$t('abp.CTWingManagement.DeviceThingModelFileName')}`,
+ }),
},
{
component: 'Input',
- fieldName: 'meteringCode',
- label: $t('abp.meters.meteringCode'),
+ fieldName: 'deviceThingModelFileId',
+ label: '',
componentProps: {
- allowClear: true,
- placeholder: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`,
+ type: 'hidden',
},
- rules: z
- .string({
- message: `${$t('common.pleaseInput')}${$t('abp.meters.meteringCode')}`,
- })
- .min(1, {
- message: `${$t('common.MustGreaterTthan0')}`,
- })
- .default('1'),
},
]);