修改产品物模型管理按钮,更新nswag接口信息
This commit is contained in:
parent
28479396f9
commit
fdc07134a8
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
@ -237,5 +237,15 @@
|
|||||||
"nolebase",
|
"nolebase",
|
||||||
"rollup",
|
"rollup",
|
||||||
"vitest"
|
"vitest"
|
||||||
]
|
],
|
||||||
|
"editor.gotoLocation.alternativeDeclarationCommand": "editor.action.revealDefinition",
|
||||||
|
"editor.gotoLocation.alternativeDefinitionCommand": "editor.action.revealDefinition",
|
||||||
|
"editor.gotoLocation.alternativeTypeDefinitionCommand": "editor.action.revealDefinition",
|
||||||
|
"editor.selectionHighlight": false,
|
||||||
|
"files.autoSave": "onFocusChange",
|
||||||
|
"editor.quickSuggestions": {
|
||||||
|
"other": "on",
|
||||||
|
"comments": "off",
|
||||||
|
"strings": "on"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -172,6 +172,38 @@ export type BatchCreateDeviceAggregationInput = {
|
|||||||
deviceSourceTypeEnum?: DeviceSourceTypeEnum;
|
deviceSourceTypeEnum?: DeviceSourceTypeEnum;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建物模型脚本输入
|
||||||
|
*/
|
||||||
|
export type BuildAnalysisScriptInput = {
|
||||||
|
/**
|
||||||
|
* 物模型数据Id
|
||||||
|
*/
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* 脚本函数名称
|
||||||
|
*/
|
||||||
|
scriptName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 脚本函数体
|
||||||
|
*/
|
||||||
|
functionScript?: (string) | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建物模型脚本输出
|
||||||
|
*/
|
||||||
|
export type BuildAnalysisScriptOutput = {
|
||||||
|
/**
|
||||||
|
* 函数名称
|
||||||
|
*/
|
||||||
|
functionName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 函数代码
|
||||||
|
*/
|
||||||
|
functionCode?: (string) | null;
|
||||||
|
};
|
||||||
|
|
||||||
export type ChangePasswordInput = {
|
export type ChangePasswordInput = {
|
||||||
currentPassword?: (string) | null;
|
currentPassword?: (string) | null;
|
||||||
newPassword: string;
|
newPassword: string;
|
||||||
@ -200,6 +232,21 @@ export type ControllerInterfaceApiDescriptionModel = {
|
|||||||
methods?: Array<InterfaceMethodApiDescriptionModel> | null;
|
methods?: Array<InterfaceMethodApiDescriptionModel> | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 复制已存在设备物模型信息
|
||||||
|
*/
|
||||||
|
export type CopyAnotherDeviceInput = {
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 当前设备端物模型数据Id
|
||||||
|
*/
|
||||||
|
deviceThingModelId?: string;
|
||||||
|
/**
|
||||||
|
* 源设备模型数据ID
|
||||||
|
*/
|
||||||
|
sourceProductId?: string;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复制已存在产品设备物模型信息
|
* 复制已存在产品设备物模型信息
|
||||||
*/
|
*/
|
||||||
@ -983,13 +1030,13 @@ export type DeleteTextTemplateInput = {
|
|||||||
* 设备命令
|
* 设备命令
|
||||||
*/
|
*/
|
||||||
export type DeviceCommandForApiInput = {
|
export type DeviceCommandForApiInput = {
|
||||||
id?: string;
|
id: string;
|
||||||
/**
|
/**
|
||||||
* 设备在物联网平台中发送的命令内容,JSON格式
|
* 设备在物联网平台中属性设置的参数键值对
|
||||||
*/
|
*/
|
||||||
commandContent: string;
|
commandContent: {
|
||||||
deviceType?: DeviceTypeEnum;
|
[key: string]: unknown;
|
||||||
telemetryType?: DeviceTelemetryCommandTypeEnum;
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DeviceManagementInfoDto = {
|
export type DeviceManagementInfoDto = {
|
||||||
@ -1095,10 +1142,14 @@ export type DeviceManagementInfoDto = {
|
|||||||
* 设备类型,与业务系统无关
|
* 设备类型,与业务系统无关
|
||||||
*/
|
*/
|
||||||
readonly deviceTypeName?: (string) | null;
|
readonly deviceTypeName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 是否需要配置设备模型,默认false
|
||||||
|
*/
|
||||||
|
isNeedConfigDevicMdoel?: boolean;
|
||||||
/**
|
/**
|
||||||
* 设备物模型数据Id
|
* 设备物模型数据Id
|
||||||
*/
|
*/
|
||||||
deviceThingModelDataId?: string;
|
deviceThingModelDataId?: (string) | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DeviceManagementInfoDtoPagedResultDto = {
|
export type DeviceManagementInfoDtoPagedResultDto = {
|
||||||
@ -1208,9 +1259,545 @@ export type DeviceTableModelDataInfoPageOutputPagedResultDto = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备数据包命令类型枚举
|
* 设备物模型指令详情创建输入
|
||||||
*/
|
*/
|
||||||
export type DeviceTelemetryCommandTypeEnum = 1 | 2;
|
export type DeviceThingModelCommandInfoCreateInput = {
|
||||||
|
/**
|
||||||
|
* 设备端物模型Id
|
||||||
|
*/
|
||||||
|
deviceThingModelId: string;
|
||||||
|
/**
|
||||||
|
* 指令名称
|
||||||
|
*/
|
||||||
|
commandName: string;
|
||||||
|
/**
|
||||||
|
* 完整的单个下发指令
|
||||||
|
*/
|
||||||
|
issueCommand: string;
|
||||||
|
/**
|
||||||
|
* 指令设备端物模型的属性名称集合,JSON格式字符串数组,一个指令的返回报文包含多个属性标识的数据
|
||||||
|
*/
|
||||||
|
propertyArray: Array<(string)>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备端透传指令详情,如果透抄的地址不连续,则会有多个指令记录
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelCommandInfoDto = {
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
deviceThingModelId?: string;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 指令名称
|
||||||
|
*/
|
||||||
|
commandName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 完整的单个下发指令
|
||||||
|
*/
|
||||||
|
issueCommand?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 指令设备端物模型的属性名称集合,JSON格式字符串数组,一个指令的返回报文包含多个属性标识的数据
|
||||||
|
*/
|
||||||
|
propertyArray?: Array<(string)> | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeviceThingModelCommandInfoDtoPagedResultDto = {
|
||||||
|
items?: Array<DeviceThingModelCommandInfoDto> | null;
|
||||||
|
totalCount?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备物模型指令详情分页
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelCommandInfoPageInput = {
|
||||||
|
/**
|
||||||
|
* 当前页面.默认从1开始
|
||||||
|
*/
|
||||||
|
pageIndex?: number;
|
||||||
|
/**
|
||||||
|
* 每页多少条.每页显示多少记录
|
||||||
|
*/
|
||||||
|
pageSize?: number;
|
||||||
|
/**
|
||||||
|
* 跳过多少条
|
||||||
|
*/
|
||||||
|
readonly skipCount?: number;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
* <example>
|
||||||
|
* name desc
|
||||||
|
* </example>
|
||||||
|
*/
|
||||||
|
sorting?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 设备端物模型Id
|
||||||
|
*/
|
||||||
|
deviceThingModelId: string;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 搜索关键字
|
||||||
|
*/
|
||||||
|
searchKeyWords?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应产品物模型属性或者事件类型 JiShe.ServicePro.Core.DataDictionaryTypeConst
|
||||||
|
*/
|
||||||
|
filedType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 是否分页
|
||||||
|
*/
|
||||||
|
isPage?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备物模型指令详情更新输入
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelCommandInfoUpdateInput = {
|
||||||
|
/**
|
||||||
|
* 设备端物模型Id
|
||||||
|
*/
|
||||||
|
deviceThingModelId: string;
|
||||||
|
/**
|
||||||
|
* 指令名称
|
||||||
|
*/
|
||||||
|
commandName: string;
|
||||||
|
/**
|
||||||
|
* 完整的单个下发指令
|
||||||
|
*/
|
||||||
|
issueCommand: string;
|
||||||
|
/**
|
||||||
|
* 指令设备端物模型的属性名称集合,JSON格式字符串数组,一个指令的返回报文包含多个属性标识的数据
|
||||||
|
*/
|
||||||
|
propertyArray: Array<(string)>;
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeviceThingModelCreateInput = {
|
||||||
|
/**
|
||||||
|
* 设备端物模型名称
|
||||||
|
*/
|
||||||
|
deviceModelName?: (string) | null;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 脚本函数名称
|
||||||
|
*/
|
||||||
|
scriptName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 脚本函数体
|
||||||
|
*/
|
||||||
|
functionScript?: (string) | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备端物模型管理
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelManagementDto = {
|
||||||
|
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;
|
||||||
|
/**
|
||||||
|
* 设备端物模型名称
|
||||||
|
*/
|
||||||
|
deviceModelName?: (string) | null;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 脚本函数名称
|
||||||
|
*/
|
||||||
|
scriptName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 脚本函数体
|
||||||
|
*/
|
||||||
|
functionScript?: (string) | null;
|
||||||
|
parsingSequence?: ParsingSequenceTypeEnum;
|
||||||
|
/**
|
||||||
|
* 函数解析标记,默认为false, 不能解析
|
||||||
|
*/
|
||||||
|
functionAnalysisFlag?: boolean;
|
||||||
|
/**
|
||||||
|
* 属性信息
|
||||||
|
*/
|
||||||
|
propertyInfos?: Array<DeviceThingModelPropertyInfoDto> | null;
|
||||||
|
/**
|
||||||
|
* 指令信息
|
||||||
|
*/
|
||||||
|
commandInfos?: Array<DeviceThingModelCommandInfoDto> | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeviceThingModelManagementDtoPagedResultDto = {
|
||||||
|
items?: Array<DeviceThingModelManagementDto> | null;
|
||||||
|
totalCount?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeviceThingModelPageInput = {
|
||||||
|
/**
|
||||||
|
* 当前页面.默认从1开始
|
||||||
|
*/
|
||||||
|
pageIndex?: number;
|
||||||
|
/**
|
||||||
|
* 每页多少条.每页显示多少记录
|
||||||
|
*/
|
||||||
|
pageSize?: number;
|
||||||
|
/**
|
||||||
|
* 跳过多少条
|
||||||
|
*/
|
||||||
|
readonly skipCount?: number;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
* <example>
|
||||||
|
* name desc
|
||||||
|
* </example>
|
||||||
|
*/
|
||||||
|
sorting?: (string) | null;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 搜索关键字
|
||||||
|
*/
|
||||||
|
searchKeyWords?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应产品物模型属性或者事件类型 JiShe.ServicePro.Core.DataDictionaryTypeConst
|
||||||
|
*/
|
||||||
|
filedType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 是否分页
|
||||||
|
*/
|
||||||
|
isPage?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备物模型属性创建输入
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelPropertyCreateInput = {
|
||||||
|
/**
|
||||||
|
* 设备端物模型Id
|
||||||
|
*/
|
||||||
|
deviceThingModelId: string;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应产品物模型属性或者事件类型 JiShe.ServicePro.Core.DataDictionaryTypeConst
|
||||||
|
*/
|
||||||
|
filedType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品物模型属性或者事件名称
|
||||||
|
*/
|
||||||
|
ioTPlatformRawFieldName: string;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品物模型属性或者事件数据类型,JiShe.ServicePro.Core.OneNETAllThingModel
|
||||||
|
*/
|
||||||
|
ioTPlatformRawFieldDataType: string;
|
||||||
|
/**
|
||||||
|
* 管理后台产品标准的物模型属性或者事件名称
|
||||||
|
*/
|
||||||
|
standardFieldName: string;
|
||||||
|
/**
|
||||||
|
* 标准物模型字段值类型
|
||||||
|
*/
|
||||||
|
standardFieldValueType: string;
|
||||||
|
/**
|
||||||
|
* 标准物模型字段显示名称
|
||||||
|
*/
|
||||||
|
standardFieldDisplayName: string;
|
||||||
|
/**
|
||||||
|
* 是否需要值类型转换
|
||||||
|
*/
|
||||||
|
isValueNeedConvert?: boolean;
|
||||||
|
/**
|
||||||
|
* 跳过数量
|
||||||
|
*/
|
||||||
|
skipNumber?: number;
|
||||||
|
/**
|
||||||
|
* 获取数量
|
||||||
|
*/
|
||||||
|
takeNumber?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备端物模型属性信息,是指设备端支持的属性或者事件
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelPropertyInfoDto = {
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
deviceThingModelId?: string;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应产品物模型属性或者事件类型 JiShe.ServicePro.Core.DataDictionaryTypeConst
|
||||||
|
*/
|
||||||
|
filedType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品物模型属性或者事件名称
|
||||||
|
*/
|
||||||
|
ioTPlatformRawFieldName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品物模型属性或者事件数据类型,JiShe.ServicePro.Core.OneNETAllThingModel
|
||||||
|
*/
|
||||||
|
ioTPlatformRawFieldDataType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 管理后台产品标准的物模型属性或者事件名称
|
||||||
|
*/
|
||||||
|
standardFieldName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 标准物模型字段值类型
|
||||||
|
*/
|
||||||
|
standardFieldValueType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 标准物模型字段显示名称
|
||||||
|
*/
|
||||||
|
standardFieldDisplayName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 是否需要值类型转换
|
||||||
|
*/
|
||||||
|
isValueNeedConvert?: boolean;
|
||||||
|
/**
|
||||||
|
* 跳过数量
|
||||||
|
*/
|
||||||
|
skipNumber?: number;
|
||||||
|
/**
|
||||||
|
* 获取数量
|
||||||
|
*/
|
||||||
|
takeNumber?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeviceThingModelPropertyInfoDtoPagedResultDto = {
|
||||||
|
items?: Array<DeviceThingModelPropertyInfoDto> | null;
|
||||||
|
totalCount?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备物模型属性分页
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelPropertyPageInput = {
|
||||||
|
/**
|
||||||
|
* 当前页面.默认从1开始
|
||||||
|
*/
|
||||||
|
pageIndex?: number;
|
||||||
|
/**
|
||||||
|
* 每页多少条.每页显示多少记录
|
||||||
|
*/
|
||||||
|
pageSize?: number;
|
||||||
|
/**
|
||||||
|
* 跳过多少条
|
||||||
|
*/
|
||||||
|
readonly skipCount?: number;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
* <example>
|
||||||
|
* name desc
|
||||||
|
* </example>
|
||||||
|
*/
|
||||||
|
sorting?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 设备端物模型Id
|
||||||
|
*/
|
||||||
|
deviceThingModelId: string;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 搜索关键字
|
||||||
|
*/
|
||||||
|
searchKeyWords?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应产品物模型属性或者事件类型 JiShe.ServicePro.Core.DataDictionaryTypeConst
|
||||||
|
*/
|
||||||
|
filedType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 是否分页
|
||||||
|
*/
|
||||||
|
isPage?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备物模型属性更新输入
|
||||||
|
*/
|
||||||
|
export type DeviceThingModelPropertyUpdateInput = {
|
||||||
|
/**
|
||||||
|
* 设备端物模型Id
|
||||||
|
*/
|
||||||
|
deviceThingModelId: string;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应产品物模型属性或者事件类型 JiShe.ServicePro.Core.DataDictionaryTypeConst
|
||||||
|
*/
|
||||||
|
filedType?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品物模型属性或者事件名称
|
||||||
|
*/
|
||||||
|
ioTPlatformRawFieldName: string;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品物模型属性或者事件数据类型,JiShe.ServicePro.Core.OneNETAllThingModel
|
||||||
|
*/
|
||||||
|
ioTPlatformRawFieldDataType: string;
|
||||||
|
/**
|
||||||
|
* 管理后台产品标准的物模型属性或者事件名称
|
||||||
|
*/
|
||||||
|
standardFieldName: string;
|
||||||
|
/**
|
||||||
|
* 标准物模型字段值类型
|
||||||
|
*/
|
||||||
|
standardFieldValueType: string;
|
||||||
|
/**
|
||||||
|
* 标准物模型字段显示名称
|
||||||
|
*/
|
||||||
|
standardFieldDisplayName: string;
|
||||||
|
/**
|
||||||
|
* 是否需要值类型转换
|
||||||
|
*/
|
||||||
|
isValueNeedConvert?: boolean;
|
||||||
|
/**
|
||||||
|
* 跳过数量
|
||||||
|
*/
|
||||||
|
skipNumber?: number;
|
||||||
|
/**
|
||||||
|
* 获取数量
|
||||||
|
*/
|
||||||
|
takeNumber?: number;
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeviceThingModelUpdateInput = {
|
||||||
|
/**
|
||||||
|
* 设备端物模型名称
|
||||||
|
*/
|
||||||
|
deviceModelName?: (string) | null;
|
||||||
|
ioTPlatform?: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 脚本函数名称
|
||||||
|
*/
|
||||||
|
scriptName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 脚本函数体
|
||||||
|
*/
|
||||||
|
functionScript?: (string) | null;
|
||||||
|
id?: string;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备树模型数据信息查询入参
|
* 设备树模型数据信息查询入参
|
||||||
@ -1958,7 +2545,7 @@ export type IdentityUserUpdateDto = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type IdInput = {
|
export type IdInput = {
|
||||||
id?: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type InterfaceMethodApiDescriptionModel = {
|
export type InterfaceMethodApiDescriptionModel = {
|
||||||
@ -2077,6 +2664,10 @@ export type IoTPlatformThingModelInfoDto = {
|
|||||||
* 是否是特殊物模型标识符
|
* 是否是特殊物模型标识符
|
||||||
*/
|
*/
|
||||||
isSpecialIdentifier?: boolean;
|
isSpecialIdentifier?: boolean;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型
|
||||||
|
*/
|
||||||
|
ioTPlatformRawFieldExtension?: (string) | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IoTPlatformThingModelInfoDtoPagedResultDto = {
|
export type IoTPlatformThingModelInfoDtoPagedResultDto = {
|
||||||
@ -2251,6 +2842,26 @@ export type LoginResultType = 1 | 2 | 3 | 4 | 5;
|
|||||||
*/
|
*/
|
||||||
export type MenuType = 10 | 20;
|
export type MenuType = 10 | 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试消息解析
|
||||||
|
*/
|
||||||
|
export type MessageAnalysisTestInput = {
|
||||||
|
/**
|
||||||
|
* 函数名称
|
||||||
|
*/
|
||||||
|
functionName?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 函数代码
|
||||||
|
*/
|
||||||
|
functionCode?: (string) | null;
|
||||||
|
/**
|
||||||
|
* 函数参数
|
||||||
|
*/
|
||||||
|
parameters?: {
|
||||||
|
[key: string]: unknown;
|
||||||
|
} | null;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息等级
|
* 消息等级
|
||||||
*/
|
*/
|
||||||
@ -2772,7 +3383,7 @@ export type OneNETProductInfoDto = {
|
|||||||
*/
|
*/
|
||||||
communicationAddressTLS?: (string) | null;
|
communicationAddressTLS?: (string) | null;
|
||||||
/**
|
/**
|
||||||
* 物模型信息
|
* 平台物模型信息
|
||||||
*/
|
*/
|
||||||
thingModelInfos?: (string) | null;
|
thingModelInfos?: (string) | null;
|
||||||
};
|
};
|
||||||
@ -3436,6 +4047,9 @@ export type PagingAuditLogInput = {
|
|||||||
readonly skipCount?: number;
|
readonly skipCount?: number;
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
|
* <example>
|
||||||
|
* name desc
|
||||||
|
* </example>
|
||||||
*/
|
*/
|
||||||
sorting?: (string) | null;
|
sorting?: (string) | null;
|
||||||
/**
|
/**
|
||||||
@ -4015,6 +4629,11 @@ export type ParameterApiDescriptionModel = {
|
|||||||
descriptorName?: (string) | null;
|
descriptorName?: (string) | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析顺序枚举
|
||||||
|
*/
|
||||||
|
export type ParsingSequenceTypeEnum = 1 | 2;
|
||||||
|
|
||||||
export type PermissionOutput = {
|
export type PermissionOutput = {
|
||||||
grants?: Array<(string)> | null;
|
grants?: Array<(string)> | null;
|
||||||
allGrants?: Array<(string)> | null;
|
allGrants?: Array<(string)> | null;
|
||||||
@ -4571,7 +5190,7 @@ export type SettingOutput = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type StringIdInput = {
|
export type StringIdInput = {
|
||||||
id?: (string) | null;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type StringStringFromSelector = {
|
export type StringStringFromSelector = {
|
||||||
@ -5254,6 +5873,242 @@ export type PostDeviceInfoCacheDeviceDataToRedisResponse = (boolean);
|
|||||||
|
|
||||||
export type PostDeviceInfoCacheDeviceDataToRedisError = unknown;
|
export type PostDeviceInfoCacheDeviceDataToRedisError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCreateAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelCreateInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCreateAsyncResponse = (DeviceThingModelManagementDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCreateAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementUpdateAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelUpdateInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementUpdateAsyncResponse = (DeviceThingModelManagementDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementUpdateAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementDeleteAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementDeleteAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementDeleteAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementFindByIdAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementFindByIdAsyncResponse = (DeviceThingModelManagementDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementFindByIdAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementGetDeviceThingModelAllInfoByIdAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementGetDeviceThingModelAllInfoByIdAsyncResponse = (DeviceThingModelManagementDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementGetDeviceThingModelAllInfoByIdAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementBuildAnalysisScriptByIdAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementBuildAnalysisScriptByIdAsyncResponse = (BuildAnalysisScriptOutput);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementBuildAnalysisScriptByIdAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementBuildAnalysisScriptAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: BuildAnalysisScriptInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementBuildAnalysisScriptAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementBuildAnalysisScriptAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementUpdateAnalysisScriptByIdAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementUpdateAnalysisScriptByIdAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementUpdateAnalysisScriptByIdAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementMessageAnalysisTestAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: MessageAnalysisTestInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementMessageAnalysisTestAsyncResponse = ({
|
||||||
|
[key: string]: unknown;
|
||||||
|
});
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementMessageAnalysisTestAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementFindByPlatformProductIdAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: StringIdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementFindByPlatformProductIdAsyncResponse = (Array<DeviceThingModelManagementDto>);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementFindByPlatformProductIdAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCopyAnotherThingModelAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: CopyAnotherDeviceInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCopyAnotherThingModelAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCopyAnotherThingModelAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPageAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelPageInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPageAsyncResponse = (DeviceThingModelManagementDtoPagedResultDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPageAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyCreateAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelPropertyCreateInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyCreateAsyncResponse = (DeviceThingModelPropertyInfoDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyCreateAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyUpdateAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelPropertyUpdateInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyUpdateAsyncResponse = (DeviceThingModelPropertyInfoDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyUpdateAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyDeleteAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyDeleteAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyDeleteAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyFindByIdAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyFindByIdAsyncResponse = (DeviceThingModelPropertyInfoDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyFindByIdAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyPageAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelPropertyPageInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyPageAsyncResponse = (DeviceThingModelPropertyInfoDtoPagedResultDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementPropertyPageAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandCreateAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelCommandInfoCreateInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandCreateAsyncResponse = (DeviceThingModelCommandInfoDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandCreateAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandUpdateAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelCommandInfoUpdateInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandUpdateAsyncResponse = (DeviceThingModelCommandInfoDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandUpdateAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandDeleteAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandDeleteAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandDeleteAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandFindByIdAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandFindByIdAsyncResponse = (DeviceThingModelCommandInfoDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandFindByIdAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandPageAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DeviceThingModelCommandInfoPageInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandPageAsyncResponse = (DeviceThingModelCommandInfoDtoPagedResultDto);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCommandPageAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCacheDeviceThingModelToRedisAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCacheDeviceThingModelToRedisAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCacheDeviceThingModelToRedisAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCacheAllDeviceThingModelToRedisAsyncResponse = (boolean);
|
||||||
|
|
||||||
|
export type PostDeviceThingModelManagementCacheAllDeviceThingModelToRedisAsyncError = unknown;
|
||||||
|
|
||||||
export type PostFeaturesListData = {
|
export type PostFeaturesListData = {
|
||||||
body?: GetFeatureListResultInput;
|
body?: GetFeatureListResultInput;
|
||||||
};
|
};
|
||||||
@ -5694,6 +6549,16 @@ export type PostOneNetProductProductStatusChangeAsyncResponse = (OneNETProductIn
|
|||||||
|
|
||||||
export type PostOneNetProductProductStatusChangeAsyncError = unknown;
|
export type PostOneNetProductProductStatusChangeAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostOneNetProductUpdateThingModelAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: IdInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostOneNetProductUpdateThingModelAsyncResponse = (OneNETProductInfoDto);
|
||||||
|
|
||||||
|
export type PostOneNetProductUpdateThingModelAsyncError = unknown;
|
||||||
|
|
||||||
export type PostOneNetProductListAsyncData = {
|
export type PostOneNetProductListAsyncData = {
|
||||||
query?: {
|
query?: {
|
||||||
input?: OneNetProductInfoListInput;
|
input?: OneNetProductInfoListInput;
|
||||||
|
|||||||
@ -23,8 +23,6 @@ import {
|
|||||||
import { TableAction } from '#/components/table-action';
|
import { TableAction } from '#/components/table-action';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
import ThingModelInfoModal from '#/views/thingmodelinfo/ioTPlatformThingModelInfo/index.vue';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
addProductFormSchema,
|
addProductFormSchema,
|
||||||
editProductFormSchemaEdit,
|
editProductFormSchemaEdit,
|
||||||
@ -78,10 +76,6 @@ const editRow: Record<string, any> = ref({});
|
|||||||
// 声明文件变量,用于存储选择的文件
|
// 声明文件变量,用于存储选择的文件
|
||||||
let selectedFile: File | null = null;
|
let selectedFile: File | null = null;
|
||||||
|
|
||||||
// 物模型模态框相关状态
|
|
||||||
const thingModelModalVisible = ref(false);
|
|
||||||
const currentProductInfo = ref<any>({});
|
|
||||||
|
|
||||||
// 设置文件选择回调
|
// 设置文件选择回调
|
||||||
setFileSelectedCallback((file) => {
|
setFileSelectedCallback((file) => {
|
||||||
selectedFile = file;
|
selectedFile = file;
|
||||||
@ -330,22 +324,15 @@ function onDeviceManagement(record: any) {
|
|||||||
// 物模型管理函数
|
// 物模型管理函数
|
||||||
function onThingModelManagement(record: any) {
|
function onThingModelManagement(record: any) {
|
||||||
console.log('物模型管理按钮被点击', record);
|
console.log('物模型管理按钮被点击', record);
|
||||||
// 设置当前产品信息
|
// 跳转到物模型管理页面,传递平台类型和平台产品ID作为参数
|
||||||
currentProductInfo.value = {
|
router.push({
|
||||||
productId: record.ioTPlatformProductId,
|
path: '/thingmodelinfo/ioTPlatformThingModelInfo',
|
||||||
productName: record.productName,
|
query: {
|
||||||
ioTPlatform: '2', // OneNET平台类型为2
|
productId: record.ioTPlatformProductId, // 平台产品ID
|
||||||
};
|
productName: record.productName,
|
||||||
console.log('设置产品信息:', currentProductInfo.value);
|
ioTPlatform: '2', // OneNET平台类型为2
|
||||||
// 打开物模型模态框
|
},
|
||||||
thingModelModalVisible.value = true;
|
});
|
||||||
console.log('模态框状态设置为:', thingModelModalVisible.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭物模型模态框
|
|
||||||
function closeThingModelModal() {
|
|
||||||
thingModelModalVisible.value = false;
|
|
||||||
currentProductInfo.value = {};
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -428,14 +415,5 @@ function closeThingModelModal() {
|
|||||||
<UserModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
<UserModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
||||||
<component :is="editRow.id ? EditForm : AddForm" />
|
<component :is="editRow.id ? EditForm : AddForm" />
|
||||||
</UserModal>
|
</UserModal>
|
||||||
|
|
||||||
<!-- 物模型信息模态框 -->
|
|
||||||
<ThingModelInfoModal
|
|
||||||
v-model:visible="thingModelModalVisible"
|
|
||||||
:product-id="currentProductInfo.productId"
|
|
||||||
:product-name="currentProductInfo.productName"
|
|
||||||
:io-t-platform="currentProductInfo.ioTPlatform"
|
|
||||||
@close="closeThingModelModal"
|
|
||||||
/>
|
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -2,11 +2,12 @@
|
|||||||
import type { VbenFormProps } from '#/adapter/form';
|
import type { VbenFormProps } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { h, nextTick, ref, watch } from 'vue';
|
import { h, nextTick, onMounted, ref, watch } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
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 { useVbenForm } from '#/adapter/form';
|
||||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
@ -30,29 +31,15 @@ import {
|
|||||||
} from './schema';
|
} from './schema';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'ThingModelInfoModal',
|
name: 'IoTPlatformThingModelInfo',
|
||||||
});
|
});
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const route = useRoute();
|
||||||
visible: false,
|
|
||||||
productId: '',
|
|
||||||
productName: '',
|
|
||||||
ioTPlatform: '2',
|
|
||||||
});
|
|
||||||
|
|
||||||
// 定义emits
|
// 从路由参数获取产品信息
|
||||||
const emit = defineEmits<{
|
const productId = ref<string>((route.query.productId as string) || '');
|
||||||
close: [];
|
const productName = ref<string>((route.query.productName as string) || '');
|
||||||
'update:visible': [value: boolean];
|
const ioTPlatform = ref<string>((route.query.ioTPlatform as string) || '2');
|
||||||
}>();
|
|
||||||
|
|
||||||
// 定义props
|
|
||||||
interface Props {
|
|
||||||
visible?: boolean;
|
|
||||||
productId?: string;
|
|
||||||
productName?: string;
|
|
||||||
ioTPlatform?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
schema: querySchema.value,
|
schema: querySchema.value,
|
||||||
@ -76,20 +63,38 @@ const gridOptions: VxeGridProps<any> = {
|
|||||||
proxyConfig: {
|
proxyConfig: {
|
||||||
ajax: {
|
ajax: {
|
||||||
query: async ({ page }, formValues) => {
|
query: async ({ page }, formValues) => {
|
||||||
const { data } = await postIoTplatformThingModelInfoPageAsync({
|
// 如果没有产品ID,直接返回空数据,让表格正常显示空白状态
|
||||||
query: {
|
if (!productId.value) {
|
||||||
input: {
|
hasData.value = false;
|
||||||
pageIndex: page.currentPage,
|
return {
|
||||||
pageSize: page.pageSize,
|
items: [],
|
||||||
ioTPlatform: Number.parseInt(props.ioTPlatform) as 1 | 2,
|
totalCount: 0,
|
||||||
ioTPlatformProductId: props.productId,
|
};
|
||||||
...(formValues?.SearchKeyWords && { searchKeyWords: formValues.SearchKeyWords }),
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { data } = await postIoTplatformThingModelInfoPageAsync({
|
||||||
|
query: {
|
||||||
|
input: {
|
||||||
|
pageIndex: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
ioTPlatform: Number.parseInt(ioTPlatform.value) as 1 | 2,
|
||||||
|
ioTPlatformProductId: productId.value,
|
||||||
|
...(formValues?.SearchKeyWords && { searchKeyWords: formValues.SearchKeyWords }),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
});
|
||||||
});
|
// 更新数据状态,检查是否有数据
|
||||||
// 更新数据状态,检查是否有数据
|
hasData.value = data?.items && data.items.length > 0;
|
||||||
hasData.value = data?.items && data.items.length > 0;
|
return data || { items: [], totalCount: 0 };
|
||||||
return data;
|
} catch (error) {
|
||||||
|
console.error('查询物模型信息失败:', error);
|
||||||
|
hasData.value = false;
|
||||||
|
return {
|
||||||
|
items: [],
|
||||||
|
totalCount: 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -183,41 +188,69 @@ const [CopyForm, copyFormApi] = useVbenForm({
|
|||||||
wrapperClass: 'grid-cols-2',
|
wrapperClass: 'grid-cols-2',
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听props变化,自动设置筛选条件
|
// 监听路由参数变化,自动加载数据
|
||||||
watch(
|
watch(
|
||||||
() => [props.visible, props.productId, props.ioTPlatform],
|
() => [route.query.productId, route.query.ioTPlatform],
|
||||||
async ([visible, productId, ioTPlatform]) => {
|
async ([newProductId, newIoTPlatform]) => {
|
||||||
console.log('物模型模态框props变化:', { visible, productId, ioTPlatform });
|
if (newProductId) {
|
||||||
console.log('所有props:', props);
|
productId.value = newProductId as string;
|
||||||
if (visible && productId) {
|
}
|
||||||
// 延迟执行,确保组件完全初始化
|
if (newIoTPlatform) {
|
||||||
|
ioTPlatform.value = newIoTPlatform as string;
|
||||||
|
}
|
||||||
|
if (route.query.productName) {
|
||||||
|
productName.value = route.query.productName as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 延迟执行,确保组件完全初始化
|
||||||
|
if (gridApi) {
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
try {
|
try {
|
||||||
// 设置表单筛选条件(如果有搜索关键词等筛选字段)
|
|
||||||
const filterValues: any = {};
|
|
||||||
|
|
||||||
// 注意:ioTPlatformProductId 已经在 API 调用中通过 props.productId 传递
|
|
||||||
// 这里只需要设置查询表单中存在的字段(如 SearchKeyWords)
|
|
||||||
|
|
||||||
console.log('设置筛选条件:', filterValues);
|
|
||||||
|
|
||||||
// 设置筛选表单的值
|
|
||||||
if (Object.keys(filterValues).length > 0) {
|
|
||||||
await gridApi.formApi.setValues(filterValues);
|
|
||||||
}
|
|
||||||
// 重新加载数据(即使没有筛选条件也要重新加载,因为 productId 可能已变化)
|
|
||||||
await gridApi.reload();
|
await gridApi.reload();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('设置筛选条件时出错:', error);
|
console.error('加载数据时出错:', error);
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true },
|
{ immediate: false },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 页面初始化时加载数据
|
||||||
|
onMounted(async () => {
|
||||||
|
// 从路由参数初始化
|
||||||
|
if (route.query.productId) {
|
||||||
|
productId.value = route.query.productId as string;
|
||||||
|
}
|
||||||
|
if (route.query.productName) {
|
||||||
|
productName.value = route.query.productName as string;
|
||||||
|
}
|
||||||
|
if (route.query.ioTPlatform) {
|
||||||
|
ioTPlatform.value = route.query.ioTPlatform as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 延迟加载数据,确保表格已初始化
|
||||||
|
// 即使没有 productId,也要触发一次查询,让表格显示空白状态
|
||||||
|
await nextTick();
|
||||||
|
setTimeout(async () => {
|
||||||
|
if (gridApi && gridApi.reload) {
|
||||||
|
try {
|
||||||
|
await gridApi.reload();
|
||||||
|
} catch (error) {
|
||||||
|
console.error('初始化加载数据时出错:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
|
||||||
// 新增和编辑提交的逻辑
|
// 新增和编辑提交的逻辑
|
||||||
async function submit() {
|
async function submit() {
|
||||||
|
// 检查是否有产品ID
|
||||||
|
if (!productId.value) {
|
||||||
|
Message.error('产品ID不存在,无法保存物模型信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const isEdit = !!editRow.value.id;
|
const isEdit = !!editRow.value.id;
|
||||||
const formApi = isEdit ? editFormApi : addFormApi;
|
const formApi = isEdit ? editFormApi : addFormApi;
|
||||||
const api = isEdit
|
const api = isEdit
|
||||||
@ -230,8 +263,8 @@ async function submit() {
|
|||||||
const fetchParams: any = {
|
const fetchParams: any = {
|
||||||
...formValues,
|
...formValues,
|
||||||
// 自动添加平台和产品信息
|
// 自动添加平台和产品信息
|
||||||
ioTPlatform: Number.parseInt(props.ioTPlatform) as 1 | 2,
|
ioTPlatform: Number.parseInt(ioTPlatform.value) as 1 | 2,
|
||||||
ioTPlatformProductId: props.productId,
|
ioTPlatformProductId: productId.value,
|
||||||
// 编辑时需要添加ID
|
// 编辑时需要添加ID
|
||||||
...(isEdit && { id: editRow.value.id }),
|
...(isEdit && { id: editRow.value.id }),
|
||||||
};
|
};
|
||||||
@ -270,16 +303,22 @@ const openAddModal = async () => {
|
|||||||
|
|
||||||
// 打开复制已有模型模态框
|
// 打开复制已有模型模态框
|
||||||
const openCopyAnotherThingModelModal = async () => {
|
const openCopyAnotherThingModelModal = async () => {
|
||||||
console.log('打开复制模态框,当前props:', {
|
console.log('打开复制模态框,当前参数:', {
|
||||||
productId: props.productId,
|
productId: productId.value,
|
||||||
productName: props.productName,
|
productName: productName.value,
|
||||||
ioTPlatform: props.ioTPlatform,
|
ioTPlatform: ioTPlatform.value,
|
||||||
});
|
});
|
||||||
copyModalApi.open();
|
copyModalApi.open();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 复制提交逻辑
|
// 复制提交逻辑
|
||||||
async function submitCopy() {
|
async function submitCopy() {
|
||||||
|
// 检查是否有产品ID
|
||||||
|
if (!productId.value) {
|
||||||
|
Message.error('产品ID不存在,无法复制物模型信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const { valid } = await copyFormApi.validate();
|
const { valid } = await copyFormApi.validate();
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
|
|
||||||
@ -287,10 +326,10 @@ async function submitCopy() {
|
|||||||
|
|
||||||
console.log('复制提交参数:', {
|
console.log('复制提交参数:', {
|
||||||
formValues,
|
formValues,
|
||||||
props: {
|
params: {
|
||||||
productId: props.productId,
|
productId: productId.value,
|
||||||
productName: props.productName,
|
productName: productName.value,
|
||||||
ioTPlatform: props.ioTPlatform,
|
ioTPlatform: ioTPlatform.value,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -298,8 +337,8 @@ async function submitCopy() {
|
|||||||
const resp = await postIoTplatformThingModelInfoCopyAnotherThingModelAsync({
|
const resp = await postIoTplatformThingModelInfoCopyAnotherThingModelAsync({
|
||||||
query: {
|
query: {
|
||||||
input: {
|
input: {
|
||||||
ioTPlatform: Number.parseInt(props.ioTPlatform) as 1 | 2,
|
ioTPlatform: Number.parseInt(ioTPlatform.value) as 1 | 2,
|
||||||
ioTPlatformProductId: props.productId,
|
ioTPlatformProductId: productId.value,
|
||||||
sourceProductId: formValues.ioTPlatformProductId,
|
sourceProductId: formValues.ioTPlatformProductId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -340,12 +379,18 @@ async function onDel(record: any) {
|
|||||||
|
|
||||||
// 复制标准模型函数
|
// 复制标准模型函数
|
||||||
async function copyStandardThingModel() {
|
async function copyStandardThingModel() {
|
||||||
|
// 检查是否有产品ID
|
||||||
|
if (!productId.value) {
|
||||||
|
Message.error('产品ID不存在,无法复制标准模型');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const resp = await postIoTplatformThingModelInfoCopyStandardThingModel({
|
const resp = await postIoTplatformThingModelInfoCopyStandardThingModel({
|
||||||
query: {
|
query: {
|
||||||
input: {
|
input: {
|
||||||
ioTPlatform: Number.parseInt(props.ioTPlatform) as 1 | 2,
|
ioTPlatform: Number.parseInt(ioTPlatform.value) as 1 | 2,
|
||||||
ioTPlatformProductId: props.productId,
|
ioTPlatformProductId: productId.value,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -360,80 +405,73 @@ async function copyStandardThingModel() {
|
|||||||
Message.error('复制标准模型失败');
|
Message.error('复制标准模型失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭模态框
|
|
||||||
function closeModal() {
|
|
||||||
emit('update:visible', false);
|
|
||||||
emit('close');
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Modal :open="visible" :title="`${props.ioTPlatform === 1 ? 'CTWing' : 'OneNET'}物模型管理 - ${productName || '产品'}`"
|
<Page auto-content-height>
|
||||||
width="90%" :footer="null" @cancel="closeModal" @ok="closeModal"
|
<Grid>
|
||||||
:body-style="{ height: '70vh', overflow: 'hidden' }">
|
<template #toolbar-actions>
|
||||||
<div style="display: flex; flex-direction: column; height: 100%">
|
<TableAction :actions="[
|
||||||
<Grid style="flex: 1; overflow: hidden">
|
{
|
||||||
<template #toolbar-actions>
|
label: $t('common.add'),
|
||||||
<TableAction :actions="[
|
type: 'primary',
|
||||||
{
|
icon: 'ant-design:plus-outlined',
|
||||||
label: $t('common.add'),
|
onClick: openAddModal.bind(null),
|
||||||
type: 'primary',
|
auth: ['AbpIdentity.Users.Create'],
|
||||||
icon: 'ant-design:plus-outlined',
|
disabled: !productId,
|
||||||
onClick: openAddModal.bind(null),
|
},
|
||||||
auth: ['AbpIdentity.Users.Create'],
|
{
|
||||||
},
|
label: $t('abp.thingModelInfos.copyStandardThingModel'),
|
||||||
{
|
type: 'default',
|
||||||
label: $t('abp.thingModelInfos.copyStandardThingModel'),
|
icon: 'ant-design:copy-outlined',
|
||||||
type: 'default',
|
onClick: copyStandardThingModel,
|
||||||
icon: 'ant-design:copy-outlined',
|
auth: ['AbpIdentity.Users.Create'],
|
||||||
onClick: copyStandardThingModel,
|
disabled: !productId,
|
||||||
auth: ['AbpIdentity.Users.Create'],
|
},
|
||||||
},
|
{
|
||||||
{
|
label: $t('abp.thingModelInfos.copyAnotherThingModelModal'),
|
||||||
label: $t('abp.thingModelInfos.copyAnotherThingModelModal'),
|
type: 'default',
|
||||||
type: 'default',
|
icon: 'ant-design:copy-outlined',
|
||||||
icon: 'ant-design:copy-outlined',
|
onClick: openCopyAnotherThingModelModal,
|
||||||
onClick: openCopyAnotherThingModelModal,
|
auth: ['AbpIdentity.Users.Create'],
|
||||||
auth: ['AbpIdentity.Users.Create'],
|
ifShow: !hasData,
|
||||||
ifShow: !hasData,
|
disabled: !productId,
|
||||||
},
|
},
|
||||||
]" />
|
]" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #isValueNeedConvert="{ row }">
|
<template #isValueNeedConvert="{ row }">
|
||||||
<component :is="h(
|
<component :is="h(
|
||||||
Tag,
|
Tag,
|
||||||
{ color: row.isValueNeedConvert ? 'blue' : 'default' },
|
{ color: row.isValueNeedConvert ? 'blue' : 'default' },
|
||||||
() => (row.isValueNeedConvert ? '是' : '否'),
|
() => (row.isValueNeedConvert ? '是' : '否'),
|
||||||
)
|
)
|
||||||
" />
|
" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<TableAction :actions="[
|
<TableAction :actions="[
|
||||||
{
|
{
|
||||||
label: $t('common.edit'),
|
label: $t('common.edit'),
|
||||||
type: 'link',
|
type: 'link',
|
||||||
size: 'small',
|
size: 'small',
|
||||||
auth: ['AbpIdentity.Users.Update'],
|
auth: ['AbpIdentity.Users.Update'],
|
||||||
onClick: onEdit.bind(null, row),
|
onClick: onEdit.bind(null, row),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: $t('common.delete'),
|
||||||
|
icon: 'ant-design:delete-outlined',
|
||||||
|
type: 'link',
|
||||||
|
size: 'small',
|
||||||
|
auth: ['AbpIdentity.Users.Delete'],
|
||||||
|
popConfirm: {
|
||||||
|
title: $t('common.askConfirmDelete'),
|
||||||
|
confirm: onDel.bind(null, row),
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
label: $t('common.delete'),
|
]" />
|
||||||
icon: 'ant-design:delete-outlined',
|
</template>
|
||||||
type: 'link',
|
</Grid>
|
||||||
size: 'small',
|
|
||||||
auth: ['AbpIdentity.Users.Delete'],
|
|
||||||
popConfirm: {
|
|
||||||
title: $t('common.askConfirmDelete'),
|
|
||||||
confirm: onDel.bind(null, row),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]" />
|
|
||||||
</template>
|
|
||||||
</Grid>
|
|
||||||
</div>
|
|
||||||
<ThingModelModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
<ThingModelModal :title="editRow.id ? $t('common.edit') : $t('common.add')" class="w-[800px]">
|
||||||
<component :is="editRow.id ? EditForm : AddForm" />
|
<component :is="editRow.id ? EditForm : AddForm" />
|
||||||
</ThingModelModal>
|
</ThingModelModal>
|
||||||
@ -442,5 +480,5 @@ function closeModal() {
|
|||||||
<CopyModal title="复制已有模型" class="w-[600px]">
|
<CopyModal title="复制已有模型" class="w-[600px]">
|
||||||
<CopyForm />
|
<CopyForm />
|
||||||
</CopyModal>
|
</CopyModal>
|
||||||
</Modal>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user