ソースを参照

fix: 自由布局比例

hsun 6 日 前
コミット
969b17e9f6
1 ファイル変更2 行追加2 行削除
  1. 2 2
      services/smart_report.go

+ 2 - 2
services/smart_report.go

@@ -343,14 +343,14 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
 
 	// 7/10为A4的比例,不需要重新算
 	if freeRatio != "" && freeRatio != "7/10" {
-		h, e := calculateReportPdfHeight(pcHeight, freeRatio)
+		h, e := calculateReportPdfHeight(pcWidth, freeRatio)
 		if e != nil {
 			err = fmt.Errorf("重新计算PDF生成高度失败, %v", e)
 			return
 		}
 		pcHeight = h
 
-		hm, e := calculateReportPdfHeight(mobileHeight, freeRatio)
+		hm, e := calculateReportPdfHeight(mobileWidth, freeRatio)
 		if e != nil {
 			err = fmt.Errorf("重新计算移动端PDF生成高度失败, %v", e)
 			return