Commit 5d6d4d86 authored by wangqinghua's avatar wangqinghua

update

parent 85098044
......@@ -80,4 +80,9 @@ export class AnalysisService {
return this.http.post(SERVER_API_URL + '/statistics/statisticalReport' , data);
}
//统计报告弹出框
reportCount(data): Observable<any>{
return this.http.post(SERVER_API_URL + '/trigger/find' , data);
}
}
......@@ -109,17 +109,17 @@
<td>{{data.dateTime}}</td>
<td>{{data.countNumber}}</td>
<td>
<span class="cursor" (click)="showWarnModal()">{{data.waring}}</span>
<span class="cursor main-color" (click)="showWarnModal(data)">{{data.waring}}</span>
</td>
<td>
<span class="cursor" (click)="showErrorModal()"> {{data.error}}</span>
<span class="cursor main-color" (click)="showErrorModal(data)"> {{data.error}}</span>
</td>
</tr>
</ng-container>
</tbody>
</nz-table>
<nz-modal [(nzVisible)]="isVisiable" [nzTitle]="title" [nzFooter]="null" (nzOnCancel)="handleCancel()">
<nz-table #nzTable [nzData]="warnList">
<nz-modal [(nzVisible)]="isVisiable" nzWidth="780" [nzTitle]="title" [nzFooter]="null" (nzOnCancel)="handleCancel()">
<nz-table #nzTable [nzData]="modalList">
<thead>
<tr>
<th nzShowSort>告警名称</th>
......@@ -128,10 +128,12 @@
</tr>
</thead>
<tbody>
<tr *ngFor="let data of warnList">
<td>{{data.hostname}}</td>
<tr *ngFor="let data of modalList">
<td>{{data.description}}</td>
<td>{{data.equipmentType}}</td>
<td>{{data.lastchangeDate}}</td>
<td>
<span style="margin-right: 5px;" *ngFor="let item of data.hosts">{{item.name}}</span>
</td>
</tr>
</tbody>
</nz-table>
......
......@@ -38,7 +38,7 @@ export class ResourceAlarmComponent implements OnInit {
pageNum = 1;
totalNum;
warnList = [];
modalList = [];
constructor(private analysisSer: AnalysisService, private message: NzMessageService,
private datePipe: DatePipe, private overAllSer: OverAllService) {
......@@ -290,15 +290,31 @@ export class ResourceAlarmComponent implements OnInit {
}
//告警弹窗
showWarnModal(){
showWarnModal(item){
this.title = '告警明细';
this.isVisiable = true;
const data = {
triggerids:item.waringid
}
this.analysisSer.reportCount(data).subscribe(
(res)=>{
this.modalList = res.data;
}
)
}
//严重弹窗
showErrorModal(){
showErrorModal(item){
this.title = '严重告警明细';
this.isVisiable = true;
const data = {
triggerids:item.errorid
}
this.analysisSer.reportCount(data).subscribe(
(res)=>{
this.modalList = res.data;
}
)
}
handleCancel(){
......
......@@ -43,7 +43,7 @@
</ng-container>
</div>
<div nz-col nzSpan="8" class="text-right">
<input [(ngModel)]="obj.content" nz-input placeholder="角色/权限模块/资源权限">
<input style="width: 50%;" [(ngModel)]="obj.content" nz-input placeholder="角色/权限模块/资源权限">
<button (click)="getList()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div>
</div>
......
......@@ -30,7 +30,7 @@
</ng-container>
</div>
<div nz-col nzSpan="8" class="text-right">
<input nz-input placeholder="操作用户" [(ngModel)]="name">
<input style="width: 50%;" nz-input placeholder="操作用户" [(ngModel)]="name">
<button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div>
</div>
......
......@@ -23,7 +23,7 @@
<div nz-col nzSpan="16">
</div>
<div nz-col nzSpan="8" class="text-right">
<input nz-input placeholder="姓名/手机号码" [(ngModel)]="name">
<input style="width: 50%;" nz-input placeholder="姓名/手机号码" [(ngModel)]="name">
<button (click)="getUser()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div>
</div>
......@@ -48,7 +48,7 @@
<div class="padding-15-0">
<button (click)="showUserModal()" nz-button nzType="primary">新增用户</button>
<button (click)="batchDelete()" nz-button nzType="default">批量删除</button>
<button nz-button nzType="default">批量修改</button>
<!--<button nz-button nzType="default">批量修改</button>-->
<button (click)="downLoad()" nz-button nzType="default">下载模版</button>
<button (click)="showUploadModalOrg()" nz-button nzType="default">导入组织</button>
<button (click)="showUploadModalUser()" nz-button nzType="default">导入用户</button>
......
......@@ -194,7 +194,7 @@ export class GroupComponent implements OnInit {
let arr = [];
this.dataSet.forEach(e => {
if (e.checked) {
arr.push(e.user.id);
arr.push(e.id);
}
});
this.commonSer.confirmThing('删除', '确定删除选择的用户', () => {
......@@ -202,6 +202,9 @@ export class GroupComponent implements OnInit {
(res) => {
if (res.errCode == 10000) {
this.getUser();
this.message.success("删除用户成功");
}else{
this.message.error(res.errMsg);
}
}
);
......
......@@ -25,7 +25,7 @@
</button>
</div>
<div nz-col nzSpan="8" class="text-right">
<input nz-input placeholder="角色/权限模块/资源权限">
<input style="width: 50%;" nz-input placeholder="角色/权限模块/资源权限">
<button nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div>
</div>
......
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