|
@@ -187,7 +187,7 @@ export default {
|
|
|
if (this.screenWidth < 1640) {
|
|
|
return 40
|
|
|
} else {
|
|
|
- return 0
|
|
|
+ return 30
|
|
|
}
|
|
|
},
|
|
|
// 各回收物类型占比
|
|
@@ -392,11 +392,32 @@ export default {
|
|
|
this.beginDate = quickType[this.curentType][0].format('YYYY-MM-DD')
|
|
|
this.endDate = quickType[this.curentType][1].format('YYYY-MM-DD')
|
|
|
console.log(this.searchForm.queryWord, '1111111')
|
|
|
+ this.resetChartsData()
|
|
|
this.getPageData()
|
|
|
},
|
|
|
+ // 重置图表数据
|
|
|
+ resetChartsData () {
|
|
|
+ this.XdaysData = [] // x轴置空
|
|
|
+ this.XdaysData1 = [] // x轴置空
|
|
|
+ // 各回收物类型占比
|
|
|
+ this.totalGroupRubbiData = {
|
|
|
+ cleanWeight: 0,
|
|
|
+ cleanReportData: []
|
|
|
+ }
|
|
|
+ // 各清运司机占比
|
|
|
+ this.totalGroupUserData = {
|
|
|
+ cleanWeight: 0,
|
|
|
+ cleanReportData: []
|
|
|
+ }
|
|
|
+ // 重置清运量趋势图表数据
|
|
|
+ this.clearnChartData[0].data = []
|
|
|
+ this.clearnChartData[1].data = []
|
|
|
+ // 重置各回收物类型清运数据
|
|
|
+ this.hswTypeBarData.map(item => item.data = [])
|
|
|
+ this.hswTypeLineData.map(item => item.data = [])
|
|
|
+ },
|
|
|
// 根据查询条件获取所有数据
|
|
|
getPageData () {
|
|
|
- this.XdaysData = [] // x轴置空
|
|
|
const params = {
|
|
|
beginDate: this.beginDate + ' 00:00:00',
|
|
|
endDate: this.endDate + ' 00:00:00',
|
|
@@ -430,12 +451,13 @@ export default {
|
|
|
}
|
|
|
for (var key in b) {
|
|
|
this.XdaysData.push(key)
|
|
|
- const val = Number(a[key] / 1000).toFixed(2)
|
|
|
+ const val = Number(b[key] / 1000).toFixed(2)
|
|
|
this.clearnChartData[1].data.push(val)
|
|
|
max.push(val)
|
|
|
}
|
|
|
// 计算最大值
|
|
|
this.maxClearnData = Math.max.apply(null, max)
|
|
|
+ this.isNoData = false
|
|
|
} else {
|
|
|
this.isNoData = true
|
|
|
}
|
|
@@ -460,6 +482,7 @@ export default {
|
|
|
|
|
|
this.hswTypeBarData = this.formAtGroupDateAndRubbishType(data, this.hswTypeBarData)
|
|
|
this.hswTypeLineData = this.formAtGroupDateAndRubbishType(data, this.hswTypeLineData)
|
|
|
+ this.isNoData1 = false
|
|
|
} else {
|
|
|
this.isNoData1 = true
|
|
|
}
|