Commit c2d906287b2c4f0a0ea4fa380495a51385e1902c

Authored by ww
1 parent 30d6bd50

fix: DEFECT-948 data component open history data modal happend error

@@ -170,7 +170,7 @@ export const getShareBoardComponentInfo = (params: { boardId: string; tenantId: @@ -170,7 +170,7 @@ export const getShareBoardComponentInfo = (params: { boardId: string; tenantId:
170 */ 170 */
171 export const getAllDeviceByOrg = (organizationId: string, deviceProfileId?: string) => { 171 export const getAllDeviceByOrg = (organizationId: string, deviceProfileId?: string) => {
172 return defHttp.get<MasterDeviceList[]>({ 172 return defHttp.get<MasterDeviceList[]>({
173 - url: DeviceUrl.GET_DEVICE_MASTER, 173 + url: DeviceUrl.GET_DEVICE,
174 params: { deviceProfileId, organizationId }, 174 params: { deviceProfileId, organizationId },
175 }); 175 });
176 }; 176 };
@@ -135,6 +135,7 @@ export interface UpdateDataComponentParams { @@ -135,6 +135,7 @@ export interface UpdateDataComponentParams {
135 export interface MasterDeviceList { 135 export interface MasterDeviceList {
136 deviceType: 'DIRECT_CONNECTION' | 'GATEWAY'; 136 deviceType: 'DIRECT_CONNECTION' | 'GATEWAY';
137 deviceProfileId: string; 137 deviceProfileId: string;
  138 + tbDeviceId: string;
138 id: string; 139 id: string;
139 name: string; 140 name: string;
140 label?: string; 141 label?: string;
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 const { organizationId, value } = record; 80 const { organizationId, value } = record;
81 try { 81 try {
82 const options = await getAllDeviceByOrg(organizationId); 82 const options = await getAllDeviceByOrg(organizationId);
83 - const record = options.find((item) => item.id === value); 83 + const record = options.find((item) => item.tbDeviceId === value);
84 await getDeviceAttribute(record!); 84 await getDeviceAttribute(record!);
85 await nextTick(); 85 await nextTick();
86 method.updateSchema({ 86 method.updateSchema({