From 2dbc23d09438a1a63047cf54c68c723a5ca6ed9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8D=9A=E6=96=87?= <1179111926@qq.com> Date: Mon, 26 Sep 2022 20:04:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E8=A3=85=E4=BC=A0?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Simulation/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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',