From b473f47ba0bbdf32f62d5ce325f551e9833574a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 25 Nov 2022 16:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=B3=A1=E7=BA=BF?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/scada/NorthFoamerMesPlan2.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan2.html b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan2.html index a8d7224..bfda6d7 100644 --- a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan2.html +++ b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan2.html @@ -496,13 +496,13 @@ let dataInit = [] let dataRes = [] data.forEach(e => { - if (!Object.keys(name).includes(e.orderType)) { - name[e.orderType] = [e.deviceID] + if (!Object.keys(name).includes(e.deviceID)) { + name[e.deviceID] = [e.orderType] } else { - let arr = name[e.orderType] - if (!arr.includes(e.deviceID)) { - arr.push(e.deviceID) - name[e.orderType] = arr + let arr = name[e.deviceID] + if (!arr.includes(e.orderType)) { + arr.push(e.orderType) + name[e.deviceID] = arr } } }) @@ -510,7 +510,7 @@ name[e].forEach(val => { let arr = [] data.forEach(item => { - if (item.orderType === e && item.deviceID === val) { + if (item.deviceID === e && item.orderType === val) { arr.push(item) } })