mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
feat: 统一状态字段为字符串类型并标准化状态显示
refactor: 将状态字段从布尔值改为字符串类型'0'和'1' fix: 修复前端组件中状态显示和判断逻辑 docs: 更新相关字段描述为'0:启用 1:禁用' style: 统一时间查询字段为created_time和created_id
This commit is contained in:
@@ -189,7 +189,7 @@ class RoleService:
|
||||
# 处理数据
|
||||
data = role_list.copy()
|
||||
for item in data:
|
||||
item['status'] = '正常' if item.get('status') else '停用'
|
||||
item['status'] = '启用' if item.get('status') == '0' else '停用'
|
||||
item['data_scope'] = data_scope_map.get(item.get('data_scope', 1), '')
|
||||
item['creator'] = item.get('creator', {}).get('name', '未知') if isinstance(item.get('creator'), dict) else '未知'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user