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) } })