zwxi 9 сар өмнө
parent
commit
fbe0c573ef

+ 4 - 4
controllers/excel_info.go

@@ -131,8 +131,8 @@ func (this *ExcelInfoController) GetTableDetail() {
 			br.ErrMsg = "自定义表格数据获取失败,Err:" + err.Error()
 			return
 		}
-		excelInfo.ExcelSource = strings.Join(sourceNameList, ",")
-		excelInfo.ExcelSourceEn = strings.Join(sourceNameEnList, ",")
+		resp.ExcelSource = strings.Join(sourceNameList, ",")
+		resp.ExcelSourceEn = strings.Join(sourceNameEnList, ",")
 	case utils.MIXED_TABLE:
 		var result request.MixedTableReq
 		err = json.Unmarshal([]byte(excelInfo.Content), &result)
@@ -174,8 +174,8 @@ func (this *ExcelInfoController) GetTableDetail() {
 			br.ErrMsg = "自定义表格数据获取失败,Err:" + err.Error()
 			return
 		}
-		excelInfo.ExcelSource = strings.Join(sourceNameList, ",")
-		excelInfo.ExcelSourceEn = strings.Join(sourceNameEnList, ",")
+		resp.ExcelSource = strings.Join(sourceNameList, ",")
+		resp.ExcelSourceEn = strings.Join(sourceNameEnList, ",")
 	}
 
 	tableData = excel.HandleTableCell(tableData)

+ 0 - 2
models/excel_info.go

@@ -172,8 +172,6 @@ type ExcelInfoView struct {
 	ModifyTime      time.Time `description:"最近修改日期"`
 	CreateTime      time.Time `description:"创建日期"`
 	SourcesFrom     string    `description:"图表来源"`
-	ExcelSource     string    `description:"表格来源str"`
-	ExcelSourceEn   string    `description:"表格来源(英文)"`
 }
 
 // GetExcelInfoByClassifyIdAndName 根据分类id和表格名获取表格信息

+ 10 - 8
models/response/excel_info.go

@@ -10,14 +10,16 @@ import (
 // ExcelTableDetailResp  excel表格详情
 type ExcelTableDetailResp struct {
 	//ChartInfo   *ChartInfo
-	UniqueCode string `description:"表格唯一code"`
-	Source     int    `description:"表格来源,1:excel插件的表格,2:自定义表格,默认:1"`
-	ExcelType  int    `description:"表格类型,1:指标列,2:日期列,默认:1"`
-	ExcelImage string `description:"表格截图"`
-	ExcelName  string `description:"表格名称"`
-	SourcesFrom     string    `description:"图表来源"`
-	TableInfo  excel.TableData
-	Config     ExcelTableDetailConfigResp
+	UniqueCode    string `description:"表格唯一code"`
+	Source        int    `description:"表格来源,1:excel插件的表格,2:自定义表格,默认:1"`
+	ExcelType     int    `description:"表格类型,1:指标列,2:日期列,默认:1"`
+	ExcelImage    string `description:"表格截图"`
+	ExcelName     string `description:"表格名称"`
+	SourcesFrom   string `description:"图表来源"`
+	ExcelSource   string `description:"表格来源str"`
+	ExcelSourceEn string `description:"表格来源(英文)"`
+	TableInfo     excel.TableData
+	Config        ExcelTableDetailConfigResp
 }
 
 // ExcelTableDetailConfigResp