From 4cec89117e98c5378f03879e407ee44f494eaa8e Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Fri, 03 Aug 2018 16:23:03 +0800
Subject: [PATCH] 图像 抓拍
---
src/app/routes/raise-dust/image-grabbing/image-grabbing.component.ts | 34 +++++++++++++++++++++++++++-------
1 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/src/app/routes/raise-dust/image-grabbing/image-grabbing.component.ts b/src/app/routes/raise-dust/image-grabbing/image-grabbing.component.ts
index dcc2093..d40449f 100644
--- a/src/app/routes/raise-dust/image-grabbing/image-grabbing.component.ts
+++ b/src/app/routes/raise-dust/image-grabbing/image-grabbing.component.ts
@@ -1,5 +1,7 @@
-import { Component, OnInit } from '@angular/core';
-import { _HttpClient } from '@delon/theme';
+import {environment} from '../../../../environments/environment';
+import {HttpClient} from '@angular/common/http';
+import {Component, OnInit} from '@angular/core';
+import * as moment from 'moment';
@Component({
selector: 'app-image-grabbing',
@@ -7,11 +9,29 @@
})
export class ImageGrabbingComponent implements OnInit {
- constructor(
- private http: _HttpClient
- ) { }
+ [x: string]: any;
+
+ constructor(
+ private http: HttpClient
+ ) {}
- ngOnInit() {
- }
+ ngOnInit() {
+ this.http.get(environment.SERVER_BASH_URL + 'monitor-point/list/region', {params: {name: 'areaCode', value: '320583'}}).subscribe((res: any) => {
+ this.monitorPointOptions = res.data;
+ });
+ }
+ monitorPointChange(id) {
+ this.device = null;
+ this.times = null;
+ this.http.get(environment.SERVER_BASH_URL + 'device/professionId', {params: {monitorPointId: id}}).subscribe((res: any) => {
+ this.deviceOptions = res.data;
+ });
+ }
+
+ deviceChange(id) {
+ const format = 'DD���HH���';
+ this.base = id % 10 % 5;
+ this.times = [moment().subtract(2, 'h').format(format), moment().subtract(1, 'h').format(format), moment().format(format)];
+ }
}
--
Gitblit v1.8.0