中化加油站项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

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';
@Component({
selector: 'app-get-out-of-line-details',
templateUrl: './get-out-of-line-details.component.html',
styleUrls: ['./get-out-of-line-details.component.scss']
})
export class GetOutOfLineDetailsComponent implements OnInit {
@Input() data: any
constructor(private fb: FormBuilder, private http: HttpClient, private message: NzMessageService) { }
imgUrl: string
vedioUrl: string
content
details
ngOnInit(): void {
console.log(this.data)
this.details = this.data.content1
this.imgUrl = this.data.violateImage
this.vedioUrl = this.data.violateVideo
this.content = this.data.handleRecord
}
selectedType: string = 'img'
contentType(type) {
this.selectedType = type
}
submit() {
let body = {
id: this.data.id,
handleRecord: this.content
}
this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => {
this.message.create('success', '处置成功!');
this.data.handleTime = new Date()
this.data.handleRecord = this.content
})
}
}