|
@@ -1182,10 +1182,12 @@ func PublishReport(reportId int, reportUrl string, sysUser *system.Admin) (tips
|
|
|
}
|
|
|
|
|
|
// 普通报告
|
|
|
- if reportInfo.Content == "" && reportInfo.ReportLayout != 3 {
|
|
|
- errMsg = `报告内容为空,不可发布`
|
|
|
- err = errors.New("报告内容为空,不需要生成,report_id:" + strconv.Itoa(reportId))
|
|
|
- return
|
|
|
+ if reportInfo.ReportLayout != 3 {
|
|
|
+ if reportInfo.Content == "" {
|
|
|
+ errMsg = `报告内容为空,不可发布`
|
|
|
+ err = errors.New("报告内容为空,不需要生成,report_id:" + strconv.Itoa(reportId))
|
|
|
+ return
|
|
|
+ }
|
|
|
} else {
|
|
|
pages, pageErr := report.GetFreeLayoutChapterPagesByReportId(reportInfo.Id)
|
|
|
if pageErr != nil {
|
|
@@ -1641,6 +1643,9 @@ func GetGeneralPdfUrl(reportId int, reportCode, classifyFirstName string, report
|
|
|
case 2:
|
|
|
// 智能布局
|
|
|
pdfUrl = fmt.Sprintf("%s/reportshare_smart_pdf?code=%s", reportUrl, reportCode)
|
|
|
+ case 3:
|
|
|
+ // 智能布局
|
|
|
+ pdfUrl = fmt.Sprintf("%s/reportshare_free_pdf?code=%s", reportUrl, reportCode)
|
|
|
}
|
|
|
|
|
|
if pdfUrl != "" {
|