@@ -316,21 +316,12 @@ 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) {
- // 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
+ if (maxVal == 0) {
+ _item.maxVal = null
+ } else {
+ _item.maxVal = maxVal
+ }
}
this.orderTotal = res.data.count || 0
this.getTotal()