|
|
|
@ -24,29 +24,28 @@ export class GetOutOfLineDetailsComponent implements OnInit {
|
|
|
|
|
isMisinformation: boolean = false//误报按钮的显隐
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isImage //传过来的文件是否是图片
|
|
|
|
|
isImage = true//传过来的文件是否是图片
|
|
|
|
|
fileUrl |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
// console.log(this.data)
|
|
|
|
|
this.details = this.data.content1 |
|
|
|
|
this.vedioUrl = this.data.violateVideo |
|
|
|
|
this.content = this.data.handleRecord |
|
|
|
|
this.imgUrl = this.data.violateImage |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.getFileType(this.imgUrl) == 'img') { |
|
|
|
|
this.isImage = true |
|
|
|
|
} else { |
|
|
|
|
this.isImage = false |
|
|
|
|
|
|
|
|
|
if (this.getFileType(this.imgUrl) == 'word') { |
|
|
|
|
let arr = this.imgUrl.split('.') |
|
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
|
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(arr.join('.')); |
|
|
|
|
} else if (this.getFileType(this.imgUrl) == 'pdf') { |
|
|
|
|
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.imgUrl); |
|
|
|
|
if (this.imgUrl) { |
|
|
|
|
if (this.getFileType(this.imgUrl) == 'img') { |
|
|
|
|
this.isImage = true |
|
|
|
|
} else { |
|
|
|
|
this.isImage = false |
|
|
|
|
if (this.getFileType(this.imgUrl) == 'word') { |
|
|
|
|
let arr = this.imgUrl.split('.') |
|
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
|
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(arr.join('.')); |
|
|
|
|
} else if (this.getFileType(this.imgUrl) == 'pdf') { |
|
|
|
|
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.imgUrl); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|