Newer
Older
import {Component, Input, OnInit} from '@angular/core';
import {EarlyWarningService} from '../../earlyWarning.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'smart-warning-track-info',
templateUrl: './warning-track-info.component.html',
styles: []
})
export class WarningTrackInfoComponent implements OnInit {
@Input() title;
warnList = [];
page = {
pageNum: 1,
pageCount: 10,
totalNum: 0,
loading: false,
};
constructor(public warningSer: EarlyWarningService, public message: NzMessageService,
) {
}
ngOnInit() {
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
65
66
67
68
69
70
this.getList();
}
diffResource() {
this.getList();
}
//跟踪信息
getList() {
this.page.loading = true;
const data = {
pageNum: this.page.pageNum,
pageCount: this.page.pageCount,
msgId: this.msgId
};
this.warningSer.msgPageWarningMsg(data).subscribe(
(res) => {
if (res.errCode == 10000) {
if (res.data) {
this.warnList = res.data.data;
this.page.totalNum = res.data.totalNum;
}
}
this.page.loading = false;
}
);
}
//翻页
change(e) {
if (e > 0) {
this.page.pageNum = e;
this.getList();
}
}
}