|
|
|
@ -19,8 +19,21 @@ export class AuditDisposeComponent implements OnInit {
|
|
|
|
|
constructor(private modal: NzModalRef, private message: NzMessageService) { } |
|
|
|
|
|
|
|
|
|
textarea: string = ""; //审批意见
|
|
|
|
|
|
|
|
|
|
role1 = [] |
|
|
|
|
role2 = [] |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
if (this.data.auditType == 4) { |
|
|
|
|
this.data.getData.roleDisplayNames.forEach(element => { |
|
|
|
|
if (element.indexOf('接收人') != -1) { |
|
|
|
|
this.role2.push(element) |
|
|
|
|
} else { |
|
|
|
|
this.role1.push(element) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.data.auditType |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -35,29 +48,29 @@ export class AuditDisposeComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取办理类型
|
|
|
|
|
getHandleTypes(handleTypes: any[]):string { |
|
|
|
|
getHandleTypes(handleTypes: any[]): string { |
|
|
|
|
if (!handleTypes || !handleTypes.length) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
let names: string[] = [] |
|
|
|
|
let handleTypeList = JSON.parse(JSON.stringify(handleTypes)); |
|
|
|
|
let list: handleTypeList[] = new handleType().list; |
|
|
|
|
handleTypeList.forEach(item=>{ |
|
|
|
|
list.find(element=>{ |
|
|
|
|
item == element.value? names.push(element.name) : null |
|
|
|
|
handleTypeList.forEach(item => { |
|
|
|
|
list.find(element => { |
|
|
|
|
item == element.value ? names.push(element.name) : null |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
return names.join(',') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取文件格式
|
|
|
|
|
getFileType(name: string):string { |
|
|
|
|
getFileType(name: string): string { |
|
|
|
|
let suffix |
|
|
|
|
if (name.substring(name.length-4).includes('png') || name.substring(name.length-4).includes('jpg') || name.substring(name.length-4).includes('jpeg') || name.substring(name.length-4).includes('webp')) { |
|
|
|
|
if (name.substring(name.length - 4).includes('png') || name.substring(name.length - 4).includes('jpg') || name.substring(name.length - 4).includes('jpeg') || name.substring(name.length - 4).includes('webp')) { |
|
|
|
|
suffix = 'img' |
|
|
|
|
} else if (name.substring(name.length-4).includes('doc') || name.substring(name.length-4).includes('docx')) { |
|
|
|
|
} else if (name.substring(name.length - 4).includes('doc') || name.substring(name.length - 4).includes('docx')) { |
|
|
|
|
suffix = 'word' |
|
|
|
|
} else if (name.substring(name.length-4).includes('pdf')) { |
|
|
|
|
} else if (name.substring(name.length - 4).includes('pdf')) { |
|
|
|
|
suffix = 'pdf' |
|
|
|
|
} |
|
|
|
|
return suffix |
|
|
|
@ -92,7 +105,7 @@ export class AuditDisposeComponent implements OnInit {
|
|
|
|
|
let arr = item.split('.') |
|
|
|
|
arr[arr.length - 1] = 'pdf' |
|
|
|
|
window.open(arr.join('.')) |
|
|
|
|
} else if (this.getFileType(item) == 'pdf') { |
|
|
|
|
} else if (this.getFileType(item) == 'pdf') { |
|
|
|
|
window.open(item) |
|
|
|
|
} else { |
|
|
|
|
this.message.create('warning', '暂不支持查看!'); |
|
|
|
|