瀏覽代碼

Merge branch 'eta/1.4.1' into debug

# Conflicts:
#	services/data/chart_theme.go
Roc 1 年之前
父節點
當前提交
f9ac19b778
共有 1 個文件被更改,包括 17 次插入2 次删除
  1. 17 2
      services/data/chart_theme.go

+ 17 - 2
services/data/chart_theme.go

@@ -143,8 +143,8 @@ func getThemePreviewEdbDataMapList(chartType int, calendar, startDate, endDate s
 		item.ChartInfoId = v.ChartInfoId
 		item.ChartStyle = v.ChartStyle
 		item.ChartColor = v.ChartColor
-		item.ChartWidth = v.ChartWidth
-		item.IsOrder = false
+		item.ChartWidth = 1
+		item.IsOrder = true
 		item.MaxData = v.MaxValue
 		item.MinData = v.MinValue
 		item.LatestValue = v.LatestValue
@@ -574,6 +574,21 @@ func GetChartThemeConfig(chartThemeId, source, chartType int) (chartTheme *chart
 	if err != nil {
 		return
 	}
+
+	// 寻找默认的主题id
+	chartTheme, err = chart_theme.GetChartThemeId(chartThemeType.DefaultChartThemeId)
+	if err != nil && err.Error() != utils.ErrNoRow() {
+		return
+	}
+
+	err = nil
+
+	// 如果找到了,那么就返回
+	if chartTheme != nil {
+		return
+	}
+
+	// 如果还是没找到,那就系统的主题id
 	chartTheme, err = chart_theme.GetSystemChartTheme(chartThemeType.ChartThemeTypeId)
 
 	return