修改发泡线生产统计数据表格

master
夜笙歌 2 years ago
parent b473f47ba0
commit 8be21fdfe4

@ -503,13 +503,13 @@
let dataInit = [] let dataInit = []
let dataRes = [] let dataRes = []
data.forEach(e => { data.forEach(e => {
if (!Object.keys(name).includes(e.orderType)) { if (!Object.keys(name).includes(e.deviceID)) {
name[e.orderType] = [e.deviceID] name[e.deviceID] = [e.orderType]
} else { } else {
let arr = name[e.orderType] let arr = name[e.deviceID]
if (!arr.includes(e.deviceID)) { if (!arr.includes(e.orderType)) {
arr.push(e.deviceID) arr.push(e.orderType)
name[e.orderType] = arr name[e.deviceID] = arr
} }
} }
}) })
@ -517,7 +517,7 @@
name[e].forEach(val => { name[e].forEach(val => {
let arr = [] let arr = []
data.forEach(item => { data.forEach(item => {
if (item.orderType === e && item.deviceID === val) { if (item.deviceID === e && item.orderType === val) {
arr.push(item) arr.push(item)
} }
}) })

Loading…
Cancel
Save