Commit abf3ad93d40af0ac3a5ca2f99e50444ddbe6edeb

Authored by fengtao
1 parent 6298d498

fix:修改网关设备编辑回显问题0

@@ -186,7 +186,7 @@ export const getGATEWAYdevice = async (params: { organization: string }) => { @@ -186,7 +186,7 @@ export const getGATEWAYdevice = async (params: { organization: string }) => {
186 params, 186 params,
187 }); 187 });
188 return Promise.resolve<{ label: string; value: string }[]>( 188 return Promise.resolve<{ label: string; value: string }[]>(
189 - res.map((item) => ({ label: item.name, value: item.id })) 189 + res.map((item) => ({ label: item.name, value: item.tbDeviceId }))
190 ); 190 );
191 }; 191 };
192 192
@@ -304,7 +304,7 @@ @@ -304,7 +304,7 @@
304 async function handleEdit(record: Recordable) { 304 async function handleEdit(record: Recordable) {
305 if (record.deviceType === 'SENSOR') { 305 if (record.deviceType === 'SENSOR') {
306 const res = await getGATEWAY(record.tbDeviceId); 306 const res = await getGATEWAY(record.tbDeviceId);
307 - Reflect.set(record, 'gatewayId', res.id); 307 + Reflect.set(record, 'gatewayId', res.tbDeviceId);
308 } 308 }
309 openModal(true, { 309 openModal(true, {
310 isUpdate: true, 310 isUpdate: true,