|
|
@ -38,6 +38,9 @@ import {NzTimelineComponent, NzTimelineItemComponent} from "ng-zorro-antd/timeli |
|
|
|
import {NzTableComponent, NzTableModule} from "ng-zorro-antd/table"; |
|
|
|
import {NzTableComponent, NzTableModule} from "ng-zorro-antd/table"; |
|
|
|
import {BusinessTypePipe} from "../../../pipes/file/business-type.pipe"; |
|
|
|
import {BusinessTypePipe} from "../../../pipes/file/business-type.pipe"; |
|
|
|
import {StatusPipe} from "../../../pipes/file/status.pipe"; |
|
|
|
import {StatusPipe} from "../../../pipes/file/status.pipe"; |
|
|
|
|
|
|
|
import {NzPopconfirmDirective} from "ng-zorro-antd/popconfirm"; |
|
|
|
|
|
|
|
import {NzButtonComponent} from "ng-zorro-antd/button"; |
|
|
|
|
|
|
|
import {NzBadgeComponent} from "ng-zorro-antd/badge"; |
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-index', |
|
|
|
selector: 'app-index', |
|
|
@ -85,7 +88,10 @@ import {StatusPipe} from "../../../pipes/file/status.pipe"; |
|
|
|
NzTableComponent, |
|
|
|
NzTableComponent, |
|
|
|
NzModalContentDirective, |
|
|
|
NzModalContentDirective, |
|
|
|
BusinessTypePipe, |
|
|
|
BusinessTypePipe, |
|
|
|
StatusPipe |
|
|
|
StatusPipe, |
|
|
|
|
|
|
|
NzPopconfirmDirective, |
|
|
|
|
|
|
|
NzButtonComponent, |
|
|
|
|
|
|
|
NzBadgeComponent |
|
|
|
], |
|
|
|
], |
|
|
|
templateUrl: './index.component.html', |
|
|
|
templateUrl: './index.component.html', |
|
|
|
styleUrl: './index.component.less', |
|
|
|
styleUrl: './index.component.less', |
|
|
@ -111,6 +117,7 @@ export class IndexComponent { |
|
|
|
currentParentMenu: any = {}; |
|
|
|
currentParentMenu: any = {}; |
|
|
|
downloadType = 1; |
|
|
|
downloadType = 1; |
|
|
|
interval: any; |
|
|
|
interval: any; |
|
|
|
|
|
|
|
showComponent = false; |
|
|
|
constructor( |
|
|
|
constructor( |
|
|
|
private commonService: CommonService, |
|
|
|
private commonService: CommonService, |
|
|
|
private storage: BrowserStorageService, |
|
|
|
private storage: BrowserStorageService, |
|
|
@ -124,6 +131,7 @@ export class IndexComponent { |
|
|
|
) { |
|
|
|
) { |
|
|
|
|
|
|
|
|
|
|
|
this.communicationService.currentMessage.subscribe(message => { |
|
|
|
this.communicationService.currentMessage.subscribe(message => { |
|
|
|
|
|
|
|
this.showComponent = true; |
|
|
|
this.fileRecords(); |
|
|
|
this.fileRecords(); |
|
|
|
this.findFileRecords(message.id); |
|
|
|
this.findFileRecords(message.id); |
|
|
|
this.downloadType = 2; |
|
|
|
this.downloadType = 2; |
|
|
@ -212,13 +220,14 @@ export class IndexComponent { |
|
|
|
public findFileRecords(id: number) { |
|
|
|
public findFileRecords(id: number) { |
|
|
|
this.interval = setInterval(() => this.fileService.findFileRecords(id, (data: any) => { |
|
|
|
this.interval = setInterval(() => this.fileService.findFileRecords(id, (data: any) => { |
|
|
|
if (data['return_code'] == '000000') { |
|
|
|
if (data['return_code'] == '000000') { |
|
|
|
if (data['return_data'].status == 1) { |
|
|
|
if (data['return_data'].status == 1 || data['return_data'].status == 3) { |
|
|
|
|
|
|
|
this.showComponent = false; |
|
|
|
clearTimeout(this.interval); |
|
|
|
clearTimeout(this.interval); |
|
|
|
console.log("完成"); |
|
|
|
|
|
|
|
this.downloadType = 1; |
|
|
|
this.downloadType = 1; |
|
|
|
this.fileRecords(); |
|
|
|
this.fileRecords(); |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
|
|
|
|
this.showComponent = false; |
|
|
|
clearTimeout(this.interval); |
|
|
|
clearTimeout(this.interval); |
|
|
|
this.fileRecords(); |
|
|
|
this.fileRecords(); |
|
|
|
this.downloadType = 1; |
|
|
|
this.downloadType = 1; |
|
|
@ -233,10 +242,12 @@ export class IndexComponent { |
|
|
|
public getDownLoad(id: number) { |
|
|
|
public getDownLoad(id: number) { |
|
|
|
this.fileService.getDownLoad(id, (data: any) => { |
|
|
|
this.fileService.getDownLoad(id, (data: any) => { |
|
|
|
if (data['return_code'] == '000000') { |
|
|
|
if (data['return_code'] == '000000') { |
|
|
|
window.location.href = data['return_data']; |
|
|
|
this.fileRecords(); |
|
|
|
|
|
|
|
window.open(data['return_data']); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
this.message.error(data['return_msg']); |
|
|
|
this.message.error(data['return_msg']); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|