|
@@ -16,6 +16,7 @@ import (
|
|
|
"eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
+ "github.com/shopspring/decimal"
|
|
|
"github.com/yidane/formula"
|
|
|
"io"
|
|
|
"os"
|
|
@@ -1197,6 +1198,7 @@ func (c *ExcelInfoController) GetExcelTableData() {
|
|
|
return
|
|
|
}
|
|
|
uniqueCode := c.GetString("UniqueCode")
|
|
|
+ fromScene, _ := c.GetInt("FromScene", 0)
|
|
|
|
|
|
var err error
|
|
|
if uniqueCode == `` {
|
|
@@ -1281,11 +1283,28 @@ func (c *ExcelInfoController) GetExcelTableData() {
|
|
|
|
|
|
tableData = excel.HandleTableCell(tableData)
|
|
|
|
|
|
+ config := response.ExcelTableDetailConfigResp{
|
|
|
+ FontSize: 9,
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取配置的字体大小
|
|
|
+ confName := models.FromSceneMap[fromScene]
|
|
|
+ if confName != `` {
|
|
|
+ busConf, err := models.GetBusinessConfByKey(confName)
|
|
|
+ if err == nil {
|
|
|
+ sizeDeci, err := decimal.NewFromString(busConf.ConfVal)
|
|
|
+ if err == nil {
|
|
|
+ config.FontSize = int(sizeDeci.IntPart())
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
resp := response.ExcelTableDetailResp{
|
|
|
UniqueCode: excelInfo.UniqueCode,
|
|
|
ExcelImage: excelInfo.ExcelImage,
|
|
|
ExcelName: excelInfo.ExcelName,
|
|
|
TableInfo: tableData,
|
|
|
+ Config: config,
|
|
|
}
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|