Browse Source

图表另存为

xyxie 1 year ago
parent
commit
2970084a8f
2 changed files with 14 additions and 9 deletions
  1. 9 8
      controllers/data_manage/chart_info.go
  2. 5 1
      controllers/data_manage/edb_info.go

+ 9 - 8
controllers/data_manage/chart_info.go

@@ -2430,14 +2430,15 @@ func (this *ChartInfoController) CopyChartInfo() {
 		ChartImage:      oldChartInfo.ChartImage,
 		BarConfig:       oldChartInfo.BarConfig,
 		//Sort:     sort,
-		LeftMin:     oldChartInfo.LeftMin,
-		LeftMax:     oldChartInfo.LeftMax,
-		RightMin:    oldChartInfo.RightMin,
-		RightMax:    oldChartInfo.RightMax,
-		Disabled:    oldChartInfo.Disabled,
-		Source:      oldChartInfo.Source,
-		ExtraConfig: oldChartInfo.ExtraConfig,
-		StartYear:   oldChartInfo.StartYear,
+		LeftMin:           oldChartInfo.LeftMin,
+		LeftMax:           oldChartInfo.LeftMax,
+		RightMin:          oldChartInfo.RightMin,
+		RightMax:          oldChartInfo.RightMax,
+		Disabled:          oldChartInfo.Disabled,
+		Source:            oldChartInfo.Source,
+		ExtraConfig:       oldChartInfo.ExtraConfig,
+		SeasonExtraConfig: oldChartInfo.SeasonExtraConfig,
+		StartYear:         oldChartInfo.StartYear,
 	}
 	newId, err := data_manage.AddChartInfo(chartInfo)
 	if err != nil {

+ 5 - 1
controllers/data_manage/edb_info.go

@@ -3769,7 +3769,11 @@ func (this *ChartInfoController) EdbInfoDataSeasonal() {
 		calendar = "公历"
 	}
 	if dateType == 0 {
-		dateType = utils.DateTypeNYears
+		if startDate == "" {
+			dateType = utils.DateTypeNYears
+		} else {
+			dateType = 5
+		}
 	}
 
 	edbInfo, err := data_manage.GetEdbInfoById(edbInfoId)