Commit a8f602b7 authored by wangqinghua's avatar wangqinghua

template

parent 2c246503
...@@ -4,6 +4,7 @@ import {OverAllService} from '../../overAll/overAll.service'; ...@@ -4,6 +4,7 @@ import {OverAllService} from '../../overAll/overAll.service';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {pageSize} from '../../app.constants'; import {pageSize} from '../../app.constants';
import {DatePipe} from '@angular/common'; import {DatePipe} from '@angular/common';
import { setInterval, clearInterval } from 'timers';
declare var vis: any; declare var vis: any;
...@@ -87,9 +88,10 @@ export class FlowTrendComponent implements OnInit, OnDestroy { ...@@ -87,9 +88,10 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
if (this.hostList) { if (this.hostList) {
this.obj.hostid = this.hostList[0].hostid + ''; this.obj.hostid = this.hostList[0].hostid + '';
this.getEcharts(null); this.getEcharts(null);
// this.time_ = thisset
this.time_ = setInterval(()=>{ this.time_ = setInterval(()=>{
this.findByTime(); this.findByTime();
},10000); },1000);
} else { } else {
this.message.warning('当前资源组无资源'); this.message.warning('当前资源组无资源');
} }
...@@ -116,6 +118,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy { ...@@ -116,6 +118,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
//页面离开 //页面离开
ngOnDestroy(){ ngOnDestroy(){
//销毁定时任务 //销毁定时任务
console.log("销毁定时任务");
clearInterval(this.time_); clearInterval(this.time_);
} }
......
...@@ -95,7 +95,7 @@ export class CheckPrototypeComponent implements OnInit { ...@@ -95,7 +95,7 @@ export class CheckPrototypeComponent implements OnInit {
this.itemId = itemId; this.itemId = itemId;
this.isCheck = true; this.isCheck = true;
this.discoveryid = discoveryid; this.discoveryid = discoveryid;
this.overAllSer.findItemDetail(discoveryid).subscribe( this.overAllSer.findItemById(itemId).subscribe(
(res) => { (res) => {
const data = res.data[0]; const data = res.data[0];
data.type += ''; data.type += '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment