Ver Fonte

Merge branch 'feature/eta_2.6.9' into debug

hsun há 6 dias atrás
pai
commit
4161264d4e
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      services/smart_report.go

+ 2 - 2
services/smart_report.go

@@ -664,10 +664,10 @@ func calculateReportPdfHeight(width int, freeRatio string) (height int, err erro
 		err = fmt.Errorf("布局比例有误, %s", freeRatio)
 		return
 	}
-	if n <= 0 {
+	if m <= 0 {
 		err = fmt.Errorf("布局比例有误, %s", freeRatio)
 		return
 	}
-	height = int(math.Round(float64(width) * m / n))
+	height = int(math.Round(float64(width) * n / m))
 	return
 }