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
55
56
57
58
59
60
61
import {Component, OnInit} from '@angular/core';
import {AlarmService} from '../../alarm.service';
import {pageSize} from '../../../app.constants';
@Component({
selector: 'smart-send-log',
templateUrl: './send-log.component.html',
styles: []
})
export class SendLogComponent implements OnInit {
isShow = false;
data;
logList = [];
loading = false;
pageCount = pageSize;
pageNum = 1;
totalNum;
constructor(public alarmSer: AlarmService) {
}
ngOnInit() {
// this.getList();
}
showModal(data) {
this.data = data;
this.isShow = true;
this.getList();
}
//获取列表
getList() {
const data1 = {
hostids: [this.data.hostid],
groupid: [this.data.groupid],
eventPage: this.pageNum,
pageRecords: this.pageCount
};
this.alarmSer.alertFind(data1).subscribe(
(res) => {
this.logList = res.data.data;
this.totalNum = res.data.totalNum;
}
);
}
//关闭
closeModal() {
this.isShow = false;
}
//翻页
change(e){
this.pageNum = e;
this.getList();
}
}