权限模块开发
This commit is contained in:
parent
48fd753a96
commit
7e2abb43e3
11
code.go
11
code.go
@ -208,7 +208,16 @@ var TptProject = Proj{
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (column["list"] == nil || column.GetBool("list")) && column.GetString("link") != "" {
|
if (column["list"] == nil || column.GetBool("list")) && column.GetString("link") != "" {
|
||||||
re[column.GetString("link")] = that.Db.Get(column.GetString("link"), "id,"+column.GetString("value"), Map{"id": v})
|
|
||||||
|
//是角色表则取下角色值
|
||||||
|
if column.GetString("link") == "role" {
|
||||||
|
|
||||||
|
re[column.GetString("link")] = that.Db.Get(column.GetString("link"), "id,auth,"+column.GetString("value"), Map{"id": v})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
re[column.GetString("link")] = that.Db.Get(column.GetString("link"), "id,"+column.GetString("value"), Map{"id": v})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,13 @@ var Config = Map{
|
|||||||
//{"label": "测试表格", "table": "table", "icon": "el-icon-suitcase"},
|
//{"label": "测试表格", "table": "table", "icon": "el-icon-suitcase"},
|
||||||
//{"label": "系统管理", "name": "setting", "icon": "el-icon-setting",
|
//{"label": "系统管理", "name": "setting", "icon": "el-icon-setting",
|
||||||
// "menus": []Map{
|
// "menus": []Map{
|
||||||
// {"label": "用户管理", "table": "user"},
|
// {"label": "用户管理", "table": "user",
|
||||||
|
// "default": {
|
||||||
|
// "path": "info",
|
||||||
|
// "id": "1"
|
||||||
|
// },
|
||||||
|
// "auth": ["show","edit","info","add","delete"],
|
||||||
|
// },
|
||||||
// {"label": "组织管理", "table": "organization"},
|
// {"label": "组织管理", "table": "organization"},
|
||||||
// {"label": "地区管理", "table": "area"},
|
// {"label": "地区管理", "table": "area"},
|
||||||
// {"label": "角色管理", "table": "role"},
|
// {"label": "角色管理", "table": "role"},
|
||||||
|
@ -141,7 +141,7 @@ func (that *MakeCode) Db2JSON(name string, path string, db *db.HoTimeDB, makeCod
|
|||||||
that.TableConfig[v.GetString("name")] = Map{
|
that.TableConfig[v.GetString("name")] = Map{
|
||||||
"label": v.GetString("label"),
|
"label": v.GetString("label"),
|
||||||
"table": v.GetString("name"),
|
"table": v.GetString("name"),
|
||||||
"auth": []string{"add", "delete", "edit", "info"},
|
"auth": []string{"show", "add", "delete", "edit", "info"},
|
||||||
"columns": []Map{},
|
"columns": []Map{},
|
||||||
"search": []Map{
|
"search": []Map{
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user