修复bug
This commit is contained in:
+4
-40
@@ -84,38 +84,6 @@ func (that *MakeCode) Db2JSON(db *db.HoTimeDB, config Map) {
|
||||
}
|
||||
|
||||
that.IndexMenus = Map{}
|
||||
//menusConfig := that.Config.GetSlice("menus")
|
||||
////将配置写入到内存中仅作为判断用
|
||||
//if menusConfig != nil {
|
||||
// for kmenu, _ := range menusConfig {
|
||||
// menu := menusConfig.GetMap(kmenu)
|
||||
// if menu != nil {
|
||||
// mname := menu.GetString("table")
|
||||
// if mname == "" { //如果为空则不是表格
|
||||
// mname = menu.GetString("name")
|
||||
// }
|
||||
// that.IndexMenus[mname] = menu
|
||||
// childMenus := menu.GetSlice("menus")
|
||||
// if childMenus != nil {
|
||||
// for ckmenu, _ := range childMenus {
|
||||
// cmenu := childMenus.GetMap(ckmenu)
|
||||
// if cmenu != nil {
|
||||
// cname := cmenu.GetString("table")
|
||||
// if cmenu.GetString("table") == "" {
|
||||
// continue
|
||||
// }
|
||||
// that.IndexMenus[mname+"/"+cname] = cmenu
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
that.TableConfig = that.Config.GetMap("tables")
|
||||
if that.TableConfig == nil {
|
||||
that.TableConfig = Map{}
|
||||
@@ -321,13 +289,6 @@ func (that *MakeCode) Db2JSON(db *db.HoTimeDB, config Map) {
|
||||
//}
|
||||
|
||||
}
|
||||
//else {
|
||||
//
|
||||
// //if !(coloum.GetString("label") != "备注" && info.GetString("label") == "备注") {
|
||||
// // coloum["label"] = info.GetString("label")
|
||||
// //}
|
||||
// //coloum["type"] = info.GetString("type")
|
||||
//}
|
||||
|
||||
//暂时不关闭参数,保证表数据完全读取到
|
||||
that.TableColumns[v.GetString("name")][info.GetString("name")] = coloum
|
||||
@@ -550,9 +511,12 @@ func (that *MakeCode) Db2JSON(db *db.HoTimeDB, config Map) {
|
||||
search := that.TableConfig.GetMap(fk).GetSlice("search")
|
||||
sv := Map{"type": "tree", "label": v["label"], "name": v["name"], "value": v["value"], "link": v["link"]}
|
||||
that.TableConfig.GetMap(fk)["search"] = append(search, sv)
|
||||
|
||||
that.SearchColumns[fk][k] = sv
|
||||
}
|
||||
|
||||
if fk == that.FileConfig.GetString("table") && v["link"] != nil && that.TableColumns[v.GetString("link")]["parent_id"] != nil {
|
||||
that.Config["stop"] = append(that.Config.GetSlice("stop"), v.GetString("link"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user