Newer
Older
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import {Component, OnInit} from '@angular/core';
import {TopologyService} from '../topology.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'smart-ne-topology',
templateUrl: './ne-topology.component.html',
styles: []
})
export class NeTopologyComponent implements OnInit {
dataSet;
isVisible = false;
image;
constructor(private topologySer: TopologyService, private message: NzMessageService) {
}
ngOnInit() {
this.getList();
}
//获取列表
getList() {
this.topologySer.find({}).subscribe(
(res) => {
if (res.errCode == 10000) {
this.dataSet = res.data;
} else {
this.message.info(res.errMsg);
}
}
);
}
//图表
getImage(item) {
this.isVisible = true;
this.topologySer.findImage(item.sysmapid).subscribe(
(res) => {
if (res.errCode == 10000) {
this.image = res.data.image;
} else {
this.message.info(res.errMsg);
}
}
);
}
handleOk() {
this.isVisible = false;
this.image = null;
}
}