79 lines
2.5 KiB
XML
79 lines
2.5 KiB
XML
{
|
|
"name": "role_admin",
|
|
"title": "角色权限配置(F11)",
|
|
"type": "tabpanel",
|
|
"items": [
|
|
{
|
|
"type": "grid",
|
|
"columns": [
|
|
{"field": "role_code", "title": "角色编码", "width": 120},
|
|
{"field": "role_name", "title": "角色名称", "width": 140},
|
|
{"field": "remark", "title": "备注", "width": 260},
|
|
{"field": "perm_count", "title": "权限点数", "width": 90},
|
|
{"field": "created_at", "title": "创建时间", "width": 160}
|
|
],
|
|
"api": {
|
|
"list": {"endpoint": "role_list"},
|
|
"detail": {"endpoint": "role_detail"},
|
|
"create": {"endpoint": "role_create"},
|
|
"update": {"endpoint": "role_update"},
|
|
"delete": {"endpoint": "role_delete"}
|
|
},
|
|
"toolbar": ["create", "update", "delete", "refresh"]
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"title": "权限点分配",
|
|
"items": [
|
|
{
|
|
"type": "tree",
|
|
"title": "可用权限点",
|
|
"checkable": true,
|
|
"api": {"list": {"endpoint": "perm_tree"}}
|
|
},
|
|
{
|
|
"type": "button",
|
|
"label": "保存分配",
|
|
"event": {
|
|
"onClick": {
|
|
"endpoint": "role_assign_perms",
|
|
"payload": {"role_id": "{selected_role.id}", "perm_ids": "{checked_perm_ids}"}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"title": "管理员管理",
|
|
"items": [
|
|
{
|
|
"type": "grid",
|
|
"columns": [
|
|
{"field": "username", "title": "用户名", "width": 120},
|
|
{"field": "real_name", "title": "姓名", "width": 120},
|
|
{"field": "role_codes", "title": "绑定角色", "width": 240},
|
|
{"field": "status", "title": "状态", "width": 80},
|
|
{"field": "created_at", "title": "创建时间", "width": 160}
|
|
],
|
|
"api": {
|
|
"list": {"endpoint": "admin_list"},
|
|
"create": {"endpoint": "admin_create"},
|
|
"delete": {"endpoint": "admin_disable"}
|
|
},
|
|
"toolbar": ["create", "refresh"]
|
|
},
|
|
{
|
|
"type": "form",
|
|
"title": "绑定角色",
|
|
"fields": [
|
|
{"field": "user_id", "title": "管理员", "type": "hidden"},
|
|
{"field": "role_ids", "title": "角色", "type": "multi-select", "optionsApi": {"endpoint": "role_list"}}
|
|
],
|
|
"api": {"submit": {"endpoint": "admin_bind_roles"}}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|