From 37e07942c1f75097489d9c70fad3d2021fa0709a Mon Sep 17 00:00:00 2001 From: xuguoliang <1044748759@qq.com> Date: Fri, 23 Nov 2018 18:26:16 +0800 Subject: [PATCH] filter --- README.md | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 96b8bf0..8fe65ef 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,141 @@ * 后台示例:http://admin.loadata.com 测试账号:demo 测试密码:123456 -* 交流群:953021758 \ No newline at end of file +* 交流群:953021758 + +菜单配置:`config/menu.php` + +```php +return [ + 'menu'=>[ + 'data'=> ['label'=>'主页','items'=>[ + ['icon'=>'glyphicon glyphicon-cog','label' => '主页', + 'items' => [ + ['label' => '主页概览', 'url' => ['/site']] + ] + ] + ] + ], + 'setting'=> ['label'=>'系统设置', 'items'=>[ + ['icon'=>'glyphicon glyphicon-eye-open','label' => '权限管理', + 'items' => [ + ['label' => '用户管理', 'url' => ['/admin/user']], + ['label' => '角色管理', 'url' => ['/admin/roles']], + ['label' => '权限列表', 'url' => ['/admin/permission']], + ['label' => '路由列表', 'url' => ['/admin/route']], + ['label' => '规则列表', 'url' => ['/admin/rule']] + ] + ], + ['icon'=>'glyphicon glyphicon-user','label' => '个人中心', + 'items' => [ + ['label' => '修改密码', 'url' => ['/admin/site/reset-password']], + ] + ] + ] + ] + ] +]; +``` + +权限配置:`config/permission.php` + +```php +return [ + [ + 'label' => 'root 权限', + 'items' => [ + [ + 'label' => 'root', + 'items' => [ + ['url'=>'/*','label'=>Html::tag('b','root',['style'=>'color:red;']),'items' => [ + ['url'=>'/*','label'=>Html::tag('b','root权限',['style'=>'color:red;'])], + ]] + ] + ] + ] + ], + [ + 'label' => '基础权限', + 'items' => [ + [ + 'label' => '基础权限', + 'items' => [ + ['label'=>'后台首页','items' => [ + ['url'=>'/site','label'=>'首页'], + ['url'=>'/site/main','label'=>'首页-关键报表'], + ['url'=>'/filter','label'=>'筛选'], + ]] + ] + ] + ] + ], + [ + 'label' => '系统设置', + 'items' => [ + [ + 'label' => '权限管理', + 'items' => [ + [ + 'label' => '用户管理', + 'items' => [ + ['url'=>'/admin/user','label'=>'首页'], + ['url'=>'/admin/user/create','label'=>'新增用户'], + ['url'=>'/admin/user/view', 'label'=>'用户授权'], + ['url'=>'/admin/user/delete','label'=>'删除用户'], + ['url'=>'/admin/user/update','label'=>'修改用户'], + ['url'=>'/admin/user/change-name','label'=>'快捷修改用户名'], + ['url'=>'/admin/user/change-time','label'=>'快捷修改创建时间'], + ] + ], + ['label'=>'角色管理','items' => [ + ['url'=>'/admin/roles','label'=>'首页'], + ['url'=>'/admin/roles/create','label'=>'添加角色'], + ['url'=>'/admin/roles/view', 'label'=>'修改角色权限'], + ['url'=>'/admin/roles/delete','label'=>'删除角色'], + ['url'=>'/admin/roles/update','label'=>'修改角色名'], + ]], + [ + 'label' => '权限组管理', + 'items' => [ + ['url'=>'/admin/permission','label'=>'首页'], + ['url'=>'/admin/permission/create','label'=>'新增权限组'], + ['url'=>'/admin/permission/view', 'label'=>'修改权限组权限'], + ['url'=>'/admin/permission/delete','label'=>'删除权限组'], + ['url'=>'/admin/permission/update','label'=>'修改权限组名称'], + ] + ], + [ + 'label' => '路由管理', + 'items' => [ + ['url'=>'/admin/route','label'=>'首页'], + ['url'=>'/admin/route/delete','label'=>'路由删除'], + ['url'=>'/admin/route/update','label'=>'路由修改'], + ] + ], + [ + 'label' => '规则管理', + 'items' => [ + ['url'=>'/admin/rule','label'=>'首页'], + ['url'=>'/admin/rule/delete','label'=>'删除规则'], + ['url'=>'/admin/rule/update','label'=>'修改规则'], + ['url'=>'/admin/rule/create','label'=>'新增规则'], + ] + ] + ] + ], + [ + 'label' => '个人中心', + 'items' => [ + [ + 'label' => '修改密码', + 'items' => [ + ['url'=>'/site/reset-password','label'=>'首页'] + ] + ] + ] + ] + ] + ] +]; + +``` \ No newline at end of file