| @@ -375,6 +375,7 @@ export default { | |||||
| pamaet.dateType=this.TimetoAhoose | pamaet.dateType=this.TimetoAhoose | ||||
| } | } | ||||
| this.$api.http.houseData(pamaet).then((res) => { | this.$api.http.houseData(pamaet).then((res) => { | ||||
| console.log(res) | |||||
| let arr=[] | let arr=[] | ||||
| res.data.list.map(item=>{ | res.data.list.map(item=>{ | ||||
| let obj={} | let obj={} | ||||
| @@ -382,6 +383,7 @@ export default { | |||||
| obj.zxl=item.prohibitedCustomer | obj.zxl=item.prohibitedCustomer | ||||
| arr.push(obj) | arr.push(obj) | ||||
| }) | }) | ||||
| console.log(arr) | |||||
| arr=this.dealData(arr) | arr=this.dealData(arr) | ||||
| this.objList3={ | this.objList3={ | ||||
| avg: res.data.avg || 0, | avg: res.data.avg || 0, | ||||
| @@ -389,6 +391,7 @@ export default { | |||||
| sum:res.data.sum || 0, | sum:res.data.sum || 0, | ||||
| list:arr || [] | list:arr || [] | ||||
| } | } | ||||
| console.log(this.objList3) | |||||
| }) | }) | ||||
| }, | }, | ||||
| houseData4(){ | houseData4(){ | ||||
| @@ -479,7 +482,7 @@ export default { | |||||
| dealData(arr){ | dealData(arr){ | ||||
| let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3 | let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3 | ||||
| arr.map(item=>{ | arr.map(item=>{ | ||||
| item.zxl1=Math.floor(item.zxl/num*100) | |||||
| item.zxl1=Math.floor(item.zxl/num*100) || 0; | |||||
| }) | }) | ||||
| return arr | return arr | ||||
| }, | }, | ||||