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
62
63
64
import {Component, OnInit, ViewChild} from '@angular/core';
import {AlarmService} from '../../alarm/alarm.service';
import {pageSize} from '../../app.constants';
import {NzMessageService} from 'ng-zorro-antd';
import {SendLogComponent} from '../../alarm/modal/send-log/send-log.component';
@Component({
selector: 'smart-warn-list',
templateUrl: './warn-list.component.html',
styles: [
` .list-icon{
font-size: 20px;
text-align: center;
color: #8cb6ce;
}
`
]
})
export class WarnListComponent implements OnInit {
@ViewChild('sendLog') sendLog:SendLogComponent;
warnList = [];
obj;
pageNum = 1;
pageCount = pageSize;
totalNum;
loading = false;
constructor(public alarmSer:AlarmService,public message:NzMessageService) {
}
ngOnInit() {
// this.getList();
}
getList(obj) {
this.obj = obj;
this.loading = true;
const data = {
pageNum: this.pageNum,
pageCount: this.pageCount,
obj:obj
};
this.alarmSer.eventFind(data).subscribe(
(res) => {
if(res.errCode == 10000){
this.warnList = res.data.data;
this.totalNum = res.data.totalNum;
}else{
this.message.info(res.errMsg);
}
this.loading = false;
}
);
}
change(e){
this.pageNum = e;
this.getList(this.obj);
}
showLog(data){
this.sendLog.showModal(data);
}
}