summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/alarm/alarm.component.ts
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-08-23 17:02:50 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-08-23 17:33:55 +0800
commitc048639a46be107578e8ce0d8721bc7b5d4fe791 (patch)
tree3dd670c62d70897df604237bd99fc2562045fe9f /usecaseui-portal/src/app/views/alarm/alarm.component.ts
parent1ed096510209590d1656489a74692eb5ebcdeee4 (diff)
feat:optimize public function and home page api
Change-Id: Idf849f381af9adbfae7d8a6e012d8949d170c666 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/alarm/alarm.component.ts')
-rw-r--r--usecaseui-portal/src/app/views/alarm/alarm.component.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/usecaseui-portal/src/app/views/alarm/alarm.component.ts b/usecaseui-portal/src/app/views/alarm/alarm.component.ts
index c2a567bd..c3223236 100644
--- a/usecaseui-portal/src/app/views/alarm/alarm.component.ts
+++ b/usecaseui-portal/src/app/views/alarm/alarm.component.ts
@@ -16,6 +16,7 @@
import { Component, OnInit, Input, Output, EventEmitter, HostBinding, Pipe, PipeTransform } from '@angular/core';
import { HomesService } from '../../core/services/homes.service';
import { showHideAnimate, slideToRight } from '../../shared/utils/animates';
+import { Util } from '../../shared/utils/utils';
import { DatePipe } from '@angular/common';
@Component({
selector: 'app-alarm',
@@ -33,7 +34,7 @@ export class AlarmComponent implements OnInit {
public pageSize: number = 10;
public sourceName: string = '';
public priority: string = '';
- public startTime: string = this.myhttp.dateformater(Date.now() - 30 * 24 * 60 * 60 * 1000);
+ public startTime: string = this.Util.dateformater(Date.now() - 30 * 24 * 60 * 60 * 1000);
public endTime: string = this.datePipe.transform(new Date(), 'yyyy-MM-dd HH:mm:ss');
public vfStatus: string = '';
public sourceNameList: Array<any> = ['---auto---'];
@@ -41,7 +42,9 @@ export class AlarmComponent implements OnInit {
sourcenames: any;
constructor(
private datePipe: DatePipe,
- private myhttp: HomesService) { }
+ private myhttp: HomesService,
+ private Util: Util
+ ) { }
ngOnInit() {
this.getAlarmFormData();
this.getSourceNames();