更新接口
This commit is contained in:
parent
57d65c7e77
commit
c6b8339a02
@ -585,7 +585,7 @@ export const CreateDataDictinaryInputSchema = {
|
||||
} as const;
|
||||
|
||||
export const CreateDeviceAggregationInputSchema = {
|
||||
required: ['deviceAddress', 'ioTPlatform', 'ioTPlatformProductId', 'platformPassword'],
|
||||
required: ['deviceAddress', 'ioTPlatform', 'ioTPlatformProductId'],
|
||||
type: 'object',
|
||||
properties: {
|
||||
deviceAddress: {
|
||||
@ -596,25 +596,10 @@ export const CreateDeviceAggregationInputSchema = {
|
||||
ioTPlatform: {
|
||||
'$ref': '#/components/schemas/IoTPlatformTypeEnum'
|
||||
},
|
||||
platformPassword: {
|
||||
minLength: 1,
|
||||
type: 'string',
|
||||
description: '电表密码'
|
||||
},
|
||||
ioTPlatformProductId: {
|
||||
minLength: 1,
|
||||
type: 'string',
|
||||
description: '集中器在物联网平台中对应的产品Id'
|
||||
},
|
||||
ioTPlatformDeviceOpenInfo: {
|
||||
type: 'string',
|
||||
description: '集中器在物联网平台中对应的设备Id或者名称',
|
||||
nullable: true
|
||||
},
|
||||
ioTPlatformAccountId: {
|
||||
type: 'string',
|
||||
description: '物联网平台中对应的账号Id',
|
||||
nullable: true
|
||||
}
|
||||
},
|
||||
additionalProperties: false,
|
||||
@ -1216,6 +1201,10 @@ export const DeviceManagementInfoDtoSchema = {
|
||||
type: 'string',
|
||||
description: '物联网平台返回的响应信息',
|
||||
nullable: true
|
||||
},
|
||||
isPlatformPushSuccess: {
|
||||
type: 'boolean',
|
||||
description: '物联网平台推送是否成功'
|
||||
}
|
||||
},
|
||||
additionalProperties: false
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -215,22 +215,10 @@ export type CreateDeviceAggregationInput = {
|
||||
*/
|
||||
deviceAddress: string;
|
||||
ioTPlatform: IoTPlatformTypeEnum;
|
||||
/**
|
||||
* 电表密码
|
||||
*/
|
||||
platformPassword: string;
|
||||
/**
|
||||
* 集中器在物联网平台中对应的产品Id
|
||||
*/
|
||||
ioTPlatformProductId: string;
|
||||
/**
|
||||
* 集中器在物联网平台中对应的设备Id或者名称
|
||||
*/
|
||||
ioTPlatformDeviceOpenInfo?: (string) | null;
|
||||
/**
|
||||
* 物联网平台中对应的账号Id
|
||||
*/
|
||||
ioTPlatformAccountId?: (string) | null;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -557,6 +545,10 @@ export type DeviceManagementInfoDto = {
|
||||
* 物联网平台返回的响应信息
|
||||
*/
|
||||
ioTPlatformResponse?: (string) | null;
|
||||
/**
|
||||
* 物联网平台推送是否成功
|
||||
*/
|
||||
isPlatformPushSuccess?: boolean;
|
||||
};
|
||||
|
||||
export type DeviceManagementInfoDtoPagedResultDto = {
|
||||
@ -4522,6 +4514,16 @@ export type PostAggregationDeviceFindByIdAsyncResponse = (DeviceManagementInfoDt
|
||||
|
||||
export type PostAggregationDeviceFindByIdAsyncError = unknown;
|
||||
|
||||
export type PostAggregationDeviceRepushDeviceInfoToIoTplatformData = {
|
||||
query?: {
|
||||
input?: IdInput;
|
||||
};
|
||||
};
|
||||
|
||||
export type PostAggregationDeviceRepushDeviceInfoToIoTplatformResponse = (DeviceManagementInfoDto);
|
||||
|
||||
export type PostAggregationDeviceRepushDeviceInfoToIoTplatformError = unknown;
|
||||
|
||||
export type PostDeviceInfoFindByDeviceAddressData = {
|
||||
query?: {
|
||||
deviceAddress?: string;
|
||||
|
||||
@ -137,7 +137,7 @@ export const addDeviceFormSchema: any = computed(() => [
|
||||
pageSize: 1000,
|
||||
},
|
||||
},
|
||||
labelField: 'ProductName',
|
||||
labelField: 'label',
|
||||
valueField: 'ioTPlatformProductId',
|
||||
immediate: true,
|
||||
afterFetch: (res: any) => {
|
||||
@ -146,26 +146,29 @@ export const addDeviceFormSchema: any = computed(() => [
|
||||
const data = res.data;
|
||||
|
||||
// 确保返回的是数组格式
|
||||
let items = [];
|
||||
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;
|
||||
items = data;
|
||||
} else if (data && Array.isArray(data.items)) {
|
||||
items = data.items;
|
||||
} else if (data && Array.isArray(data.data)) {
|
||||
items = data.data;
|
||||
}
|
||||
|
||||
// 为每个产品项添加组合标签
|
||||
return items.map((item: any) => ({
|
||||
...item,
|
||||
label: `${item.productName || item.ProductName || ''} (${item.ioTPlatformProductId || ''})`,
|
||||
}));
|
||||
}
|
||||
|
||||
// 如果都不是,返回空数组
|
||||
return [];
|
||||
},
|
||||
placeholder: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingAccountName')}`,
|
||||
placeholder: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingProductName')}`,
|
||||
},
|
||||
rules: z.string().min(1, {
|
||||
message: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingAccountName')}`,
|
||||
message: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingProductName')}`,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@ -224,7 +227,7 @@ export const editDeviceFormSchemaEdit: any = computed(() => [
|
||||
pageSize: 1000,
|
||||
},
|
||||
},
|
||||
labelField: 'ProductName',
|
||||
labelField: 'label',
|
||||
valueField: 'ioTPlatformProductId',
|
||||
immediate: true,
|
||||
afterFetch: (res: any) => {
|
||||
@ -233,26 +236,29 @@ export const editDeviceFormSchemaEdit: any = computed(() => [
|
||||
const data = res.data;
|
||||
|
||||
// 确保返回的是数组格式
|
||||
let items = [];
|
||||
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;
|
||||
items = data;
|
||||
} else if (data && Array.isArray(data.items)) {
|
||||
items = data.items;
|
||||
} else if (data && Array.isArray(data.data)) {
|
||||
items = data.data;
|
||||
}
|
||||
|
||||
// 为每个产品项添加组合标签
|
||||
return items.map((item: any) => ({
|
||||
...item,
|
||||
label: `${item.productName || item.ProductName || ''} (${item.ioTPlatformProductId || ''})`,
|
||||
}));
|
||||
}
|
||||
|
||||
// 如果都不是,返回空数组
|
||||
return [];
|
||||
},
|
||||
placeholder: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingAccountName')}`,
|
||||
placeholder: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingProductName')}`,
|
||||
},
|
||||
rules: z.string().min(1, {
|
||||
message: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingAccountName')}`,
|
||||
message: `${$t('common.pleaseSelect')}${$t('abp.OneNETManagement.BelongingProductName')}`,
|
||||
}),
|
||||
},
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user