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
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { OverAllService } from "../../overAll/overAll.service";
@Component({
selector: 'smart-basic-key',
templateUrl: './basic-key.component.html',
styles: []
})
export class BasicKeyComponent implements OnInit {
@Output() keyValue = new EventEmitter<string>();
isKey = false;
keyType; //类型
keyList:any[]; //键值列表
constructor( private overAllSer: OverAllService) { }
ngOnInit() {
this.keyType = '1';
this.findList();
}
findList(){
this.overAllSer.zabbixKey(this.keyType).subscribe(
(res)=>{
this.keyList = res.data;
}
)
}
showKeyModal(){
this.isKey = true;
}
handleKeyCancel(){
this.isKey = false;
}
handleKeyOk(){
this.isKey = false;
}
setKey(data){
this.isKey = false;
this.keyValue.emit(data.zabbixKey);
}
}