fix(性能测试): 修复导出报告图表错乱的问题
This commit is contained in:
parent
13c5754098
commit
87e00fb3d5
|
@ -168,7 +168,7 @@ export function exportPdf(name, canvasList) {
|
||||||
let blankHeight = a4Height - currentHeight;
|
let blankHeight = a4Height - currentHeight;
|
||||||
|
|
||||||
if (leftHeight > blankHeight) {
|
if (leftHeight > blankHeight) {
|
||||||
if (blankHeight < 200) {
|
if (blankHeight < 300) {
|
||||||
pdf.addPage();
|
pdf.addPage();
|
||||||
currentHeight = 0;
|
currentHeight = 0;
|
||||||
}
|
}
|
||||||
|
@ -182,10 +182,10 @@ export function exportPdf(name, canvasList) {
|
||||||
leftHeight -= occupation;
|
leftHeight -= occupation;
|
||||||
position -= occupation;
|
position -= occupation;
|
||||||
//避免添加空白页
|
//避免添加空白页
|
||||||
// if (leftHeight > 0) {
|
if (leftHeight > 0) {
|
||||||
// pdf.addPage();
|
pdf.addPage();
|
||||||
// currentHeight = 0;
|
currentHeight = 0;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pdf.addImage(pageData, 'JPEG', 0, currentHeight, imgWidth, imgHeight);
|
pdf.addImage(pageData, 'JPEG', 0, currentHeight, imgWidth, imgHeight);
|
||||||
|
|
Loading…
Reference in New Issue