作者 庄敏学
@@ -3,11 +3,13 @@ Host: 0.0.0.0 @@ -3,11 +3,13 @@ Host: 0.0.0.0
3 Port: 8080 3 Port: 8080
4 Verbose: true 4 Verbose: true
5 HostName: http://sumifcc-bchart-dev.sumifcc.com 5 HostName: http://sumifcc-bchart-dev.sumifcc.com
  6 +Timeout: 30000
6 7
7 Log: 8 Log:
8 Mode: file 9 Mode: file
9 Encoding: plain 10 Encoding: plain
10 Level: debug # info 11 Level: debug # info
  12 + MaxContentLength: 5120 # 5KB
11 13
12 JwtAuth: 14 JwtAuth:
13 AccessSecret: digital-platform 15 AccessSecret: digital-platform
@@ -18,7 +18,7 @@ Redis: @@ -18,7 +18,7 @@ Redis:
18 Type: node 18 Type: node
19 Pass: 19 Pass:
20 DB: 20 DB:
21 - DataSource: host=114.55.200.59 user=postgres password=eagle1010 dbname=sumifcc-bchart port=31543 sslmode=disable TimeZone=Asia/Shanghai 21 + DataSource: host=114.55.200.59 user=postgres password=eagle1010 dbname=sumifcc-bchart-prd port=31543 sslmode=disable TimeZone=Asia/Shanghai
22 22
23 ByteMetadata: 23 ByteMetadata:
24 Name: ApiByteMetadata 24 Name: ApiByteMetadata
@@ -3,6 +3,7 @@ Host: 0.0.0.0 @@ -3,6 +3,7 @@ Host: 0.0.0.0
3 Port: 8081 3 Port: 8081
4 Verbose: true 4 Verbose: true
5 HostName: http://sumifcc-bchart-dev.sumifcc.com 5 HostName: http://sumifcc-bchart-dev.sumifcc.com
  6 +Timeout: 30000
6 7
7 Log: 8 Log:
8 #Mode: file 9 #Mode: file
@@ -10,6 +11,7 @@ Log: @@ -10,6 +11,7 @@ Log:
10 Level: debug # info 11 Level: debug # info
11 MaxSize: 1 # 2MB 12 MaxSize: 1 # 2MB
12 TimeFormat: 2006-01-02 15:04:05.000 13 TimeFormat: 2006-01-02 15:04:05.000
  14 + MaxContentLength: 5120 # 5KB
13 15
14 JwtAuth: 16 JwtAuth:
15 AccessSecret: digital-platform 17 AccessSecret: digital-platform
@@ -32,7 +32,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM @@ -32,7 +32,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM
32 list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ 32 list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{
33 Token: req.Token, 33 Token: req.Token,
34 TableTypes: []string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable}, 34 TableTypes: []string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable},
35 - Module: bytelib.ModuleDigitalCenter, 35 + Module: bytelib.ModuleDigitalCenter | bytelib.ModuleChartTemplate, // TODO:字库更新完改为只查 bytelib.ModuleChartTemplate
36 }) 36 })
37 if err != nil { 37 if err != nil {
38 batchError.Add(err) 38 batchError.Add(err)
@@ -52,7 +52,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM @@ -52,7 +52,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM
52 }, func() { 52 }, func() {
53 list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ 53 list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{
54 Token: req.Token, 54 Token: req.Token,
55 - TableTypes: []string{bytelib.CalculateItem, bytelib.CalculateSet}, 55 + TableTypes: []string{bytelib.CalculateItem},
56 Module: bytelib.ModuleCalculateCenter, 56 Module: bytelib.ModuleCalculateCenter,
57 ReturnGroupItem: true, 57 ReturnGroupItem: true,
58 ExcludeTables: []int{0}, 58 ExcludeTables: []int{0},
@@ -60,7 +60,19 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM @@ -60,7 +60,19 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM
60 if err != nil { 60 if err != nil {
61 batchError.Add(err) 61 batchError.Add(err)
62 } 62 }
63 - result["计算模块"] = newList(list) 63 + result["计算项"] = newList(list)
  64 + }, func() {
  65 + list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{
  66 + Token: req.Token,
  67 + TableTypes: []string{bytelib.CalculateSet},
  68 + Module: bytelib.ModuleCalculateCenter,
  69 + ReturnGroupItem: true,
  70 + ExcludeTables: []int{0},
  71 + })
  72 + if err != nil {
  73 + batchError.Add(err)
  74 + }
  75 + result["计算集"] = newList(list)
64 }) 76 })
65 if err = batchError.Err(); err != nil { 77 if err = batchError.Err(); err != nil {
66 logx.Error(err) 78 logx.Error(err)
@@ -153,6 +153,13 @@ type Title struct { @@ -153,6 +153,13 @@ type Title struct {
153 type TableAbility struct { 153 type TableAbility struct {
154 FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关 154 FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关
155 DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表 155 DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表
  156 + CardSwitch bool `json:"cardSwitch,optional"` // 顺序标识开关
  157 + CardIdent string `json:"cardIdent,optional"` // 顺序标识
  158 + CardOrderList []CardOrderItem `json:"cardOrderList,optional"` // 卡片列表顺序
  159 +}
  160 +
  161 +type CardOrderItem struct {
  162 + CardId string `json:"cardId,optional"`
156 } 163 }
157 164
158 type Series struct { 165 type Series struct {
@@ -63,6 +63,13 @@ type Title struct { @@ -63,6 +63,13 @@ type Title struct {
63 type TableAbility struct { 63 type TableAbility struct {
64 FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关 64 FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关
65 DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表 65 DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表
  66 + CardSwitch bool `json:"cardSwitch,optional"` // 顺序标识开关
  67 + CardIdent string `json:"cardIdent,optional"` // 顺序标识
  68 + CardOrderList []CardOrderItem `json:"cardOrderList,optional"` // 卡片列表顺序
  69 +}
  70 +
  71 +type CardOrderItem struct {
  72 + CardId string `json:"cardId,optional"`
66 } 73 }
67 74
68 type Series struct { 75 type Series struct {
@@ -12,10 +12,11 @@ var ( @@ -12,10 +12,11 @@ var (
12 ) 12 )
13 13
14 const ( 14 const (
15 - ModuleAll = ModuleDigitalCenter | ModuleQuerySetCenter | ModuleCalculateCenter 15 + ModuleAll = ModuleDigitalCenter | ModuleQuerySetCenter | ModuleCalculateCenter | ModuleChartTemplate
16 ModuleDigitalCenter = 1 16 ModuleDigitalCenter = 1
17 ModuleQuerySetCenter = 2 17 ModuleQuerySetCenter = 2
18 ModuleCalculateCenter = 4 18 ModuleCalculateCenter = 4
  19 + ModuleChartTemplate = 8
19 ) 20 )
20 21
21 const ( 22 const (
@@ -190,6 +190,12 @@ type( @@ -190,6 +190,12 @@ type(
190 TableAbility struct { 190 TableAbility struct {
191 FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关 191 FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关
192 DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表 192 DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表
  193 + CardSwitch bool `json:"cardSwitch,optional"` // 顺序标识开关
  194 + CardIdent string `json:"cardIdent,optional"` // 顺序标识
  195 + CardOrderList []CardOrderItem `json:"cardOrderList,optional"` // 卡片列表顺序
  196 + }
  197 + CardOrderItem struct {
  198 + CardId string `json:"cardId,optional"`
193 } 199 }
194 Series struct {// 图表类型 (记录型表格:RecordTable-1 总体指标:MetricsCard-1 容器卡片:ContainerCard-1 四分图:QuarterChart-1) 200 Series struct {// 图表类型 (记录型表格:RecordTable-1 总体指标:MetricsCard-1 容器卡片:ContainerCard-1 四分图:QuarterChart-1)
195 Name string `json:"name"` // 名称 (例如 指标1、指标2) 201 Name string `json:"name"` // 名称 (例如 指标1、指标2)