|
@@ -828,8 +828,8 @@ func (this *ChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
startDate, endDate = utils.GetDateByDateType(req.Curve.DateType, req.Curve.StartDate, req.Curve.EndDate)
|
|
|
}
|
|
|
|
|
|
- // 图例
|
|
|
- var extraConfig string
|
|
|
+ // 图例, 图表来源
|
|
|
+ var sourceFrom, extraConfig string
|
|
|
if req.CorrelationExtraConfig != nil {
|
|
|
b, e := json.Marshal(req.CorrelationExtraConfig)
|
|
|
if e != nil {
|
|
@@ -839,6 +839,15 @@ func (this *ChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
}
|
|
|
extraConfig = string(b)
|
|
|
}
|
|
|
+ if req.SourcesFrom != nil {
|
|
|
+ b, e := json.Marshal(req.SourcesFrom)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "保存失败"
|
|
|
+ br.ErrMsg = fmt.Sprintf("图表来源JSON格式化失败, Err: %v", e)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ sourceFrom = string(b)
|
|
|
+ }
|
|
|
|
|
|
correlationChartInfoReq := data_manage.CorrelationChartInfoReq{
|
|
|
LeadValue: leadValue,
|
|
@@ -871,6 +880,7 @@ func (this *ChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
Calendar: "公历",
|
|
|
CorrelationChartInfo: correlationChartInfoReq,
|
|
|
ExtraConfig: extraConfig,
|
|
|
+ SourcesFrom: sourceFrom,
|
|
|
}
|
|
|
chartInfo, err, errMsg, isSendEmail = correlationServ.AddChartInfo(addChartReq, chartSource, sysUser, this.Lang)
|
|
|
} else {
|
|
@@ -882,6 +892,7 @@ func (this *ChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
Calendar: "公历",
|
|
|
CorrelationChartInfo: correlationChartInfoReq,
|
|
|
ExtraConfig: extraConfig,
|
|
|
+ SourcesFrom: sourceFrom,
|
|
|
}
|
|
|
chartInfo, err, errMsg, isSendEmail = correlationServ.EditChartInfo(editChartReq, sysUser, this.Lang)
|
|
|
if err != nil {
|