|
@@ -196,9 +196,12 @@
|
|
|
beginDate: this.searchForm.beginDate?moment(this.searchForm.beginDate).format('YYYY-MM-DD 00:00:00'):'',
|
|
|
endDate: this.searchForm.endDate ? moment(this.searchForm.endDate).format('YYYY-MM-DD 23:59:59'):''}).then(res=>{
|
|
|
if(res.status==200){
|
|
|
- this.otherTotal=res.data.GATHER_OTHER ? (res.data.GATHER_OTHER/1000).toFixed(3)/1:0
|
|
|
- this.jianzhuTotal=res.data.GATHER_BUILDING ? (res.data.GATHER_BUILDING/1000).toFixed(3)/1:0
|
|
|
- this.chuyuTotal=res.data.GATHER_KITCHEN? (res.data.GATHER_KITCHEN/1000).toFixed(3)/1:0
|
|
|
+ const a = res.data.find(item=>item.rubbishType=='GATHER_BUILDING')
|
|
|
+ const b = res.data.find(item=>item.rubbishType=='GATHER_OTHER')
|
|
|
+ const c = res.data.find(item=>item.rubbishType=='GATHER_KITCHEN')
|
|
|
+ this.jianzhuTotal= a ? (a.rubbishWeight/1000).toFixed(3)/1 : '0'
|
|
|
+ this.chuyuTotal= c ? (c.rubbishWeight/1000).toFixed(3)/1 : '0'
|
|
|
+ this.otherTotal= b ? (b.rubbishWeight/1000).toFixed(3)/1 : '0'
|
|
|
}
|
|
|
console.log(res)
|
|
|
this.titleStatus = false
|