Commit 04ac48ac authored by wangqinghua's avatar wangqinghua

log

parent 4fac573e
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<div nz-row class="search-form"> <div nz-row class="search-form">
<div nz-col nzSpan="16"> <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>
</div> </div>
<nz-table #nzTable [nzData]="setList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable [nzData]="setList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
...@@ -72,4 +72,7 @@ ...@@ -72,4 +72,7 @@
</nz-table> </nz-table>
<!--告警组--> <!--告警组-->
<smart-alarm-group #smartAlarmGroup (add)="getGroupAlarm()"></smart-alarm-group> <smart-alarm-group #smartAlarmGroup (add)="getGroupAlarm()"></smart-alarm-group>
\ No newline at end of file
<!--新增告警推送-->
<smart-alarm-modal #smartAlarmModal></smart-alarm-modal>
\ No newline at end of file
...@@ -3,6 +3,7 @@ import {AlarmService} from '../alarm.service'; ...@@ -3,6 +3,7 @@ import {AlarmService} from '../alarm.service';
import {pageSize} from '../../app.constants'; import {pageSize} from '../../app.constants';
import {AlarmGroupComponent} from '../modal/alarm-group/alarm-group.component'; import {AlarmGroupComponent} from '../modal/alarm-group/alarm-group.component';
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {AlarmModalComponent} from '../../modal/alarm-modal/alarm-modal.component';
@Component({ @Component({
selector: 'smart-alarm-set', selector: 'smart-alarm-set',
...@@ -11,6 +12,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd'; ...@@ -11,6 +12,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
}) })
export class AlarmSetComponent implements OnInit { export class AlarmSetComponent implements OnInit {
@ViewChild('smartAlarmGroup') smartAlarmGroup: AlarmGroupComponent; @ViewChild('smartAlarmGroup') smartAlarmGroup: AlarmGroupComponent;
@ViewChild('smartAlarmModal') smartAlarmModal:AlarmModalComponent;
setList = []; setList = [];
alertGroupId; alertGroupId;
groupList = []; groupList = [];
...@@ -105,4 +107,9 @@ export class AlarmSetComponent implements OnInit { ...@@ -105,4 +107,9 @@ export class AlarmSetComponent implements OnInit {
} }
change(e){} change(e){}
//新增告警推送
showAlarmModal(){
this.smartAlarmModal.showModal(null);
}
} }
<p> <nz-modal [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
media-type works! <form nz-form [formGroup]="validateForm">
</p> <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({ @Component({
selector: 'smart-media-type', selector: 'smart-media-type',
templateUrl: './media-type.component.html', templateUrl: './media-type.component.html',
styles: [] styles: []
}) })
export class MediaTypeComponent implements OnInit { 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 @@ ...@@ -56,3 +56,6 @@
</tr> </tr>
</tbody> </tbody>
</nz-table> </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 {AlarmService} from '../alarm.service';
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {MediaTypeComponent} from '../modal/media-type/media-type.component';
@Component({ @Component({
selector: 'smart-send-set', selector: 'smart-send-set',
...@@ -8,6 +9,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd'; ...@@ -8,6 +9,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
styles: [] styles: []
}) })
export class SendSetComponent implements OnInit { export class SendSetComponent implements OnInit {
@ViewChild('smartMediaType') smartMediaType:MediaTypeComponent;
sendList = []; sendList = [];
constructor(private alarmSer:AlarmService,private modalSer:NzModalService, 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