|
|
@ -914,15 +914,14 @@ export default { |
|
|
|
//获取前一个月的日期 |
|
|
|
getLastMonthRange() { |
|
|
|
const now = new Date(); |
|
|
|
const firstDayOfCurrentMonth = new Date(now.getFullYear(), now.getMonth(), 1); |
|
|
|
const lastDayOfLastMonth = new Date(firstDayOfCurrentMonth - 1); |
|
|
|
const firstDayOfLastMonth = new Date(lastDayOfLastMonth.getFullYear(), lastDayOfLastMonth.getMonth(), 1); |
|
|
|
const startOfYear = new Date(now.getFullYear(), 0, 1); // 当前年份的1月1日 |
|
|
|
const endOfYear = new Date(now.getFullYear(), 11, 31); // 当前年份的12月31日 |
|
|
|
|
|
|
|
firstDayOfLastMonth.setHours(0, 0, 0, 0); |
|
|
|
lastDayOfLastMonth.setHours(23, 59, 59, 999); |
|
|
|
startOfYear.setHours(0, 0, 0, 0); |
|
|
|
endOfYear.setHours(23, 59, 59, 999); |
|
|
|
|
|
|
|
this.formData.queryDateStart =this.formatDate1(firstDayOfLastMonth), |
|
|
|
this.formData.queryDateEnd=this.formatDate1(lastDayOfLastMonth) |
|
|
|
this.formData.queryDateStart =this.formatDate1(startOfYear), |
|
|
|
this.formData.queryDateEnd=this.formatDate1(endOfYear) |
|
|
|
console.log(this.formData.queryDateEnd); |
|
|
|
}, |
|
|
|
//对部门进行统计 |
|
|
|