From 6efb2a0076a544b5714bccba214d81904264540d Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Tue, 12 Jun 2018 08:49:31 +0800
Subject: [PATCH] 报表展示 增加镇村选项
---
src/app/routes/dashboard/workplace/workplace.component.ts | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/app/routes/dashboard/workplace/workplace.component.ts b/src/app/routes/dashboard/workplace/workplace.component.ts
index d8d79af..bc27c03 100644
--- a/src/app/routes/dashboard/workplace/workplace.component.ts
+++ b/src/app/routes/dashboard/workplace/workplace.component.ts
@@ -20,7 +20,7 @@
})
export class DashboardWorkplaceComponent implements OnInit, OnDestroy {
- totalDeviceCountList: any[] = [];
+ totalDeviceCountList = null;
totalDeviceCount = '';
avgDeviceCount = '';
deviceCountLoading = true;
@@ -174,14 +174,9 @@
if (!!rWtihAvg.code && !!rWithToltal&&!!rWithList.code) {
this.avgDeviceCount = ToolsService.toThousands(rWtihAvg.data.toString());
this.totalDeviceCount = ToolsService.toThousands(rWithToltal.data.toString());
- rWithList.data.forEach( item =>{
- this.totalDeviceCountList.push(
- {
- x:item.time,
- y:item.count
- }
- );
- });
+ this.totalDeviceCountList = rWithList.data.map(item => {
+ return {x:item.time,y:item.count};
+ })
this.operNormalPercent = Math.round(rWithNormal.data/rWithToltal.data*100);
this.deviceCountLoading = false;
this.operationLoading = false;
--
Gitblit v1.8.0