| | |
| | | public get deviceData() { |
| | | return this.deviceControllerService.data; |
| | | } |
| | | public get deviceStatusName() { |
| | | if(!!this.deviceControllerService |
| | | &&this.deviceControllerService.data |
| | | &&this.deviceControllerService.data.state) { |
| | | switch (this.deviceControllerService.data.state) { |
| | | case "0": |
| | | return '正常'; |
| | | case "1": |
| | | return '轻度'; |
| | | case "2": |
| | | return '中度'; |
| | | case "3": |
| | | return '严重'; |
| | | default: |
| | | return '离线'; |
| | | } |
| | | }else { |
| | | return '离线'; |
| | | } |
| | | } |
| | | 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); |
| | | } |