From 81bc56f571a681a21e5e903a15077fc36b17ed97 Mon Sep 17 00:00:00 2001 From: zhuyu Date: Tue, 24 Jun 2025 17:59:12 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E7=BB=84=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/auth/Admin.php | 24 +++++++++---- application/admin/controller/auth/Group.php | 6 ++++ application/admin/view/auth/admin/index.html | 36 ++++++++++++++++++++ public/assets/js/backend/auth/admin.js | 2 ++ 4 files changed, 62 insertions(+), 6 deletions(-) diff --git a/application/admin/controller/auth/Admin.php b/application/admin/controller/auth/Admin.php index 98208d7..af1cc94 100755 --- a/application/admin/controller/auth/Admin.php +++ b/application/admin/controller/auth/Admin.php @@ -98,12 +98,24 @@ class Admin extends Backend } list($where, $sort, $order, $offset, $limit) = $this->buildparams(); - $list = $this->model - ->where($where) - ->where('id', 'in', $this->childrenAdminIds) - ->field(['password', 'salt', 'token'], true) - ->order($sort, $order) - ->paginate($limit); + $filter = $this->request->param('filter'); + $filter = json_decode($filter, true); + if (isset($filter['group_id'])) { + $list = $this->model + ->join('fa_auth_group_access fg', 'fg.uid = fa_admin.id') + ->where($where) + ->where('id', 'in', $this->childrenAdminIds) + ->field(['password', 'salt', 'token'], true) + ->order($sort, $order) + ->paginate($limit); + } else { + $list = $this->model + ->where($where) + ->where('id', 'in', $this->childrenAdminIds) + ->field(['password', 'salt', 'token'], true) + ->order($sort, $order) + ->paginate($limit); + } foreach ($list as $k => &$v) { $groups = isset($adminGroupName[$v['id']]) ? $adminGroupName[$v['id']] : []; diff --git a/application/admin/controller/auth/Group.php b/application/admin/controller/auth/Group.php index 29ae01d..c4626f6 100755 --- a/application/admin/controller/auth/Group.php +++ b/application/admin/controller/auth/Group.php @@ -82,6 +82,12 @@ class Group extends Backend return $this->view->fetch(); } + public function norightselectpage() + { + $this->dataLimit = null; + return parent::selectpage(); + } + /** * 添加 */ diff --git a/application/admin/view/auth/admin/index.html b/application/admin/view/auth/admin/index.html index 17d7466..2007b30 100755 --- a/application/admin/view/auth/admin/index.html +++ b/application/admin/view/auth/admin/index.html @@ -19,3 +19,39 @@ + diff --git a/public/assets/js/backend/auth/admin.js b/public/assets/js/backend/auth/admin.js index 1b00de7..7629740 100755 --- a/public/assets/js/backend/auth/admin.js +++ b/public/assets/js/backend/auth/admin.js @@ -43,6 +43,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], // 初始化表格 table.bootstrapTable({ url: $.fn.bootstrapTable.defaults.extend.index_url, + searchFormVisible: true, + searchFormTemplate: 'customformtpl', columns: [ [ {field: 'state', checkbox: true,},