不修改生成文件,改为 json/users.json 指定 custom URLs: - new_data_url → /rbac/api/add_user.dspy - update_data_url → /rbac/api/update_user.dspy 客制化修复: 1. 新增用户: created_at 默认当天日期 2. 新增/编辑: 清除 Tabular 发送的 _text 后缀字段 3. 编辑: 密码为空时不覆盖原密码
46 lines
1.3 KiB
JSON
46 lines
1.3 KiB
JSON
{
|
|
"tblname": "users",
|
|
"title":"用户",
|
|
"params": {
|
|
"new_data_url": "{{entire_url('/rbac/api/add_user.dspy')}}",
|
|
"update_data_url": "{{entire_url('/rbac/api/update_user.dspy')}}",
|
|
"sortby":"username",
|
|
"confidential_fields":["password"],
|
|
"logined_userorgid":"orgid",
|
|
"browserfields": {
|
|
"exclouded": ["id", "password", "orgid", "nick_name" ],
|
|
"cwidth": {}
|
|
},
|
|
"editexclouded": ["id", "nick_name", "orgid", "last_login_fail", "last_login", "sync_from", "login_fail_count", "created_at"],
|
|
"record_toolbar": [
|
|
{
|
|
"label": "启用",
|
|
"actiontype": "dspy",
|
|
"url": "/rbac/users/enable_user.dspy",
|
|
"options": {
|
|
"icon": "check",
|
|
"cwidth": 16,
|
|
"cheight": 9
|
|
}
|
|
},
|
|
{
|
|
"label": "禁用",
|
|
"actiontype": "dspy",
|
|
"url": "/rbac/users/disable_user.dspy",
|
|
"options": {
|
|
"icon": "block",
|
|
"cwidth": 16,
|
|
"cheight": 9
|
|
}
|
|
}
|
|
],
|
|
"subtables": [
|
|
{
|
|
"field":"userid",
|
|
"title":"用户角色",
|
|
"subtable":"userrole"
|
|
}
|
|
]
|
|
}
|
|
}
|