From 8be21fdfe4b1cfd5c3f2f1bd34bc9b57790f9e5d 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:15:52 +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/NorthFoamerMesPlan.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html index af97423..86d2491 100644 --- a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html +++ b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html @@ -503,13 +503,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 } } }) @@ -517,7 +517,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) } })