fix: 报告导出空白页

This commit is contained in:
chenjianxing 2020-11-16 22:06:50 +08:00
parent acaddcbe7a
commit 23af8e25ea
3 changed files with 18 additions and 24 deletions

View File

@ -158,14 +158,12 @@ export default {
let reset = this.exportReportReset; let reset = this.exportReportReset;
this.$nextTick(function () { this.$nextTick(function () {
setTimeout(() => {
html2canvas(document.getElementById('apiTestReport'), { html2canvas(document.getElementById('apiTestReport'), {
scale: 2 // scale: 2,
}).then(function(canvas) { }).then(function(canvas) {
exportPdf(name, [canvas]); exportPdf(name, [canvas]);
reset(); reset();
}); });
}, 1000);
}); });
}, },
exportReportReset() { exportReportReset() {

View File

@ -271,14 +271,12 @@ export default {
let reset = this.exportReportReset; let reset = this.exportReportReset;
this.$nextTick(function () { this.$nextTick(function () {
setTimeout(() => {
html2canvas(document.getElementById('performanceReportExport'), { html2canvas(document.getElementById('performanceReportExport'), {
scale: 2 // scale: 2
}).then(function (canvas) { }).then(function (canvas) {
exportPdf(name, [canvas]); exportPdf(name, [canvas]);
reset(); reset();
}); });
}, 1000);
}); });
}, },
exportReportReset() { exportReportReset() {

View File

@ -210,14 +210,12 @@
let reset = this.exportReportReset; let reset = this.exportReportReset;
this.$nextTick(function () { this.$nextTick(function () {
setTimeout(() => {
html2canvas(document.getElementById('testCaseReportExport'), { html2canvas(document.getElementById('testCaseReportExport'), {
scale: 2 // scale: 2
}).then(function(canvas) { }).then(function(canvas) {
exportPdf(name, [canvas]); exportPdf(name, [canvas]);
reset(); reset();
}); });
}, 1000);
}); });
}, },