|
|
|
@ -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') |
|
|
|
|