From 936bb39145eee86530f61d3345f8125ddd778225 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Tue, 13 Mar 2018 16:35:07 +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