diff --git a/src/pages/Simulation/index.tsx b/src/pages/Simulation/index.tsx index a6f3102..8c23ea2 100644 --- a/src/pages/Simulation/index.tsx +++ b/src/pages/Simulation/index.tsx @@ -368,8 +368,13 @@ const Page = () => { message.warn('请添加设备物理标志'); return; } - const deviceList = dataSave.current.map((e: any) => { - return { id: e.id, status: '1' }; + let deviceList: any = []; + dataSave.current.forEach((e: any) => { + deviceList.push(e.id); + deviceList = deviceList.concat(e.keys || []); + }); + deviceList = deviceList.map((id: any) => { + return { id, status: '1' }; }); const res = await Fetch(`/openi/device/configureDevice`, { method: 'post',