From 7d210afd7f9beccae57f5d234fbbb5dc3e07f435 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Mon, 30 Jul 2018 09:06:23 +0800
Subject: [PATCH] Merge branch 'master' of http://blit.7drlb.com:8888/r/screen_demo2
---
src/app/routes/statistics/calendar/calendar.component.ts | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/app/routes/statistics/calendar/calendar.component.ts b/src/app/routes/statistics/calendar/calendar.component.ts
index 526fa2c..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,12 +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(event,day) {
- console.log(day);
+ // ��������������� ���������
+ 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