admin.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. use Illuminate\Support\Facades\Route;
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Application Routes
  14. |--------------------------------------------------------------------------
  15. |
  16. | Here is where you can register all of the routes for an application.
  17. | It is a breeze. Simply tell Lumen the URIs it should respond to
  18. | and give it the Closure to call when that URI is requested.
  19. |
  20. */
  21. /**
  22. * 公共
  23. */
  24. Route::group([
  25. 'prefix' => 'common'
  26. ], function () {
  27. Route::get('enums', 'CommonController@enums');
  28. Route::get('clear', 'CommonController@clear');
  29. Route::get('test', 'CommonController@test');
  30. });
  31. /**
  32. * 基础模块
  33. */
  34. Route::group([
  35. 'namespace' => 'Base',
  36. 'prefix' => 'base'
  37. ], function () {
  38. //账号密码登录
  39. Route::post('/auth/login', 'AuthController@accountLogin');
  40. //微信小程序登录
  41. Route::post('/auth/mini-program-login', 'AuthController@miniProgramLogin');
  42. //配置文件
  43. Route::post('/settings/configs', 'SettingController@configs');
  44. Route::post('/dicts/configs', 'DictController@configs');
  45. Route::get('/dicts/config', 'DictController@config');
  46. Route::get('/admin/select-options', 'AdminController@selectOptions');
  47. Route::group([
  48. 'middleware' => ['auth:admins', 'auth.role:admin']
  49. // 'middleware' => ['jwt.auth', 'jwt.refresh', 'auth.role:admin']
  50. ], function () {
  51. Route::get('/auth/me', 'AuthController@me');
  52. Route::get('/auth/logout', 'AuthController@logout');
  53. // Route::post('/auth/refresh-token', 'AuthController@refreshToken');
  54. Route::post('/auth/validate-password', 'AuthController@validatePassword');
  55. Route::post('/auth/bind-wechat', 'AuthController@bindWechat');
  56. Route::get('/auth/unbind-wechat', 'AuthController@unbindWechat');
  57. Route::post('/auth/mini-bind-mobile', 'AuthController@miniBindMobile');
  58. Route::post('/auth/update-password', 'AuthController@updatePassword');
  59. Route::post('/auth/update-info', 'AuthController@updateInfo');
  60. Route::post('/auth/mobile/send-validate-code', 'AuthController@sendValidateCode');
  61. Route::post('/auth/mobile', 'AuthController@updateMobile');
  62. //日志记录
  63. Route::get('/logs', 'LogController@index');
  64. Route::get('/log', 'LogController@show');
  65. //岗位管理
  66. Route::get('/jobs', 'JobController@index');
  67. Route::post('/job', 'JobController@store');
  68. Route::get('/job', 'JobController@show');
  69. Route::put('/job', 'JobController@update');
  70. Route::delete('/job', 'JobController@destroy');
  71. Route::get('/job/select-options', 'JobController@selectOptions');
  72. //字典管理
  73. Route::get('/dicts', 'DictController@index');
  74. Route::post('/dict', 'DictController@store');
  75. Route::get('/dict', 'DictController@show');
  76. Route::put('/dict', 'DictController@update');
  77. Route::delete('/dict', 'DictController@destroy');
  78. Route::get('/dict-details', 'DictDetailController@index');
  79. Route::post('/dict-detail', 'DictDetailController@store');
  80. Route::get('/dict-detail', 'DictController@show');
  81. Route::put('/dict-detail', 'DictDetailController@update');
  82. Route::delete('/dict-detail', 'DictDetailController@destroy');
  83. //配置管理
  84. Route::get('/settings', 'SettingController@index');
  85. Route::post('/setting', 'SettingController@store');
  86. Route::get('/setting', 'SettingController@show');
  87. Route::put('/setting', 'SettingController@update');
  88. Route::delete('/setting', 'SettingController@destroy');
  89. Route::post('/setting/save', 'SettingController@save');
  90. //部门管理
  91. Route::get('/departments', 'DepartmentController@index');
  92. Route::post('/department', 'DepartmentController@store');
  93. Route::get('/department', 'DepartmentController@show');
  94. Route::put('/department', 'DepartmentController@update');
  95. Route::delete('/department', 'DepartmentController@destroy');
  96. Route::get('/department/select-options', 'DepartmentController@selectOptions');
  97. //公司管理
  98. Route::get('/companies', 'CompanyController@index');
  99. Route::post('/company', 'CompanyController@store');
  100. Route::get('/company', 'CompanyController@show');
  101. Route::put('/company', 'CompanyController@update');
  102. Route::delete('/company', 'CompanyController@destroy');
  103. Route::get('/company/select-options', 'CompanyController@selectOptions');
  104. //菜单管理
  105. Route::get('/menus', 'MenuController@index');
  106. Route::post('/menu', 'MenuController@store');
  107. Route::get('/menu', 'MenuController@show');
  108. Route::put('/menu', 'MenuController@update');
  109. Route::delete('/menu', 'MenuController@destroy');
  110. Route::get('/menu/icons', 'MenuController@icons');
  111. Route::get('/menu/my-menus', 'MenuController@myMenus');
  112. //角色管理
  113. Route::get('/roles', 'RoleController@index');
  114. Route::post('/role', 'RoleController@store');
  115. Route::get('/role', 'RoleController@show');
  116. Route::put('/role', 'RoleController@update');
  117. Route::delete('/role', 'RoleController@destroy');
  118. Route::post('/role/save-menus', 'RoleController@saveMenusPermissions');
  119. Route::post('/role/save-data-permissions', 'RoleController@saveDataPermissions');
  120. Route::post('/role/save-apis-permissions', 'RoleController@saveApisPermissions');
  121. Route::get('/role/permissions', 'RoleController@getRolePermissions');
  122. Route::get('/role/select-options', 'RoleController@selectOptions');
  123. //API权限列表
  124. Route::get('/permissions', 'PermissionController@index');
  125. //资源管理
  126. Route::post('/resource/upload', 'ResourceController@upload');
  127. Route::post('/resource/download', 'ResourceController@download');
  128. Route::post('/resource/base64-to-img', 'ResourceController@base64ToImg');
  129. //管理员管理
  130. Route::get('/admins', 'AdminController@index');
  131. Route::post('/admin', 'AdminController@store');
  132. Route::get('/admin', 'AdminController@show');
  133. Route::put('/admin', 'AdminController@update');
  134. Route::delete('/admin', 'AdminController@destroy');
  135. Route::post('/admin/batch-delete', 'AdminController@batchDelete');
  136. Route::post('/admin/reset-password', 'AdminController@resetPassword');
  137. //站内信
  138. Route::get('/messages', 'MessageController@index');
  139. Route::post('/message', 'MessageController@store');
  140. Route::get('/message', 'MessageController@show');
  141. Route::put('/message', 'MessageController@update');
  142. Route::delete('/message', 'MessageController@destroy');
  143. Route::get('/message/me', 'UserMessageController@meMessage');
  144. Route::get('/message/read-all', 'UserMessageController@readAllMessages');
  145. Route::get('/message/read', 'UserMessageController@readMessage');
  146. Route::get('/message/info', 'UserMessageController@show');
  147. //任务管理
  148. Route::get('/tasks', 'TaskController@index');
  149. //用户管理
  150. Route::get('/users', 'UserController@index');
  151. // Route::get('/user', 'UserController@show');
  152. // Route::put('/user', 'UserController@update');
  153. // Route::delete('/user', 'UserController@destroy');
  154. //小程序轮播图
  155. Route::get('/banners', 'BannerController@index');
  156. Route::post('/banner', 'BannerController@store');
  157. Route::get('/banner', 'BannerController@show');
  158. Route::put('/banner', 'BannerController@update');
  159. Route::delete('/banner', 'BannerController@destroy');
  160. //Route::post('/banner', 'BannerController@upload');
  161. //事项来源
  162. Route::get('/sourceMatters', 'SourceMattersController@index');
  163. Route::post('/sourceMatter', 'SourceMattersController@store');
  164. Route::get('/sourceMatter', 'SourceMattersController@show');
  165. Route::put('/sourceMatter', 'SourceMattersController@update');
  166. Route::delete('/sourceMatter', 'SourceMattersController@destroy');
  167. Route::get('/sourceMatter/select-options', 'SourceMattersController@selectOptions');
  168. });
  169. });
  170. /**
  171. * 新闻公告
  172. */
  173. Route::group([
  174. 'prefix' => 'info',
  175. 'namespace' => 'Info',
  176. 'middleware' => ['auth:admins', 'auth.role:admin']
  177. ], function () {
  178. //新闻管理
  179. Route::get('/news', 'NewsController@index');
  180. Route::post('/new', 'NewsController@store');
  181. Route::get('/new', 'NewsController@show');
  182. Route::put('/new', 'NewsController@update');
  183. Route::delete('/new', 'NewsController@destroy');
  184. //通知公告
  185. Route::get('/notices', 'NoticeController@index');
  186. Route::post('/notice', 'NoticeController@store');
  187. Route::get('/notice', 'NoticeController@show');
  188. Route::put('/notice', 'NoticeController@update');
  189. Route::delete('/notice', 'NoticeController@destroy');
  190. Route::post('/keyword', 'SearchHistoryController@store');
  191. Route::get('/keywords', 'SearchHistoryController@history');
  192. Route::delete('/keyword', 'SearchHistoryController@destroy');
  193. //资讯类型
  194. Route::get('/info_types', 'InformationTypeController@index');
  195. Route::post('/info_type', 'InformationTypeController@store');
  196. Route::get('/info_type', 'InformationTypeController@show');
  197. Route::put('/info_type', 'InformationTypeController@update');
  198. Route::delete('/info_type', 'InformationTypeController@destroy');
  199. //资讯内容
  200. Route::get('/infos', 'InformationController@index');
  201. Route::post('/info', 'InformationController@store');
  202. Route::get('/info', 'InformationController@show');
  203. Route::put('/info', 'InformationController@update');
  204. Route::delete('/info', 'InformationController@destroy');
  205. //投诉内容
  206. Route::get('/complaints', 'ComplaintController@index');
  207. Route::get('/complaint', 'ComplaintController@show');
  208. Route::put('/complaint', 'ComplaintController@update');
  209. Route::delete('/complaint', 'ComplaintController@destroy');
  210. //投诉
  211. Route::get('/complaint_messages', 'ComplaintMessageController@index');
  212. Route::get('/complaint_message', 'ComplaintMessageController@show');
  213. //员工端消息通知
  214. Route::get('/messages-admin', 'ComplaintController@messagesAdmin');
  215. Route::get('/message-admin', 'ComplaintController@messageAdmin');
  216. //用户投诉数量查询
  217. Route::get('/nums', 'ComplaintController@complaintNums');
  218. //首页数据
  219. Route::get('/home', 'HomeController@home');
  220. });
  221. /**
  222. * 审核模块
  223. */
  224. Route::group([
  225. 'prefix' => 'check',
  226. 'namespace' => 'Check',
  227. 'middleware' => ['auth:admins', 'auth.role:admin']
  228. ], function () {
  229. //审核流程管理管理
  230. Route::get('/flows', 'FlowController@index');
  231. Route::post('/flow', 'FlowController@store');
  232. Route::get('/flow', 'FlowController@show');
  233. Route::put('/flow', 'FlowController@update');
  234. Route::delete('/flow', 'FlowController@destroy');
  235. Route::post('/flow/save-nodes', 'NodeController@saveNodes');
  236. Route::get('/flow/nodes', 'NodeController@nodes');
  237. Route::post('/apply/check', 'ApplyController@check');
  238. Route::post('/apply/batch-check', 'ApplyController@batchCheck');
  239. Route::post('/apply/progress', 'ApplyController@progress');
  240. Route::get('/applies', 'ApplyController@index');
  241. });
  242. /**
  243. * AI学车-学员档案管理
  244. */
  245. Route::post('/car/order/sign-up', 'Car\OrderController@signUp');
  246. Route::get('/car/grade', 'Car\GradeController@show');
  247. Route::get('/car/grade/select-options', 'Car\GradeController@selectOptions');
  248. Route::get('/car/shop/down-code', 'Car\ShopController@downShopCode');
  249. Route::get('/car/shop', 'Car\ShopController@show');
  250. //Route::post('/car/order/export', 'Car\OrderController@export');
  251. //Route::post('/car/bill/export', 'Car\BillController@export');
  252. Route::group([
  253. 'prefix' => 'car',
  254. 'namespace' => 'Car',
  255. 'middleware' => ['auth:admins', 'auth.role:admin']
  256. ], function () {
  257. //班型管理
  258. Route::get('/grades', 'GradeController@index');
  259. Route::post('/grade', 'GradeController@store');
  260. // Route::get('/grade', 'GradeController@show');
  261. Route::put('/grade', 'GradeController@update');
  262. Route::delete('/grade', 'GradeController@destroy');
  263. // Route::get('/grade/select-options', 'GradeController@selectOptions');
  264. //门店管理
  265. Route::get('/shops', 'ShopController@index');
  266. Route::post('/shop', 'ShopController@store');
  267. Route::put('/shop', 'ShopController@update');
  268. Route::delete('/shop', 'ShopController@destroy');
  269. Route::get('/shop/select-options', 'ShopController@selectOptions');
  270. //学员管理
  271. Route::get('/orders', 'OrderController@index');
  272. Route::post('/order', 'OrderController@store');
  273. Route::get('/order', 'OrderController@show');
  274. Route::put('/order', 'OrderController@update');
  275. Route::post('/order/change-status', 'OrderController@changeStatus');
  276. Route::delete('/order', 'OrderController@destroy');
  277. Route::post('/order/money-lists', 'OrderController@moneyLists');
  278. Route::get('/order/select-options', 'OrderController@selectOptions');
  279. Route::get('/order/export-fields', 'OrderController@exportFields');
  280. // Route::get('/order/export', 'OrderController@export');
  281. Route::post('/order/export', 'OrderController@export');
  282. Route::post('/bill/export', 'BillController@export');
  283. Route::get('/order/logs', 'OrderLogController@index');
  284. Route::get('/order/log', 'OrderLogController@show');
  285. //财务管理
  286. Route::get('/bills', 'BillController@index');
  287. Route::post('/bill', 'BillController@store');
  288. Route::get('/bill', 'BillController@show');
  289. Route::put('/bill', 'BillController@update');
  290. Route::delete('/bill', 'BillController@destroy');
  291. Route::post('/bill/batch-check', 'BillController@batchCheck');
  292. Route::post('/bill/batch-give', 'BillController@batchGive');
  293. Route::get('/bill/export-fields', 'BillController@exportFields');
  294. Route::get('/applies', 'ApplyMoneyController@index');
  295. Route::post('/apply', 'ApplyMoneyController@store');
  296. Route::get('/apply', 'ApplyMoneyController@show');
  297. Route::put('/apply', 'ApplyMoneyController@update');
  298. Route::delete('/apply', 'ApplyMoneyController@destroy');
  299. Route::post('/apply/check', 'ApplyMoneyController@check');
  300. Route::get('/apply/logs', 'ApplyMoneyLogController@index');
  301. Route::get('/statistics/home', 'StatisticsController@home');
  302. });
  303. /**
  304. * 校报系统
  305. */
  306. Route::group([
  307. 'prefix' => 'manage',
  308. 'namespace' => 'Manage',
  309. 'middleware' => ['auth:admins', 'auth.role:admin']
  310. ], function () {
  311. //导入管理
  312. Route::get('/import/records', 'ImportRecordController@index');
  313. Route::post('/import/record', 'ImportRecordController@store');
  314. Route::get('/import/record', 'ImportRecordController@show');
  315. // Route::put('/import/record', 'ImportRecordController@update');
  316. Route::delete('/import/record', 'ImportRecordController@destroy');
  317. // Route::get('/import/record/select-options', 'ImportRecordController@selectOptions');
  318. Route::post('/import/record/retry-import', 'ImportRecordController@retryImport');
  319. Route::get('/import/record/template-select-options', 'ImportRecordController@importTemplateSelectOptions');
  320. // Route::post('/import/record/merge', 'ImportRecordController@merge');
  321. // Route::post('/import/record/cancel-merge', 'ImportRecordController@cancelMerge');
  322. //预处理信息管理
  323. Route::get('/import/messages', 'PreMessageController@index');
  324. Route::post('/import/message', 'PreMessageController@store');
  325. Route::get('/import/message', 'PreMessageController@show');
  326. Route::put('/import/message', 'PreMessageController@update');
  327. Route::delete('/import/message', 'PreMessageController@destroy');
  328. Route::post('/import/message/batch-delete', 'PreMessageController@batchDelete');
  329. Route::post('/import/message/split-message', 'PreMessageController@splitMessage');
  330. Route::post('/import/message/merge-message', 'PreMessageController@mergeMessage');
  331. Route::post('/import/message/batch-check', 'PreMessageController@batchCheck');
  332. Route::post('/import/message/down', 'PreMessageController@down');
  333. Route::get('/import/message/search-histories', 'SearchHistoryController@myHistory');
  334. Route::post('/import/message/search-history', 'SearchHistoryController@store');
  335. Route::delete('/import/message/search-history', 'SearchHistoryController@destroy');
  336. //分类管理
  337. Route::get('/categories', 'CategoryController@index');
  338. Route::get('/category/tree', 'CategoryController@tree');
  339. Route::post('/category', 'CategoryController@store');
  340. Route::get('/category', 'CategoryController@show');
  341. Route::put('/category', 'CategoryController@update');
  342. Route::delete('/category', 'CategoryController@destroy');
  343. Route::get('/category/select-options', 'CategoryController@selectOptions');
  344. //任务管理
  345. Route::get('/tasks', 'TaskController@index');
  346. Route::post('/task', 'TaskController@store');
  347. Route::get('/task', 'TaskController@show');
  348. Route::put('/task', 'TaskController@update');
  349. Route::delete('/task', 'TaskController@destroy');
  350. Route::post('/task/retry', 'TaskController@retry');
  351. // Route::post('/task/batch-delete', 'TaskController@batchDelete');
  352. Route::post('/task/merge', 'TaskController@merge');
  353. Route::post('/task/cancel-merge', 'TaskController@cancelMerge');
  354. Route::post('/task/export', 'TaskController@export');
  355. //指挥交办
  356. Route::get('/messages', 'MessageController@index');
  357. Route::post('/message', 'MessageController@store');
  358. Route::get('/message', 'MessageController@show');
  359. Route::put('/message', 'MessageController@update');
  360. Route::delete('/message', 'MessageController@destroy');
  361. Route::post('/message/batch-delete', 'MessageController@batchDelete');
  362. // Route::post('/message/batch-allot', 'MessageController@batchAllot');
  363. // Route::post('/message/allot', 'MessageController@allot');
  364. // Route::post('/message/transfer', 'MessageController@transfer');
  365. // Route::post('/message/batch-transfer', 'MessageController@batchTransfer');
  366. Route::post('/message/accept', 'MessageController@accept');
  367. Route::post('/message/batch-accept', 'MessageController@batchAccept');
  368. Route::post('/message/finish', 'MessageController@finish');
  369. Route::post('/message/batch-finish', 'MessageController@batchFinish');
  370. Route::post('/message/application-multi-department', 'MessageController@applicationMultiDepartment');
  371. Route::post('/message/check-application-multi-department', 'MessageController@checkApplicationMultiDepartment');
  372. Route::get('/message/similar-people', 'MessageController@similarPeople');
  373. Route::get('/message/similar-address', 'MessageController@similarAddress');
  374. Route::get('/message/similar-type', 'MessageController@similarType');
  375. Route::post('/message/export-similar-people', 'MessageController@exportSimilarPeople');
  376. Route::post('/message/export-similar-address', 'MessageController@exportSimilarAddress');
  377. Route::post('/message/export-similar-type', 'MessageController@exportSimilarType');
  378. Route::post('/message/export-similar-message', 'MessageController@exportMessage');
  379. Route::get('/message/similar', 'MessageController@similar');
  380. Route::post('/message/similar-remove', 'MessageController@removeSimilar');
  381. Route::post('/message/similar-check', 'MessageController@checkSimilar');
  382. Route::get('/message-nums', 'MessageController@nums');
  383. //统计分析
  384. Route::get('/statistics', 'StatisticsController@statistics');
  385. // Route::get('/statistics-down', 'StatisticsController@down');
  386. });
  387. Route::group([
  388. 'prefix' => 'manage',
  389. 'namespace' => 'Manage',
  390. ], function () {
  391. Route::get('/statistics-down', 'StatisticsController@down');
  392. Route::get('/statistics/nums', 'StatisticsController@messageNumsStatistics');
  393. Route::get('/statistics/today-nums', 'StatisticsController@todayNumStatistics');
  394. Route::get('/statistics/completion-rate', 'StatisticsController@completionRateStatistics');
  395. Route::get('/statistics/type-statistics', 'StatisticsController@typeStatistics');
  396. Route::get('/statistics/department-nums', 'StatisticsController@departmentStatistics');
  397. Route::get('/statistics/address-nums', 'StatisticsController@addressStatistics');
  398. Route::get('/statistics/examines', 'ExamineController@index');
  399. });
  400. /**
  401. * 公共
  402. */
  403. Route::group([
  404. 'prefix' => 'common',
  405. 'namespace' => 'Common',
  406. 'middleware' => ['auth:admins', 'auth.role:admin']
  407. ], function () {
  408. //档案管理
  409. Route::get('/archives', 'ArchiveController@index');
  410. Route::post('/archive', 'ArchiveController@store');
  411. Route::get('/archive', 'ArchiveController@show');
  412. Route::put('/archive', 'ArchiveController@update');
  413. Route::delete('/archive', 'ArchiveController@destroy');
  414. });