|
|
@@ -263,9 +263,14 @@
|
|
|
title:'正在生成PDF所需的图片...'
|
|
|
})
|
|
|
await this.downloadZtzdfxImg();
|
|
|
- this.reportData.dimensionAnalysis.forEach(async d=>{
|
|
|
- await this.generateScoreImage(d)
|
|
|
- })
|
|
|
+ for(const d of this.reportData.dimensionAnalysis){
|
|
|
+ const fileurl = await this.generateScoreImage(d);
|
|
|
+ this.pdfImages.push(fileurl)
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$showToast(`生成成功,共计${this.pdfImages.length}张`);
|
|
|
+ uni.hideLoading();
|
|
|
+ console.log(this.pdfImages);
|
|
|
},
|
|
|
// 绘制主函数
|
|
|
async generateScoreImage(dimensionData) {
|
|
|
@@ -333,12 +338,7 @@
|
|
|
console.log('图片生成成功!', result.tempFilePath);
|
|
|
const fileurl = await this.uploadFilePromise(result.tempFilePath);
|
|
|
console.log(fileurl, 'fileurl');
|
|
|
- this.pdfImages.push(fileurl);
|
|
|
- if(this.pdfImages.length===7){
|
|
|
- uni.hideLoading();
|
|
|
- console.log(this.pdfImages,'pdfImages');
|
|
|
- }
|
|
|
- resolve()
|
|
|
+ resolve(fileurl)
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
console.error('图片生成失败', err);
|