From 9634327c9094fb2d2b5bb2a3e630971cd65d3112 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 13 Mar 2018 13:37:25 +0800
Subject: [PATCH] 工作台数据统计页面
---
src/app/routes/dashboard/workplace/workplace.component.ts | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/app/routes/dashboard/workplace/workplace.component.ts b/src/app/routes/dashboard/workplace/workplace.component.ts
index 6e47987..7698053 100644
--- a/src/app/routes/dashboard/workplace/workplace.component.ts
+++ b/src/app/routes/dashboard/workplace/workplace.component.ts
@@ -12,6 +12,11 @@
styleUrls: ['./workplace.component.less']
})
export class DashboardWorkplaceComponent implements OnInit, OnDestroy {
+
+ totalDeviceCountList: any[] = [];
+ totalDeviceCount = 0;
+ avgDeviceCount: string;
+
notice: any[] = [];
activities: any[] = [];
radarData: any[] = [];
@@ -102,6 +107,21 @@
private http2: HttpClient) {}
ngOnInit() {
+
+ const today = new Date().getTime();
+ const fakeDC = [60, 135, 70, 112, 80, 170, 200, 140, 52, 119, 164, 230];
+ for (let i = 0; i < 12; i += 1) {
+ this.totalDeviceCountList.push({
+ x: moment(today).subtract(-1*i, 'months').format(
+ "YYYY-MM"
+ ),
+ y: fakeDC[i]
+ });
+ this.totalDeviceCount += fakeDC[i];
+ }
+ this.avgDeviceCount = (this.totalDeviceCount/12).toFixed(0);
+
+
const visitData = [];
const beginDay = new Date().getTime();
@@ -497,6 +517,9 @@
});
return item;
});
+
+
+
}
setDate(type: any) {
--
Gitblit v1.8.0