Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ichynul committed Jun 21, 2021
1 parent e2ed4e3 commit f6381b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/admin/controller/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ public function login()
} else {

if (!Module::isInstalled()) {
Tool::deleteDir(app()->getRuntimePath() . 'cache');
Cache::clear();
}

$this->assign(['login_in_top' => $config['login_in_top'], 'login_css_file' => $config['login_css_file']]);
Expand Down
24 changes: 3 additions & 21 deletions src/admin/controller/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ protected function initialize()
{
$this->dataModel = new AdminPermission;
$this->pageTitle = '权限设置';
$this->pagesize = 9999; //不产生分页
}

protected function buildDataList()
protected function buildDataList($where = [], $sortOrder = '', $page = 1, &$total = -1)
{
$table = $this->table;

$data = [];

$reflectionClass = null;

$contrl = null;
Expand Down Expand Up @@ -208,22 +206,7 @@ protected function buildDataList()
$this->dataModel->destroy(array_values($delIds));
}

if ($this->isExporting) {
$__ids__ = input('__ids__');
if (!empty($__ids__)) {
$ids = explode(',', $__ids__);
$newd = [];
foreach ($data as $d) {
if (in_array($d['id'], $ids)) {
$newd[] = $d;
}
}
$data = $newd;
}
}

$this->buildTable($data);
$table->data($data);
$total = count($data);

return $data;
}
Expand All @@ -243,7 +226,6 @@ protected function buildTable(&$data = [])
$table->text('action_name', '动作名称')->mapClass([''], 'hidden')->autoPost('', false)->getWrapper()->addStyle('max-width:100px');
$table->switchBtn('action_type', '是权限')->autoPost('', false)->mapClass(['-1'], 'hidden')->getWrapper()->addStyle('max-width:80px');

$table->data($data);
$table->getToolbar()->btnRefresh();
$table->useActionbar(false);
$table->useCheckbox(false);
Expand Down

0 comments on commit f6381b4

Please sign in to comment.