diff --git a/application/admin/controller/wdsxh/member/Rights.php b/application/admin/controller/wdsxh/member/Rights.php index 8c128d7..b1e6bca 100755 --- a/application/admin/controller/wdsxh/member/Rights.php +++ b/application/admin/controller/wdsxh/member/Rights.php @@ -32,4 +32,28 @@ class Rights extends Backend $this->view->assign('join_config', $this->join_config_model->getSimpleByStatus()); $this->searchFields = ['title']; } + + public function index() + { + $this->request->filter(['strip_tags', 'trim']); + $level_id = $this->request->get('level_id'); + if (false === $this->request->isAjax()) { + return $this->view->fetch(); + } + //如果发送的来源是 Selectpage,则转发到 Selectpage + if ($this->request->request('keyField')) { + return $this->selectpage(); + } + + [$where, $sort, $order, $offset, $limit] = $this->buildparams(); + $list = $this->model + ->where(function($query) use($level_id) { + $query->where('level_id', $level_id); + }) + ->where($where) + ->order($sort, $order) + ->paginate($limit); + $result = ['total' => $list->total(), 'rows' => $list->items()]; + return json($result); + } } diff --git a/application/admin/view/wdsxh/member/rights/add.html b/application/admin/view/wdsxh/member/rights/add.html index 82cfc9f..589a207 100755 --- a/application/admin/view/wdsxh/member/rights/add.html +++ b/application/admin/view/wdsxh/member/rights/add.html @@ -65,6 +65,7 @@
diff --git a/application/admin/view/wdsxh/member/rights/edit.html b/application/admin/view/wdsxh/member/rights/edit.html index cae02b2..3473b15 100755 --- a/application/admin/view/wdsxh/member/rights/edit.html +++ b/application/admin/view/wdsxh/member/rights/edit.html @@ -64,6 +64,7 @@ diff --git a/application/admin/view/wdsxh/member/rights/index.html b/application/admin/view/wdsxh/member/rights/index.html index d4fd2cb..f4f2aea 100755 --- a/application/admin/view/wdsxh/member/rights/index.html +++ b/application/admin/view/wdsxh/member/rights/index.html @@ -15,9 +15,9 @@