```
getSummaries(param) {
const {
columns,
data
} \= param;
const sums \= \[\];
var size \= ''
var length \= ''
columns.forEach((column, index) \=> {
const values \= data.map(item \=> Number(item\[column.property\]));
if (!values.every(value \=> isNaN(value))) {
sums\[index\] \= values.reduce((prev, curr) \=> {
const value \= Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums\[index\];
length \= data.length
} else {
sums\[index\] \= 'N/A';
}
});
return \['合计', (sums\[1\] / length).toFixed(2) + 'kW·h',(sums\[2\] / length).toFixed(2) + 'kW·h',(sums\[3\] / length).toFixed(2) + '%'\];
}
```