diff --git a/src/views/modules/shequzhili/analysis/css/index.scss b/src/views/modules/shequzhili/analysis/css/index.scss index c368df410..16a8e38a8 100644 --- a/src/views/modules/shequzhili/analysis/css/index.scss +++ b/src/views/modules/shequzhili/analysis/css/index.scss @@ -136,6 +136,7 @@ border-left: #777 solid 1px; color: #333333; text-align: center; margin-left: 5px; + white-space: nowrap; } .text1{ font-size: 16px; @@ -179,6 +180,7 @@ border-left: #777 solid 1px; color: #666666; text-align: center; margin-left: 5px; + white-space: nowrap; } .row_right { @@ -345,6 +347,7 @@ border-left: #777 solid 1px; color: #333333; text-align: center; margin-left: 5px; + white-space: nowrap; } .row_right { diff --git a/src/views/modules/shequzhili/analysis/index.vue b/src/views/modules/shequzhili/analysis/index.vue index fd5a6eee0..b21a22bdb 100644 --- a/src/views/modules/shequzhili/analysis/index.vue +++ b/src/views/modules/shequzhili/analysis/index.vue @@ -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); }, //对部门进行统计