Browse Source

fix:日期也要别名

Roc 2 years ago
parent
commit
9bc43e6a75
3 changed files with 3 additions and 0 deletions
  1. 1 0
      models/chart.go
  2. 1 0
      models/data_manage/chart_info.go
  3. 1 0
      services/data/chart_info.go

+ 1 - 0
models/chart.go

@@ -158,6 +158,7 @@ type YData struct {
 	Date  string    `description:"数据日期"`
 	Color string    `description:"数据颜色"`
 	Value []float64 `description:"每个指标的值"`
+	Name  string    `description:"别名"`
 }
 
 //指标季度数据计算(公历转农历)

+ 1 - 0
models/data_manage/chart_info.go

@@ -128,6 +128,7 @@ type BarChartInfoDateReq struct {
 	Date  string `description:"固定日期"`
 	Value int    `description:"N天的值"`
 	Color string `description:"颜色"`
+	Name  string `description:"别名"`
 }
 
 // BarChartInfoSortReq 柱方图预览请求数据(排序相关)

+ 1 - 0
services/data/chart_info.go

@@ -625,6 +625,7 @@ func BarChartData(mappingList []*models.ChartEdbInfoMapping, edbDataListMap map[
 			Date:  maxDate.Format(utils.FormatDate),
 			Value: findDataList,
 			Color: barChartInfoDate.Color,
+			Name:  barChartInfoDate.Name,
 		})
 	}