|
@@ -249,9 +249,12 @@ func (this *ChartFrameworkController) Add() {
|
|
|
t.MyChartClassifyId = v.MyChartClassifyId
|
|
|
t.CreateTime = now
|
|
|
nodes = append(nodes, t)
|
|
|
-
|
|
|
+ num, ok := chartsNumMap[v.MyChartClassifyId]
|
|
|
+ if !ok {
|
|
|
+ num = 0
|
|
|
+ }
|
|
|
// 响应节点数据
|
|
|
- td := data_manage.FormatChartFrameworkNode2Item(t, chartsNumMap[t.MyChartClassifyId])
|
|
|
+ td := data_manage.FormatChartFrameworkNode2Item(t, num)
|
|
|
itemNodes = append(itemNodes, td)
|
|
|
}
|
|
|
}
|
|
@@ -791,7 +794,11 @@ func (this *ChartFrameworkController) Detail() {
|
|
|
if v.NodeId == "" {
|
|
|
continue
|
|
|
}
|
|
|
- itemNodes = append(itemNodes, data_manage.FormatChartFrameworkNode2Item(v, chartsNumMap[v.MyChartClassifyId]))
|
|
|
+ num, ok := chartsNumMap[v.MyChartClassifyId]
|
|
|
+ if !ok {
|
|
|
+ num = 0
|
|
|
+ }
|
|
|
+ itemNodes = append(itemNodes, data_manage.FormatChartFrameworkNode2Item(v, num))
|
|
|
}
|
|
|
detail := data_manage.FormatChartFramework2Item(item, itemNodes)
|
|
|
|