From e2750980d182c135384dd3b691b2d28e297b7145 Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Tue, 31 Jul 2018 14:48:43 +0800 Subject: [PATCH] 扬尘监控 菜单 调整 --- src/app/routes/statistics/calendar/calendar.component.ts | 31 +++++++++++++++++++++++++++++-- 1 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/app/routes/statistics/calendar/calendar.component.ts b/src/app/routes/statistics/calendar/calendar.component.ts index c7fc7c6..09e03c1 100644 --- a/src/app/routes/statistics/calendar/calendar.component.ts +++ b/src/app/routes/statistics/calendar/calendar.component.ts @@ -14,7 +14,13 @@ export class CalendarComponent implements OnInit, OnDestroy { data: any = {}; - + public calendarDayCells:{ + [key : string] : { + 'status': string, + 'statusName': string, + 'data': {} + } + } = {}; constructor( private deviceService: DeviceService, private http: _HttpClient, @@ -23,9 +29,30 @@ } ngOnInit() { - + const day = Number(moment().format('DD')); + for(let index = 1;index <= day; index++) { + this.calendarDayCells[('0'+index).slice(-2)] = { + status: 'processing', + statusName: '���������', + data: {} + } + } + // console.log(this.calendarDayCells); } ngOnDestroy(): void { } + // ��������������� ��������� + calendarClick(mo: moment.Moment) { + console.log(mo.format('DD')); + } + public isExpire(mo: moment.Moment):boolean { + // console.log(moment().valueOf()); + // console.log(mo.valueOf()); + // console.log(moment().valueOf() < mo.valueOf()); + return moment().valueOf() < mo.valueOf(); + } + loadCalendar(event) { + console.log(event); + } } -- Gitblit v1.8.0