| | |
| | | {value: 'day', label: '日', format: 'YYYY-MM-DD'}, |
| | | {value: 'hour', label: '时', format: 'YYYY-MM-DD HH'} |
| | | ]; |
| | | public professionOptions = []; |
| | | |
| | | private treeClickStream: Subject<any> = new Subject<any>(); |
| | | private _sensors: {[key: string]: string} = {}; |
| | |
| | | this.msgSrv.error(res.message); |
| | | } else { |
| | | this.sensorOptions.push({id: -1, name: '全部', isExpanded: true, children: res.data}); |
| | | } |
| | | }); |
| | | this.http.get(environment.SERVER_BASH_URL + 'mobile/profession').subscribe((res: any) => { |
| | | if (res.errno !== 0) { |
| | | this.msgSrv.error(res.message); |
| | | } else { |
| | | this.professionOptions = res.data; |
| | | } |
| | | }); |
| | | } |
| | |
| | | const option = event.option; |
| | | this.query.areaCode = null; |
| | | this.query.monitorPointId = null; |
| | | this.query.mac = null; |
| | | switch (event.index) { |
| | | case 0: |
| | | name = 'provinceCode'; |
| | |
| | | this.monitorPointOptions = res.data; |
| | | } |
| | | }); |
| | | this.getDevices(); |
| | | |
| | | } |
| | | |
| | | monitorPointChange(value) { |
| | | getDevices() { |
| | | this.query.mac = null; |
| | | this.deviceOptions = []; |
| | | if (value) { |
| | | this.http.get(environment.SERVER_BASH_URL + 'device/monitorPointId', {params: {monitorPointId: value}}).subscribe((res: any) => { |
| | | if (res.code === 0) { |
| | | this.msgSrv.error(res.message); |
| | | } else { |
| | | this.deviceOptions = res.data; |
| | | } |
| | | }); |
| | | } |
| | | return this.http.get(environment.SERVER_BASH_URL + 'device/professionId', {params: this.query}).subscribe((res: any) => { |
| | | if (res.code === 0) { |
| | | this.msgSrv.error(res.message); |
| | | } else { |
| | | this.deviceOptions = res.data; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | reportQuery() { |
| | |
| | | } |
| | | window.location.href = url + '_token=' + this.tokenService.get().token; |
| | | } else { |
| | | this.msgSrv.error('开始时间为空或者所选区域没有监控点数据!'); |
| | | this.msgSrv.error('开始时间为空或者所选区域没有监控站点数据!'); |
| | | } |
| | | } |
| | | } |