修改接口

master
夜笙歌 11 months ago
parent d4266c2e7d
commit 9b94d760f0

@ -1278,6 +1278,27 @@ export default {
value19: val.TWELVEHOUR,
}
})
this.scrollTableData1 = table
let totalArr = table.slice(0,6)
this.total = {
value1:((totalArr.filter(val=>val.value3 === '生产中').length / 6)*100).toFixed(2),
value2:totalArr.map(val=>val.value5).reduce((acc, curr) => acc + curr, 0),
value3:totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0),
value4:((totalArr.map(val=>val.value6).reduce((acc, curr) => acc + curr, 0)/totalArr.map(val=>val.value4).reduce((acc, curr) => acc + curr, 0))*100).toFixed(2),
value5:totalArr.map(val=>val.value8).reduce((acc, curr) => acc + curr, 0),
value6:totalArr.map(val=>val.value9).reduce((acc, curr) => acc + curr, 0),
value7:totalArr.map(val=>val.value10).reduce((acc, curr) => acc + curr, 0),
value8:totalArr.map(val=>val.value11).reduce((acc, curr) => acc + curr, 0),
value9:totalArr.map(val=>val.value12).reduce((acc, curr) => acc + curr, 0),
value10:totalArr.map(val=>val.value13).reduce((acc, curr) => acc + curr, 0),
value11:totalArr.map(val=>val.value14).reduce((acc, curr) => acc + curr, 0),
value12:totalArr.map(val=>val.value15).reduce((acc, curr) => acc + curr, 0),
value13:totalArr.map(val=>val.value16).reduce((acc, curr) => acc + curr, 0),
value14:totalArr.map(val=>val.value17).reduce((acc, curr) => acc + curr, 0),
value15:totalArr.map(val=>val.value18).reduce((acc, curr) => acc + curr, 0),
value16:totalArr.map(val=>val.value19).reduce((acc, curr) => acc + curr, 0),
}
})
}
},

Loading…
Cancel
Save