Browse Source

[完善]按钮

master
邵佳豪 3 years ago
parent
commit
a56c3fe2d6
  1. 6
      src/app/pages/get-out-of-line-details/get-out-of-line-details.component.html
  2. 11
      src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss
  3. 20
      src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts

6
src/app/pages/get-out-of-line-details/get-out-of-line-details.component.html

@ -24,7 +24,7 @@
<video controls style="width: 100%;height: 100%;" [src]="vedioUrl"></video>
</div>
</div>
<div class="disposebox">
<!-- <div class="disposebox">
<div class="title">
<span>处置内容</span>
@ -47,5 +47,9 @@
处置时间:{{data.handleTime|date:"yyyy-MM-dd HH:mm:ss"}}
</span>
</div>
</div> -->
<div class="btnbox">
<button nz-button nzType="primary" (click)="push()">推送</button>
<button nz-button nzType="primary" nzDanger (click)="misinformation()">误报</button>
</div>
</div>

11
src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss

@ -134,7 +134,16 @@
.disposeTime {}
}
.btnbox{
width: 100%;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
button{
margin: 0 3px;
}
}
.ant-modal-close {
color: #fff;
}

20
src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts

@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
import { Component, OnInit, Input } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-get-out-of-line-details',
templateUrl: './get-out-of-line-details.component.html',
@ -11,7 +11,7 @@ import { NzModalService } from 'ng-zorro-antd/modal';
export class GetOutOfLineDetailsComponent implements OnInit {
@Input() data: any
constructor(private fb: FormBuilder, private http: HttpClient, private message: NzMessageService, private modal: NzModalService) { }
constructor(private http: HttpClient, private message: NzMessageService, private modal: NzModalService, private initialModal: NzModalRef) { }
imgUrl: string
@ -42,10 +42,14 @@ export class GetOutOfLineDetailsComponent implements OnInit {
this.data.handleRecord = this.content
})
}
//推送
push() {
this.initialModal.triggerOk()
}
//误报
misinformation() {
this.modal.confirm({
nzTitle: '确定判定该预警为误报吗?',
nzTitle: '判定该预警为误报吗?',
// nzContent: '<b style="color: red;">Some descriptions</b>',
nzOkText: '确定',
nzOkType: 'danger',
@ -55,11 +59,11 @@ export class GetOutOfLineDetailsComponent implements OnInit {
handleRecord: this.content ? this.content : '此条预警为误报',
isFalsePositive: true
}
this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
this.message.create('success', '处置成功!');
this.data.handleTime = new Date()
this.content ? this.data.handleRecord = this.content : this.data.handleRecord = '此条预警为误报'
})
// this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
// this.message.create('success', '处置成功!');
// this.data.handleTime = new Date()
// this.content ? this.data.handleRecord = this.content : this.data.handleRecord = '此条预警为误报'
// })
},
nzCancelText: '取消',
nzOnCancel: () => console.log('Cancel')

Loading…
Cancel
Save