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