From 45c5c75ae402bafe8b7d8ddc3f877b7dc7946ef7 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 31 Jan 2023 13:51:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B09?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/nk/User.php | 18 ++++++------------ app/admin/view/nk/user/index.html | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/app/admin/controller/nk/User.php b/app/admin/controller/nk/User.php index e5c0d44..f0f38ea 100644 --- a/app/admin/controller/nk/User.php +++ b/app/admin/controller/nk/User.php @@ -45,8 +45,8 @@ class User extends BaseController } //权限组信息 - if ($this->adminInfo['position_id'] != 1) { - $find = Db::table('fa_szxc_information_useraddress')->where('user_id', $this->adminInfo['id'])->find(); + if ($this->adminInfo['group_access'] != 1) { + $find = Db::table('fa_szxc_information_useraddress')->where('admin_id', $this->adminInfo['id'])->find(); if ($find) { if ($find['auth_range'] == 1) { $mmm['village_id'] = $find['village_id']; @@ -106,19 +106,13 @@ class User extends BaseController return table_assign(0, '', $result); } //权限组信息 - if ($this->adminInfo['position_id'] != 1) { //不是超级管理员 + if ($this->adminInfo['group_access'] != 1) { //不是超级管理员 $www['admin_id'] = $this->adminInfo['id']; $user_address = Db::table('fa_szxc_information_useraddress')->where($www)->find(); if ($user_address) { - if ($user_address['auth_range'] == 1) { + if ($user_address['auth_range'] <=3 &&$user_address['auth_range'] >=1 ) { $select = Db::table('fa_geo_area')->where('city_code', '510500')->where('area_code', $user_address['area_id'])->select(); - } elseif ($user_address['auth_range'] == 2) { - $select = Db::table('fa_geo_area')->where('city_code', '510500')->where('area_code', $user_address['area_id'])->select(); - } elseif ($user_address['auth_range'] == 3) { - $select = Db::table('fa_geo_area')->where('city_code', '510500')->where('area_code', $user_address['area_id'])->select(); - } elseif ($user_address['auth_range'] == 4) { - $select = Db::table('fa_geo_area')->where('city_code', '510500')->select(); - } else { + } else { $select = Db::table('fa_geo_area')->where('city_code', '510500')->select(); } View::assign('row', $user_address); @@ -685,7 +679,7 @@ class User extends BaseController } //权限组信息 $groupwhere[] = ['id', 'in', [2,4]]; - if ($this->adminInfo['position_id'] != 1) { //不是超级管理员 + if ($this->adminInfo['group_access'] != 1) { //不是超级管理员 // $www['admin_id'] = $this->adminInfo['id']; // $user_address = Db::table('fa_szxc_information_useraddress')->where($www)->find(); // if ($user_address) { diff --git a/app/admin/view/nk/user/index.html b/app/admin/view/nk/user/index.html index 12d478c..815ca17 100644 --- a/app/admin/view/nk/user/index.html +++ b/app/admin/view/nk/user/index.html @@ -215,7 +215,7 @@ data: [], radio: true, initValue: ["{$row.street_id}"], - disabled: group_access == 2 ? true : false, + disabled: group_access == 2 || group_access==4 ? true : false, on: function (data) { var arr = data.arr; village(arr[0]['code'])