Commit f1182d5a authored by wangqinghua's avatar wangqinghua

update

parent 18596d22
...@@ -49,13 +49,13 @@ ...@@ -49,13 +49,13 @@
<div nz-col nzSpan="8" *ngIf="timeType == '5'"> <div nz-col nzSpan="8" *ngIf="timeType == '5'">
<nz-date-picker <nz-date-picker
nzShowTime nzShowTime
[(ngModel)]="obj.time_from" [(ngModel)]="startTime"
nzPlaceHolder="开始时间" nzPlaceHolder="开始时间"
></nz-date-picker> ></nz-date-picker>
<nz-date-picker <nz-date-picker
nzShowTime nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss" nzFormat="yyyy-MM-dd HH:mm:ss"
[(ngModel)]="obj.time_till" [(ngModel)]="endTime"
nzPlaceHolder="结束时间" nzPlaceHolder="结束时间"
></nz-date-picker> ></nz-date-picker>
</div> </div>
......
...@@ -52,6 +52,9 @@ export class AlarmLogComponent implements OnInit { ...@@ -52,6 +52,9 @@ export class AlarmLogComponent implements OnInit {
hostids:null, hostids:null,
}; };
startTime;
endTime;
//modal //modal
isVisible = false; isVisible = false;
title; title;
...@@ -72,8 +75,8 @@ export class AlarmLogComponent implements OnInit { ...@@ -72,8 +75,8 @@ export class AlarmLogComponent implements OnInit {
"eventPage":this.pageNum, "eventPage":this.pageNum,
"pageRecords":this.pageCount, "pageRecords":this.pageCount,
"alertGroupId":this.obj.alertGroupId, "alertGroupId":this.obj.alertGroupId,
"time_from":this.obj.time_from, "time_from":new Date( this.obj.time_from ).getTime(),
"time_till":this.obj.time_till, "time_till":new Date( this.obj.time_till).getTime(),
"mediatypeids":[this.obj.mediatypeids], "mediatypeids":[this.obj.mediatypeids],
"hostids":[this.obj.hostids] "hostids":[this.obj.hostids]
}; };
...@@ -160,8 +163,10 @@ export class AlarmLogComponent implements OnInit { ...@@ -160,8 +163,10 @@ export class AlarmLogComponent implements OnInit {
//查询 //查询
search(){ search(){
this.obj.time_from = new Date(this.obj.time_from).getTime(); if(this.timeType == "5"){
this.obj.time_till = new Date(this.obj.time_till).getTime(); this.obj.time_from = new Date(this.startTime).getTime();
this.obj.time_till = new Date(this.endTime).getTime();
}
this.getList(); this.getList();
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="title">事件标题</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="title">事件标题</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input id="title" nz-input placeholder="事件标题" name="title" formControlName="title"> <input id="title" nz-input placeholder="事件标题" name="title" formControlName="title">
<nz-form-explain *ngIf="validateForm.get('title').dirty && validateForm.get('title').errors">请输入事件标题</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -22,6 +23,8 @@ ...@@ -22,6 +23,8 @@
<nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option> <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container> </ng-container>
</nz-select> </nz-select>
<nz-form-explain *ngIf="validateForm.get('type').dirty && validateForm.get('type').errors">请选择事件分类</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -33,8 +36,9 @@ ...@@ -33,8 +36,9 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="requester">请求人</nz-form-label> <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="requester">请求人</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input id="requester" nz-input placeholder="显示名" name="requester" <input id="requester" nz-input placeholder="显示名" name="requester" formControlName="requester">
formControlName="requester"> <nz-form-explain *ngIf="validateForm.get('requester').dirty && validateForm.get('requester').errors">请输入请求人</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -44,8 +48,9 @@ ...@@ -44,8 +48,9 @@
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="requesterPhone">联系电话 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="requesterPhone">联系电话
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input id="requesterPhone" nz-input placeholder="显示名" name="requesterPhone" <input id="requesterPhone" nz-input placeholder="显示名" name="requesterPhone" formControlName="requesterPhone">
formControlName="requesterPhone"> <nz-form-explain *ngIf="validateForm.get('requesterPhone').dirty && validateForm.get('requesterPhone').errors">请输入联系电话</nz-form-explain>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
......
...@@ -34,11 +34,11 @@ export class EventComponent implements OnInit { ...@@ -34,11 +34,11 @@ export class EventComponent implements OnInit {
this.validateForm = this.fb.group( this.validateForm = this.fb.group(
{ {
title: [null, [Validators.required]], title: [null, [Validators.required]],
description: [null], description: [null,],
type: [null], type: [null,[Validators.required]],
requester: [null], requester: [null,[Validators.required]],
requesterPhone: [null], requesterPhone: [null,[Validators.required]],
operators: [null], operators: [null,[Validators.required]],
} }
); );
} }
...@@ -100,6 +100,13 @@ export class EventComponent implements OnInit { ...@@ -100,6 +100,13 @@ export class EventComponent implements OnInit {
formData.append('file', file); formData.append('file', file);
}); });
this.validateForm.value.operators = this.operatorsList; this.validateForm.value.operators = this.operatorsList;
for (let i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
if(this.validateForm.invalid){
return false;
}
formData.append('json', JSON.stringify(this.validateForm.value)); formData.append('json', JSON.stringify(this.validateForm.value));
this.workSer.create(formData).subscribe( this.workSer.create(formData).subscribe(
(res) => { (res) => {
...@@ -122,6 +129,15 @@ export class EventComponent implements OnInit { ...@@ -122,6 +129,15 @@ export class EventComponent implements OnInit {
formData.append('file', file); formData.append('file', file);
}); });
this.validateForm.value.operators = this.operatorsList; this.validateForm.value.operators = this.operatorsList;
for (let i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
if(this.validateForm.invalid){
return false;
}
formData.append('json', JSON.stringify(this.validateForm.value)); formData.append('json', JSON.stringify(this.validateForm.value));
formData.append('id', this.eventId); formData.append('id', this.eventId);
this.workSer.update(formData).subscribe( this.workSer.update(formData).subscribe(
......
...@@ -22,3 +22,80 @@ ...@@ -22,3 +22,80 @@
<button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button> <button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
</div> </div>
</div> </div>
<div nz-row>
<div nz-col nzSpan="12">
<h2>事件信息</h2>
<div nz-row>
<div nz-col nzSpan="4">事件编号</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="7"></div>
<div nz-col nzSpan="4">提交时间</div>
<div nz-col nzSpan="7">{{event?.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</div>
</div>
<div nz-row>
<div nz-col nzSpan="4">请求人</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="4">{{event?.requester}}</div>
<div nz-col nzSpan="7">{{event?.requesterPhone}}</div>
</div>
<div nz-row>
<div nz-col nzSpan="4">事件标题</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="7">{{event?.title}}</div>
<div nz-col nzSpan="4">事件分类</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="7">{{event?.typeName}}</div>
</div>
<div nz-row>
<div nz-col nzSpan="4">详细描述</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="7">{{event?.description}}</div>
</div>
<div nz-row>
<div nz-col nzSpan="4">附件</div>
<div nz-col nzSpan="1"></div>
<div nz-col nzSpan="7">{{event?.file}}</div>
</div>
<h2>处理结果</h2>
<div nz-row>
<div nz-col nzSpan="5">处理结果</div>
<div nz-col nzSpan="19">
</div>
</div>
<div nz-row>
<div nz-col nzSpan="5">完成时间</div>
<div nz-col nzSpan="19">
</div>
</div>
<div nz-row>
<div nz-col nzSpan="5">关联资产</div>
<div nz-col nzSpan="19">
<p *ngFor="let item of linkList;">
<span>资产编号</span>
<span>{{item.name}}</span>
<span>{{item.typeName}}</span>
</p>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="5">处理情况</div>
<div nz-col nzSpan="19">
</div>
</div>
</div>
<div nz-col nzSpan="12">
<h2>流转记录</h2>
<ng-container *ngFor="let item of transforsList;">
<div nz-row>
<div nz-col nzSpan="4">{{item.requesterName}}</div>
<div nz-col nzSpan="7">转派给{{item.operatorInfo[1]}}</div>
</div>
</ng-container>
</div>
</div>
\ No newline at end of file
...@@ -6,7 +6,19 @@ import {ActivatedRoute} from '@angular/router'; ...@@ -6,7 +6,19 @@ import {ActivatedRoute} from '@angular/router';
@Component({ @Component({
selector: 'smart-handle-detail', selector: 'smart-handle-detail',
templateUrl: './handle-detail.component.html', templateUrl: './handle-detail.component.html',
styles: [] styles: [
`
:host ::ng-deep .ant-row{
margin: 20px 0;
}
:host ::ng-deep .ant-col-4{
text-align: right;
}
h2{
font-weight: 400;
}
`
]
}) })
export class HandleDetailComponent implements OnInit { export class HandleDetailComponent implements OnInit {
......
...@@ -149,3 +149,6 @@ ...@@ -149,3 +149,6 @@
.breadcrumbs .ant-btn .anticon{ .breadcrumbs .ant-btn .anticon{
color: #ffffff; color: #ffffff;
} }
.ant-timeline-item-content{
left: -25px;
}
\ No newline at end of file
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