This commit is contained in:
weiz 2023-12-09 17:36:21 +08:00
parent cf647f22fc
commit 9053cc1208
2 changed files with 6 additions and 2 deletions

View File

@ -147,7 +147,6 @@ class AdminLists extends BaseAdminDataLists implements ListsExtendInterface, Lis
->append(['role_id', 'org_id', 'dept_id', 'jobs_id', 'disable_desc'])
->select()
->toArray();
// 角色数组('角色id'=>'角色名称')
$roleLists = SystemRole::column('name', 'id');
// 组织列表
@ -188,7 +187,7 @@ class AdminLists extends BaseAdminDataLists implements ListsExtendInterface, Lis
}
$adminLists[$k]['role_name'] = trim($roleName, '/');
$adminLists[$k]['$orgName'] = trim($orgName, '/');
$adminLists[$k]['orgName'] = trim($orgName, '/');
$adminLists[$k]['dept_name'] = trim($deptName, '/');
$adminLists[$k]['jobs_name'] = trim($jobsName, '/');
}

View File

@ -45,6 +45,11 @@ class Admin extends BaseModel
{
return AdminRole::where('admin_id', $data['id'])->column('role_id');
}
public function getOrgIdAttr($value, $data)
{
return AdminOrgs::where('admin_id', $data['id'])->column('org_id');
}
/**