|
@@ -316,12 +316,19 @@ export default {
|
|
|
const _item = res.data.list[i]
|
|
|
// 找出可回收垃圾库存量最大的值
|
|
|
const arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.metPla, _item.glass, _item.recycling]
|
|
|
- if (arr) {
|
|
|
- arr.some(item => {
|
|
|
- const isTrue = item != 0
|
|
|
- console.log(isTrue)
|
|
|
- })
|
|
|
- }
|
|
|
+ // if (arr) {
|
|
|
+ // const maxVal = Math.max(...arr)
|
|
|
+ // arr.some(item => {
|
|
|
+ // const isTrue = item === 0
|
|
|
+ // console.log(isTrue)
|
|
|
+ // if (isTrue == false) {
|
|
|
+ // // const maxVal = Math.max(...arr)
|
|
|
+ // _item.maxVal = maxVal
|
|
|
+ // } else {
|
|
|
+ // _item.maxVal = ''
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
const maxVal = Math.max(...arr)
|
|
|
_item.maxVal = maxVal
|
|
|
}
|