AS
Size: a a a
AS
С
S
checkPresentationStatus(message: any) {
const path = Api.path(`/export/status`);
this.downloadService.checkPresentationStatus(path, message).pipe(
delay(1000),
map((response: any) => {
return response.content;
}),
).subscribe(
(response: any) => {
if (response.status === 'SUCCESS') {
this.downloadService.saveFile(response.url, `${this.presentationName}.pptx`);
this.isExporting = false;
this.$close();
} else {
this.checkPresentationStatus(message);
}
}, error => {
console.log(error);
},
);
}
checkPresentationStatus
S
exportSlides
делать на него свитчМапС
exportSlides
делать на него свитчМапC
C
C
D
C
exportSlides() {
if (this.isExporting || !this.presentationName) {
return;
}
this.isExporting = true;
const path = Api.path(`/export/${this.format}/${this.lobId}`);
const slideIds = this.slides.map((slide: Slide) => slide.id);
let presentationStatus: any;
this.exportSubscribtion = this.downloadService.exportFile(path, slideIds).subscribe(status => {
presentationStatus = status;
this.checkPresentationStatus(presentationStatus.message);
});
if (this.isChecked) {
this.exportMetaData(slideIds);
}
}
C
S
C
S
C
S
C
C
VS
VS