Commit 04ac48ac authored by wangqinghua's avatar wangqinghua

log

parent 4fac573e
......@@ -37,7 +37,7 @@
</div>
<div nz-row class="search-form">
<div nz-col nzSpan="16">
<button nz-button nzType="default"><i class="anticon anticon-search"></i>新增告警推送</button>
<button (click)="showAlarmModal()" nz-button nzType="default"><i class="anticon anticon-plus"></i>新增告警推送</button>
</div>
</div>
<nz-table #nzTable [nzData]="setList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
......@@ -72,4 +72,7 @@
</nz-table>
<!--告警组-->
<smart-alarm-group #smartAlarmGroup (add)="getGroupAlarm()"></smart-alarm-group>
\ No newline at end of file
<smart-alarm-group #smartAlarmGroup (add)="getGroupAlarm()"></smart-alarm-group>
<!--新增告警推送-->
<smart-alarm-modal #smartAlarmModal></smart-alarm-modal>
\ No newline at end of file
......@@ -3,6 +3,7 @@ import {AlarmService} from '../alarm.service';
import {pageSize} from '../../app.constants';
import {AlarmGroupComponent} from '../modal/alarm-group/alarm-group.component';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component';
@Component({
selector: 'smart-alarm-set',
......@@ -11,6 +12,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
})
export class AlarmSetComponent implements OnInit {
@ViewChild('smartAlarmGroup') smartAlarmGroup: AlarmGroupComponent;
@ViewChild('smartAlarmModal') smartAlarmModal:AlarmModalComponent;
setList = [];
alertGroupId;
groupList = [];
......@@ -105,4 +107,9 @@ export class AlarmSetComponent implements OnInit {
}
change(e){}
//新增告警推送
showAlarmModal(){
this.smartAlarmModal.showModal(null);
}
}
<p>
media-type works!
</p>
<nz-modal [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateForm">
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="name">告警组名称</nz-form-label>
<nz-form-control [nzSpan]="12">
<input type="text" nz-input formControlName="name" placeholder="告警组名称" >
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请输入告警组名称</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="7" >组描述</nz-form-label>
<nz-form-control [nzSpan]="12" >
<textarea formControlName="description" nz-input rows="2" placeholder="分组描述"></textarea>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import {Component, OnInit} from '@angular/core';
@Component({
selector: 'smart-media-type',
templateUrl: './media-type.component.html',
styles: []
selector: 'smart-media-type',
templateUrl: './media-type.component.html',
styles: []
})
export class MediaTypeComponent implements OnInit {
constructor() { }
isVisible = false;
ngOnInit() {
}
constructor() {
}
ngOnInit() {
}
showModal() {
this.isVisible = true;
}
handleCancel() {
this.isVisible = false;
}
handleOk() {
this.isVisible = false;
}
}
......@@ -56,3 +56,6 @@
</tr>
</tbody>
</nz-table>
<!--新增发送方式-->
<smart-media-type #smartMediaType></smart-media-type>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import {Component, OnInit, ViewChild} from '@angular/core';
import {AlarmService} from '../alarm.service';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {MediaTypeComponent} from '../modal/media-type/media-type.component';
@Component({
selector: 'smart-send-set',
......@@ -8,6 +9,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
styles: []
})
export class SendSetComponent implements OnInit {
@ViewChild('smartMediaType') smartMediaType:MediaTypeComponent;
sendList = [];
constructor(private alarmSer:AlarmService,private modalSer:NzModalService,
......
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