|
@@ -16,12 +16,13 @@ export class ExportFileComponent implements OnInit {
|
|
|
starCount: number = 0;
|
|
|
otherCount: number = 0;
|
|
|
allCount: number = 0;
|
|
|
-
|
|
|
+ tbookId: any;
|
|
|
constructor(private router: Router, private activeRoute: ActivatedRoute) {}
|
|
|
|
|
|
ngOnInit() {
|
|
|
this.activeRoute.paramMap.subscribe(async (params) => {
|
|
|
let id = params.get('id');
|
|
|
+ this.tbookId = id;
|
|
|
|
|
|
|
|
|
|
|
@@ -40,10 +41,24 @@ export class ExportFileComponent implements OnInit {
|
|
|
this.otherCount = await query.count();
|
|
|
});
|
|
|
}
|
|
|
- close(){
|
|
|
- history.back()
|
|
|
+ close() {
|
|
|
+ history.back();
|
|
|
+ }
|
|
|
+ next() {
|
|
|
+ this.change.emit('next');
|
|
|
}
|
|
|
- next(){
|
|
|
- this.change.emit('next')
|
|
|
+ onDownload() {
|
|
|
+ Parse.Cloud.run('tbookExportReport', { processId: this.tbookId }).then(
|
|
|
+ (data) => {
|
|
|
+ console.log(data);
|
|
|
+ let url = data.zipUrl;
|
|
|
+ const a = document.createElement('a');
|
|
|
+ a.href = url;
|
|
|
+ a.download = '报送流程';
|
|
|
+ document.body.appendChild(a);
|
|
|
+ a.click();
|
|
|
+ document.body.removeChild(a);
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
}
|