route.php 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. $router->group(function () use ($router){
  3. // 角色
  4. $router->resource('roles', '\catchAdmin\permissions\controller\Role');
  5. $router->get('getPartRoles', '\catchAdmin\permissions\controller\Role@getPartRoles');
  6. //判断是否是全部数据权限
  7. $router->get('role/isAllDataRange', '\catchAdmin\permissions\controller\Role@isAllDataRange');
  8. // 角色列表
  9. $router->get('/role/get/permissions', '\catchAdmin\permissions\controller\Role@getPermissions');
  10. // 权限
  11. $router->resource('permissions', '\catchAdmin\permissions\controller\Permission');
  12. $router->put('permissions/show/<id>', '\catchAdmin\permissions\controller\Permission@show');
  13. $router->get('controller/methods/<id>', '\catchAdmin\permissions\controller\Permission@getMethods');
  14. // 部门
  15. $router->resource('departments', '\catchAdmin\permissions\controller\Department');
  16. $router->get('getDepartmentType', '\catchAdmin\permissions\controller\Department@getDepartmentType');
  17. //只到学校部门数据
  18. $router->get('school_departs', '\catchAdmin\permissions\controller\Department@getSchoolDeparts');
  19. //年级、班级数据
  20. $router->get('class_departs', '\catchAdmin\permissions\controller\Department@getClassDeparts');
  21. $router->get('yys_departs', '\catchAdmin\permissions\controller\Department@getYysDeparts');
  22. //只显示有学校的运营商及以下数据
  23. $router->get('departments_has_school', '\catchAdmin\permissions\controller\Department@getDepartsHasSchool');
  24. $router->get('getDepartmentAreaId', '\catchAdmin\permissions\controller\Department@getDepartmentAreaId');
  25. // 所有职位
  26. $router->get('jobs/all', '\catchAdmin\permissions\controller\Job@getAll');
  27. // 岗位
  28. $router->resource('jobs', '\catchAdmin\permissions\controller\Job');
  29. // 用户
  30. $router->resource('users', '\catchAdmin\permissions\controller\User');
  31. // 切换状态
  32. $router->put('users/switch/status/<id>', '\catchAdmin\permissions\controller\User@switchStatus');
  33. $router->put('users/recover/<id>', '\catchAdmin\permissions\controller\User@recover');
  34. $router->put('user/profile', '\catchAdmin\permissions\controller\User@profile');
  35. $router->get('users/get/roles', '\catchAdmin\permissions\controller\User@getRoles');
  36. $router->get('user/info', '\catchAdmin\permissions\controller\User@info');
  37. $router->get('user/export', '\catchAdmin\permissions\controller\User@export');
  38. $router->get('user/getAreaId', '\catchAdmin\permissions\controller\User@getAreaIdBy');
  39. $router->get('users/getUsers/<depart_id>', '\catchAdmin\permissions\controller\User@getUserByDepart');
  40. $router->get('user/getPushUserList', '\catchAdmin\permissions\controller\User@getPushUserList'); // 获取推送用户
  41. // area路由
  42. $router->get('area/getAreaTreeData', '\catchAdmin\permissions\controller\Area@getAreaTreeData');
  43. $router->get('area/getAreaTreeDataByCity/:cityid', '\catchAdmin\permissions\controller\Area@getAreaTreeDataByCity');
  44. $router->resource('area', '\catchAdmin\permissions\controller\Area');
  45. $router->post('area/getDistrictChildrenArea', '\catchAdmin\permissions\controller\Area@getDistrictChildrenArea');
  46. // sysConfig路由
  47. $router->resource('sysConfig', '\catchAdmin\permissions\controller\SysConfig');
  48. // test路由
  49. })->middleware('auth');
  50. // sysConfig路由
  51. $router->group('configs', function () use ($router){
  52. // 获取根据类型分组的配置
  53. $router->get('getListGroupByType', '\catchAdmin\permissions\controller\SysConfig@getListGroupByType');
  54. // 保存所有配置
  55. $router->post('saveAll', '\catchAdmin\permissions\controller\SysConfig@saveAll');
  56. })->middleware('auth');
  57. // department 路由
  58. $router->group('department', function () use ($router){
  59. // 获取根据类型分组的配置
  60. $router->get('getOnlySchoolData', '\catchAdmin\permissions\controller\Department@onlySchoolData');
  61. $router->get('getOnlySchoolOption', '\catchAdmin\permissions\controller\Department@getOnlySchoolOption');
  62. $router->get('getChildrenOption', '\catchAdmin\permissions\controller\Department@getChildrenOption');
  63. })->middleware('auth');
  64. //获取配置值
  65. $router->post('configs/getConfigValueBy','\catchAdmin\permissions\controller\SysConfig@getConfigValueBy');