增加表关联新建功能,同时修复数据库bug
This commit is contained in:
parent
ada4a926c0
commit
d736a74198
@ -234,8 +234,11 @@ func (that *MakeCode) Db2JSON(name string, path string, db db.HoTimeDB) {
|
|||||||
coloum["sortable"] = true
|
coloum["sortable"] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !coloum.GetBool("notUse") {
|
||||||
|
that.TableConfig.GetMap(v.GetString("name"))["columns"] = append(that.TableConfig.GetMap(v.GetString("name")).GetSlice("columns"), coloum)
|
||||||
|
}
|
||||||
//如果是select类型需要设置options
|
//如果是select类型需要设置options
|
||||||
if coloum.GetString("type") == "select" {
|
//if coloum.GetString("type") == "select" {
|
||||||
|
|
||||||
options := Slice{}
|
options := Slice{}
|
||||||
comments := strings.Split(info.GetString("label"), " ")
|
comments := strings.Split(info.GetString("label"), " ")
|
||||||
@ -248,12 +251,17 @@ func (that *MakeCode) Db2JSON(name string, path string, db db.HoTimeDB) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
coloum["options"] = options
|
|
||||||
}
|
|
||||||
|
|
||||||
if !coloum.GetBool("notUse") {
|
if coloum.GetString("type") == "select" {
|
||||||
that.TableConfig.GetMap(v.GetString("name"))["columns"] = append(that.TableConfig.GetMap(v.GetString("name")).GetSlice("columns"), coloum)
|
coloum["must"] = true
|
||||||
|
coloum["options"] = options
|
||||||
|
} else if len(options) > 0 {
|
||||||
|
coloum["must"] = true
|
||||||
|
coloum["options"] = options
|
||||||
|
coloum["type"] = "select"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
//else {
|
//else {
|
||||||
|
Loading…
Reference in New Issue
Block a user