From c69ddde7828d777f04c6468c269aaa0aa03d72c9 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 02 Aug 2018 09:50:58 +0800
Subject: [PATCH] 文件修改
---
src/app/routes/statistics/calendar/calendar.component.ts | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/app/routes/statistics/calendar/calendar.component.ts b/src/app/routes/statistics/calendar/calendar.component.ts
index 2ba1c98..7054066 100644
--- a/src/app/routes/statistics/calendar/calendar.component.ts
+++ b/src/app/routes/statistics/calendar/calendar.component.ts
@@ -32,7 +32,8 @@
}
ngOnInit() {
- const day = Number(moment().format('DD'));
+ // const day = Number(moment().format('DD'));
+ const day = 31;
for(let index = 1;index <= day; index++) {
this.calendarDayCells[('0'+index).slice(-2)] = {
status: 'processing',
@@ -40,8 +41,11 @@
data: {}
}
}
- const startTime = this.getPeriodDate(new Date(),TimeUnits.DAY,'start');
- const endTime = this.getPeriodDate(new Date(),TimeUnits.HOUR,'end');
+ // const startTime = this.getPeriodDate(new Date(),TimeUnits.DAY,'start');
+ // const endTime = this.getPeriodDate(new Date(),TimeUnits.HOUR,'end');
+ const mo = moment().subtract(1,"months");
+ const startTime = this.getPeriodDate(mo.toDate(),TimeUnits.DAY,'start');
+ const endTime = this.getPeriodDate(mo.toDate(),TimeUnits.DAY,'end');
this.http.get(
'demo/get-dayaqis',{
startTime: startTime,
@@ -50,6 +54,7 @@
).subscribe(
(res: any[]) => {
if(!!res && res.length >0) {
+ debugger;
Object.keys(this.calendarDayCells).forEach(
(key) => {
const index = Number(key) -1;
--
Gitblit v1.8.0