平台聚合服务新增平台产品物模型以及产品标准物模型属性更新
This commit is contained in:
parent
142584be52
commit
f208976dd8
@ -2183,6 +2183,26 @@ export const DeviceOnlineStatusEnumSchema = {
|
|||||||
'说明:': '在线=1,离线=2'
|
'说明:': '在线=1,离线=2'
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
export const DevicePropertyValueForApiInputSchema = {
|
||||||
|
required: ['id', 'propertyList'],
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
id: {
|
||||||
|
type: 'string',
|
||||||
|
format: 'uuid'
|
||||||
|
},
|
||||||
|
propertyList: {
|
||||||
|
type: 'array',
|
||||||
|
items: {
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
description: '设备在物联网平台中属性标识符列表'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
additionalProperties: false,
|
||||||
|
description: '设备属性抄读'
|
||||||
|
} as const;
|
||||||
|
|
||||||
export const DeviceSourceTypeEnumSchema = {
|
export const DeviceSourceTypeEnumSchema = {
|
||||||
enum: [1, 2, 3, 4, 5, 6],
|
enum: [1, 2, 3, 4, 5, 6],
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
@ -10193,6 +10213,23 @@ export const UpdateFeaturesDtoSchema = {
|
|||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
export const UpdateIoTPlatformProductPropertyInfoInputSchema = {
|
||||||
|
required: ['ioTPlatformProductId', 'ioTPlatformType'],
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
ioTPlatformType: {
|
||||||
|
'$ref': '#/components/schemas/IoTPlatformTypeEnum'
|
||||||
|
},
|
||||||
|
ioTPlatformProductId: {
|
||||||
|
minLength: 1,
|
||||||
|
type: 'string',
|
||||||
|
description: '物联网平台中对应的产品Id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
additionalProperties: false,
|
||||||
|
description: '平台产品属性更新输入'
|
||||||
|
} as const;
|
||||||
|
|
||||||
export const UpdateLanguageInputSchema = {
|
export const UpdateLanguageInputSchema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1199,6 +1199,17 @@ export type DeviceManagementInfoDtoPagedResultDto = {
|
|||||||
*/
|
*/
|
||||||
export type DeviceOnlineStatusEnum = 1 | 2;
|
export type DeviceOnlineStatusEnum = 1 | 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备属性抄读
|
||||||
|
*/
|
||||||
|
export type DevicePropertyValueForApiInput = {
|
||||||
|
id: string;
|
||||||
|
/**
|
||||||
|
* 设备在物联网平台中属性标识符列表
|
||||||
|
*/
|
||||||
|
propertyList: Array<(string)>;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备来源类型枚举
|
* 设备来源类型枚举
|
||||||
*/
|
*/
|
||||||
@ -5422,6 +5433,17 @@ export type UpdateFeaturesDto = {
|
|||||||
features?: Array<UpdateFeatureDto> | null;
|
features?: Array<UpdateFeatureDto> | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台产品属性更新输入
|
||||||
|
*/
|
||||||
|
export type UpdateIoTPlatformProductPropertyInfoInput = {
|
||||||
|
ioTPlatformType: IoTPlatformTypeEnum;
|
||||||
|
/**
|
||||||
|
* 物联网平台中对应的产品Id
|
||||||
|
*/
|
||||||
|
ioTPlatformProductId: string;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除语言
|
* 删除语言
|
||||||
*/
|
*/
|
||||||
@ -5987,6 +6009,18 @@ export type PostAggregationDeviceDeviceCommandForApiAsyncResponse = (boolean);
|
|||||||
|
|
||||||
export type PostAggregationDeviceDeviceCommandForApiAsyncError = unknown;
|
export type PostAggregationDeviceDeviceCommandForApiAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostAggregationDeviceGetDevicePropertyValueForApiAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: DevicePropertyValueForApiInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostAggregationDeviceGetDevicePropertyValueForApiAsyncResponse = ({
|
||||||
|
[key: string]: unknown;
|
||||||
|
});
|
||||||
|
|
||||||
|
export type PostAggregationDeviceGetDevicePropertyValueForApiAsyncError = unknown;
|
||||||
|
|
||||||
export type PostDeviceInfoFindByDeviceAddressData = {
|
export type PostDeviceInfoFindByDeviceAddressData = {
|
||||||
query?: {
|
query?: {
|
||||||
deviceAddress?: string;
|
deviceAddress?: string;
|
||||||
@ -6363,6 +6397,16 @@ export type PostAggregationIoTplatformGetIoTplatformProductPropertyInfoAsyncResp
|
|||||||
|
|
||||||
export type PostAggregationIoTplatformGetIoTplatformProductPropertyInfoAsyncError = unknown;
|
export type PostAggregationIoTplatformGetIoTplatformProductPropertyInfoAsyncError = unknown;
|
||||||
|
|
||||||
|
export type PostAggregationIoTplatformUpdateIoTplatformProductPropertyInfoAsyncData = {
|
||||||
|
query?: {
|
||||||
|
input?: UpdateIoTPlatformProductPropertyInfoInput;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostAggregationIoTplatformUpdateIoTplatformProductPropertyInfoAsyncResponse = (unknown);
|
||||||
|
|
||||||
|
export type PostAggregationIoTplatformUpdateIoTplatformProductPropertyInfoAsyncError = unknown;
|
||||||
|
|
||||||
export type PostIoTplatformThingModelInfoCreateAsyncData = {
|
export type PostIoTplatformThingModelInfoCreateAsyncData = {
|
||||||
query?: {
|
query?: {
|
||||||
input?: IoTPlatformThingModelCreateInput;
|
input?: IoTPlatformThingModelCreateInput;
|
||||||
@ -6739,7 +6783,7 @@ export type PostOneNetProductProductStatusChangeAsyncError = unknown;
|
|||||||
|
|
||||||
export type PostOneNetProductUpdateThingModelAsyncData = {
|
export type PostOneNetProductUpdateThingModelAsyncData = {
|
||||||
query?: {
|
query?: {
|
||||||
input?: IdInput;
|
input?: StringIdInput;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@ 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';
|
||||||
import {
|
import {
|
||||||
|
postAggregationIoTplatformUpdateIoTplatformProductPropertyInfoAsync,
|
||||||
postFilesDownload,
|
postFilesDownload,
|
||||||
postFilesUpload,
|
postFilesUpload,
|
||||||
postOneNetProductDeleteAsync,
|
postOneNetProductDeleteAsync,
|
||||||
@ -334,6 +335,27 @@ function onThingModelManagement(record: any) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 物模型更新函数
|
||||||
|
async function onThingModelUpdate(record: any) {
|
||||||
|
try {
|
||||||
|
const resp = await postAggregationIoTplatformUpdateIoTplatformProductPropertyInfoAsync({
|
||||||
|
body: {
|
||||||
|
ioTPlatformType: 2, // OneNET 平台类型为 2
|
||||||
|
ioTPlatformProductId: record.ioTPlatformProductId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (resp.data) {
|
||||||
|
Message.success('物模型更新成功');
|
||||||
|
gridApi.reload();
|
||||||
|
} else {
|
||||||
|
Message.error('物模型更新失败');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('物模型更新失败:', error);
|
||||||
|
Message.error('物模型更新失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -386,6 +408,12 @@ function onThingModelManagement(record: any) {
|
|||||||
type: 'link',
|
type: 'link',
|
||||||
size: 'small',
|
size: 'small',
|
||||||
onClick: onThingModelManagement.bind(null, row),
|
onClick: onThingModelManagement.bind(null, row),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'OneNET物模型更新',
|
||||||
|
type: 'link',
|
||||||
|
size: 'small',
|
||||||
|
onClick: onThingModelUpdate.bind(null, row),
|
||||||
}
|
}
|
||||||
]" :drop-down-actions="[
|
]" :drop-down-actions="[
|
||||||
{
|
{
|
||||||
|
|||||||
@ -97,7 +97,7 @@ export const tableSchema: any = computed((): VxeGridProps['columns'] => [
|
|||||||
title: $t('common.action'),
|
title: $t('common.action'),
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: '250',
|
width: '380',
|
||||||
slots: { default: 'action' },
|
slots: { default: 'action' },
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user