Commit 8048b5cf authored by wangqinghua's avatar wangqinghua

update

parent ce6139e0
...@@ -47,8 +47,8 @@ export class AlarmLogComponent implements OnInit { ...@@ -47,8 +47,8 @@ export class AlarmLogComponent implements OnInit {
obj = { obj = {
time_from:<any>'', time_from:<any>'',
time_till:<any>'', time_till:<any>'',
alertGroupId:null, alertGroupId:'',
mediatypeids:null, mediatypeids:'',
hostids:'', hostids:'',
}; };
...@@ -63,7 +63,6 @@ export class AlarmLogComponent implements OnInit { ...@@ -63,7 +63,6 @@ export class AlarmLogComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.getType(); this.getType();
this.getWarnGroup(); this.getWarnGroup();
this.getList(this.obj); this.getList(this.obj);
} }
...@@ -72,11 +71,11 @@ export class AlarmLogComponent implements OnInit { ...@@ -72,11 +71,11 @@ export class AlarmLogComponent implements OnInit {
const data = { const data = {
"eventPage":this.pageNum, "eventPage":this.pageNum,
"pageRecords":this.pageCount, "pageRecords":this.pageCount,
"alertGroupId":null, "alertGroupId":this.obj.alertGroupId,
"time_from":obj.time_from, "time_from":obj.time_from,
"time_till":obj.time_till, "time_till":obj.time_till,
"mediatypeids":null, "mediatypeids":[this.obj.mediatypeids],
"hostids":null "hostids":[this.obj.hostids]
}; };
this.alarmSer.alertFind(data).subscribe( this.alarmSer.alertFind(data).subscribe(
(res)=>{ (res)=>{
......
...@@ -14,15 +14,16 @@ ...@@ -14,15 +14,16 @@
<tbody> <tbody>
<tr *ngFor="let data of logList"> <tr *ngFor="let data of logList">
<td>{{data.subject}}</td> <td>{{data.subject}}</td>
<td>{{data.clock}}</td> <td>{{data.clock | date:"yyyy-MM-dd hh:mm:ss"}}</td>
<td>告警资源</td> <td>告警资源</td>
<td>{{data.message}}</td> <td>{{data.message}}</td>
<td>类别</td> <td>
<td>资源分组</td> <span *ngIf="data.status == 0">消息未发送</span>
<td>{{data.continuedTime}}</td> <span *ngIf="data.status == 1">消息已发送</span>
<td>产生事件</td> <span *ngIf="data.status == 2">经多次重试后失败</span>
<td>{{data.stateName}}</td> </td>
<td class="list-icon"><i class="anticon anticon-profile"></i></td> <td>{{data.mediatypes[0].description}}</td>
<td class="list-icon">{{data.sendto}}</td>
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
......
...@@ -28,11 +28,14 @@ ...@@ -28,11 +28,14 @@
</div> </div>
</div> </div>
<div class="tag-warn tag-form"> <div class="tag-warn tag-form">
<span *ngFor="let item of warnCountList"> <ng-container *ngFor="let item of warnCountList">
<span (click)="search()">
<nz-tag *ngIf="item.level == 4 || item.level == 5" [nzColor]="color.red"></nz-tag> <nz-tag *ngIf="item.level == 4 || item.level == 5" [nzColor]="color.red"></nz-tag>
<nz-tag *ngIf="item.level == 2 || item.level == 3" [nzColor]="color.yellow"></nz-tag> <nz-tag *ngIf="item.level == 2 || item.level == 3" [nzColor]="color.yellow"></nz-tag>
{{item.name}}({{item.size}}) {{item.name}}({{item.size}})
</span> </span>
</ng-container>
</div> </div>
<smart-warn-list #warnList (total)="getTotal($event)"></smart-warn-list> <smart-warn-list #warnList (total)="getTotal($event)"></smart-warn-list>
......
...@@ -51,7 +51,8 @@ export class NowAlarmComponent implements OnInit { ...@@ -51,7 +51,8 @@ export class NowAlarmComponent implements OnInit {
search(){ search(){
const obj = { const obj = {
isWaring:'yes' isWaring:'yes',
}; };
this.warnList.getList(obj); this.warnList.getList(obj);
} }
......
...@@ -187,6 +187,7 @@ export class BasiCheckComponent implements OnInit { ...@@ -187,6 +187,7 @@ export class BasiCheckComponent implements OnInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.isCheck = false; this.isCheck = false;
this.initForm();
this.done.emit(); this.done.emit();
} }
this.message.info(res.errMsg); this.message.info(res.errMsg);
...@@ -203,6 +204,7 @@ export class BasiCheckComponent implements OnInit { ...@@ -203,6 +204,7 @@ export class BasiCheckComponent implements OnInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.isCheck = false; this.isCheck = false;
this.initForm();
this.done.emit(); this.done.emit();
} }
this.message.info(res.errMsg); this.message.info(res.errMsg);
......
...@@ -160,7 +160,10 @@ ...@@ -160,7 +160,10 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of checkTable.data"> <tr *ngFor="let data of checkTable.data">
<td>{{data.name}}</td> <td>
<nz-tag *ngIf="data.priority == 4 || data.priority == 5" [nzColor]="color.red"></nz-tag>
<nz-tag *ngIf="data.priority == 2 || data.priority == 3" [nzColor]="color.yellow"></nz-tag>
{{data.name}}</td>
<td>{{data.lastvalue}}</td> <td>{{data.lastvalue}}</td>
<td>{{data.lastclock}}</td> <td>{{data.lastclock}}</td>
<td>{{data.itemType}}</td> <td>{{data.itemType}}</td>
......
...@@ -31,19 +31,19 @@ ...@@ -31,19 +31,19 @@
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<span>监控设备数:{{deviceNo}}</span> <span>监控设备数:{{deviceNo}}</span>
<span>设备状态: <span>设备状态:
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.green"></nz-tag> <span style="margin-right: 8px" (click)="search('0')"> <nz-tag [nzColor]="color.green"></nz-tag>
<i *ngIf="!green && green !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!green && green !=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{green}} {{green}}
</span> </span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.yellow"></nz-tag> <span routerLink="../nowAlarm" style="margin-right: 8px"> <nz-tag [nzColor]="color.yellow"></nz-tag>
<i *ngIf="!yellow && yellow != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!yellow && yellow != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{yellow}} {{yellow}}
</span> </span>
<span style="margin-right: 8px"> <nz-tag [nzColor]="color.red"></nz-tag> <span routerLink="../nowAlarm" style="margin-right: 8px"> <nz-tag [nzColor]="color.red"></nz-tag>
<i *ngIf="!red && red != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!red && red != 0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{red}} {{red}}
</span> </span>
<span> <nz-tag [nzColor]="color.gray"></nz-tag> <span (click)="search('1')"> <nz-tag [nzColor]="color.gray"></nz-tag>
<i *ngIf="!gray && gray!=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i> <i *ngIf="!gray && gray!=0" class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>
{{gray}} {{gray}}
</span> </span>
......
...@@ -134,12 +134,13 @@ export class BasicComponent implements OnInit { ...@@ -134,12 +134,13 @@ export class BasicComponent implements OnInit {
} }
//搜索 //搜索
search(){ search(status){
this.loading = true; this.loading = true;
this.searchStatus = true; this.searchStatus = true;
this.frontPagination = false; this.frontPagination = false;
const data = { const data = {
search:{ search:{
status:status,
name:this.searchName name:this.searchName
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment