fengxiang
2018-08-02 c69ddde7828d777f04c6468c269aaa0aa03d72c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Component, OnInit } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd';
import { _HttpClient } from '@delon/theme';
import { DeviceControllerService } from '../device-controller/device-controller.service';
 
@Component({
    selector: 'app-device-data',
    templateUrl: './device-data.component.html'
})
export class DeviceDataComponent implements OnInit {
    data = {
        advancedOperation1: [],
        advancedOperation2: [],
        advancedOperation3: []
    };
    public get deviceData() {
        return this.deviceControllerService.data;
    }
    constructor(
        public msg: NzMessageService, 
        private http: _HttpClient,
        private deviceControllerService:DeviceControllerService,
    ) {}
    /**
     * toDeviceStatus
     */
    public toDeviceStatus() {
        this.deviceControllerService.incumbent = 'status';
    }
    ngOnInit() {
        this.http.get('/profile/advanced').subscribe((res: any) => this.data = res);
    }
}