Commit dbf69768 authored by wangqinghua's avatar wangqinghua

log

parent 7bfbcb9d
......@@ -72,4 +72,4 @@
</nz-table>
<!--告警组-->
<smart-alarm-group #smartAlarmGroup></smart-alarm-group>
\ No newline at end of file
<smart-alarm-group #smartAlarmGroup (add)="getGroupAlarm()"></smart-alarm-group>
\ No newline at end of file
import {Component, OnInit} from '@angular/core';
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {AlarmService} from '../../alarm.service';
import {
FormBuilder,
......@@ -15,6 +15,7 @@ import {NzMessageService} from 'ng-zorro-antd';
styles: []
})
export class AlarmGroupComponent implements OnInit {
@Output() add = new EventEmitter<any>();
title;
isVisible = false;
......@@ -63,6 +64,7 @@ export class AlarmGroupComponent implements OnInit {
(res)=>{
if(res.errCode == 10000){
this.isVisible = false;
this.add.emit();
}
this.message.info(res.errMsg);
}
......
......@@ -45,17 +45,20 @@ export class UserComponent implements OnInit {
}
handleOk(){
this.isVisible = true;
for(const i in this.validateForm.controls){
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
this.validateForm.value.gender = Number(this.validateForm.value.gender);
this.validateForm.value.status = Number(this.validateForm.value.status);
if(this.validateForm.invalid){
return false;
}
this.systemSer.adduser(this.validateForm.value).subscribe(
(res)=>{
if(res.errCode == 10000){
this.isVisible = false;
}
}
)
}
......
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