浏览代码

Merge remote-tracking branch 'origin/eta/1.4.1' into debug

Roc 1 年之前
父节点
当前提交
c51c293d8a
共有 2 个文件被更改,包括 15 次插入1 次删除
  1. 14 0
      controllers/data_manage/chart_info.go
  2. 1 1
      services/data/edb_info.go

+ 14 - 0
controllers/data_manage/chart_info.go

@@ -910,6 +910,11 @@ func (this *ChartInfoController) ChartInfoDetail() {
 			}
 		}
 	}
+	
+	// 图表的指标来源
+	sourceNameList, sourceNameEnList := data.GetEdbSourceByEdbInfoIdList(edbList)
+	chartInfo.ChartSource = strings.Join(sourceNameList, ",")
+	chartInfo.ChartSourceEn = strings.Join(sourceNameEnList, ",")
 
 	//图表操作权限
 	chartInfo.IsEdit = data.CheckOpChartPermission(sysUser, chartInfo.SysUserId)
@@ -2698,6 +2703,10 @@ func (this *ChartInfoController) PreviewBarChartInfo() {
 	if len(warnEdbList) > 0 {
 		chartInfo.WarnMsg = `图表引用指标异常,异常指标:` + strings.Join(warnEdbList, ",")
 	}
+	// 图表的指标来源
+	sourceNameList, sourceNameEnList := data.GetEdbSourceByEdbInfoIdList(edbList)
+	chartInfo.ChartSource = strings.Join(sourceNameList, ",")
+	chartInfo.ChartSourceEn = strings.Join(sourceNameEnList, ",")
 
 	//图表操作权限
 	chartInfo.IsEdit = data.CheckOpChartPermission(sysUser, chartInfo.SysUserId)
@@ -2784,6 +2793,11 @@ func (this *ChartInfoController) PreviewSectionScatterChartInfo() {
 		chartInfo.WarnMsg = `图表引用指标异常,异常指标:` + strings.Join(warnEdbList, ",")
 	}
 
+	// 图表的指标来源
+	sourceNameList, sourceNameEnList := data.GetEdbSourceByEdbInfoIdList(edbList)
+	chartInfo.ChartSource = strings.Join(sourceNameList, ",")
+	chartInfo.ChartSourceEn = strings.Join(sourceNameEnList, ",")
+
 	//图表操作权限
 	chartInfo.IsEdit = data.CheckOpChartPermission(sysUser, chartInfo.SysUserId)
 	//判断是否需要展示英文标识

+ 1 - 1
services/data/edb_info.go

@@ -2922,7 +2922,7 @@ func GetBaseIndexTableName(source int) (tableName string) {
 	return
 }
 
-// EdbInfoAdd 添加指标到指标库
+// EdbInfoWsdAdd 添加指标到指标库
 func EdbInfoWsdAdd(item *data_manage.EdbInfo) (edbInfo *data_manage.EdbInfo, err error, errMsg string, isSendEmail bool) {
 	isSendEmail = true
 	//判断指标名称是否存在