|
|
@ -70,32 +70,35 @@ Component({ |
|
|
|
devicePixelRatio: dpr // 像素比
|
|
|
|
}); |
|
|
|
canvas.setChart(chart); |
|
|
|
|
|
|
|
// let params = {
|
|
|
|
// "queryDateStart": formatTime(new Date(now.getFullYear(), now.getMonth() - 11)),
|
|
|
|
// "queryDateEnd":formatTime(new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59))
|
|
|
|
// }
|
|
|
|
let params = { |
|
|
|
startTime: '', |
|
|
|
endTime: '' |
|
|
|
queryDateStart: '', |
|
|
|
queryDateEnd: '' |
|
|
|
} |
|
|
|
let now = new Date(); |
|
|
|
if (this.data.typeCondition === 0) { |
|
|
|
params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth(), 1)) |
|
|
|
params.queryDateStart = formatTime(new Date(now.getFullYear(), now.getMonth(), 1)) |
|
|
|
} |
|
|
|
if (this.data.typeCondition === 1) { |
|
|
|
params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 1)); |
|
|
|
params.queryDateStart = formatTime(new Date(now.getFullYear(), now.getMonth() - 1)); |
|
|
|
} |
|
|
|
if (this.data.typeCondition === 2) { |
|
|
|
params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 2)); |
|
|
|
params.queryDateStart = formatTime(new Date(now.getFullYear(), now.getMonth() - 2)); |
|
|
|
} |
|
|
|
if (this.data.typeCondition === 3) { |
|
|
|
params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 5)); |
|
|
|
params.queryDateStart = formatTime(new Date(now.getFullYear(), now.getMonth() - 5)); |
|
|
|
} |
|
|
|
if (this.data.typeCondition === 4) { |
|
|
|
params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 11)); |
|
|
|
params.queryDateStart = formatTime(new Date(now.getFullYear(), now.getMonth() - 11)); |
|
|
|
} |
|
|
|
|
|
|
|
if (this.data.typeCondition === 1) { |
|
|
|
params.endTime = formatTime(new Date(now.getFullYear(), now.getMonth(), 0, 23, 59, 59)) |
|
|
|
params.queryDateEnd = formatTime(new Date(now.getFullYear(), now.getMonth(), 0, 23, 59, 59)) |
|
|
|
} else { |
|
|
|
params.endTime = formatTime(new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59)) |
|
|
|
params.queryDateEnd = formatTime(new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59)) |
|
|
|
} |
|
|
|
dwdEventReport(params).then(({data}) => { |
|
|
|
console.log(this.tabValue,'this.tabValue') |
|
|
|