优化页面样式

This commit is contained in:
2026-03-10 09:59:24 +08:00
parent 99a0b63f0e
commit e94ebd3fe6
8 changed files with 36 additions and 16 deletions

View File

@@ -117,7 +117,10 @@ class SystemDeptLogic extends BaseLogic
public function accessDept(array $where = []): array
{
$query = $this->search($where);
$query->auth($this->adminInfo['deptList']);
// 超级管理员(id=1)可查看全部部门,普通管理员按部门权限过滤
if (isset($this->adminInfo['id']) && $this->adminInfo['id'] > 1) {
$query->auth($this->adminInfo['deptList'] ?? []);
}
$query->field('id, id as value, name as label, parent_id');
$query->order('sort', 'desc');
$data = $this->getAll($query);