router.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. 'use strict';
  2. module.exports = app => {
  3. const { router, controller } = app;
  4. router.get('/', controller.home.index);
  5. //comm
  6. router.get("/oss/policy", controller.oss.policy);
  7. router.post("/sys/common/upload", controller.sys.common.upload);
  8. //admin
  9. router.post("/admin/login/in", controller.admin.index.login);
  10. router.post("/admin/login/out", controller.admin.index.loginOut);
  11. router.get("/admin/login/captcha/:key", controller.admin.index.captcha);
  12. router.get("/admin/user/list", controller.admin.user.list);
  13. router.delete("/admin/user/delete", controller.admin.user.delete);
  14. router.put("/admin/user/edit", controller.admin.user.edit);
  15. router.put("/admin/user/resetpwd", controller.admin.user.resetpwd);
  16. router.post("/admin/user/add", controller.admin.user.add);
  17. router.get("/admin/user/profile", controller.admin.user.getProfile);
  18. router.get("/admin/user/record", controller.admin.user.getUserRecord);
  19. router.get("/admin/user/recordList", controller.admin.user.getUserRecordList);
  20. router.post("/admin/user/comment", controller.admin.user.commentUserRecord);
  21. router.get("/admin/user/exportXls", controller.admin.user.exportXls);
  22. router.get("/admin/user/exportProfile", controller.admin.user.exportProfileXls);
  23. router.get("/admin/course/list", controller.admin.course.list);
  24. router.delete("/admin/course/delete", controller.admin.course.delete);
  25. router.put("/admin/course/edit", controller.admin.course.edit);
  26. router.post("/admin/course/add", controller.admin.course.add);
  27. router.get("/admin/course/exportXls", controller.admin.course.exportXls);
  28. router.post("/admin/course/lock", controller.admin.course.lock);
  29. router.get("/admin/record/list", controller.admin.record.list);
  30. router.get("/admin/user/teacher", controller.admin.user.teachers);
  31. router.get("/admin/record/detail", controller.admin.record.detail);
  32. router.delete("/admin/record/delete", controller.admin.record.delete);
  33. router.get("/admin/record/exportXls", controller.admin.record.exportXls);
  34. router.get("/admin/record/detail/exportXls", controller.admin.record.itemExportXls);
  35. router.get("/admin/logs/list", controller.admin.logs.listNormal);
  36. router.get("/admin/logs/flyPosture", controller.admin.logs.listFlyPosture);
  37. router.get("/admin/logs/message", controller.admin.logs.listMessage);
  38. router.get("/admin/logs/exportXls", controller.admin.logs.exportXls);
  39. router.get("/admin/duplicate/check",controller.admin.index.duplicateCheck);
  40. router.get("/admin/server/state",controller.sys.device.getServerState);
  41. router.post("/admin/server/shutdown",controller.sys.device.shutdownServer);
  42. router.post("/admin/server/start",controller.sys.device.startServer);
  43. router.post("/admin/server/restart",controller.sys.device.restartServer);
  44. //查看服务器状态
  45. router.get("/admin/device/mysql",controller.sys.device.mysql);
  46. router.get("/admin/device/train",controller.sys.device.getServerState);
  47. // router.get("/sys/user/list", controller.sys.user.list);
  48. // router.delete("/sys/user/delete", controller.sys.user.delete);
  49. // router.put("/sys/user/edit", controller.sys.user.edit);
  50. // router.put("/sys/user/changePassword", controller.sys.user.resetpwd);
  51. // router.post("/sys/user/add", controller.sys.user.add);
  52. // router.get("/sys/user/queryUserRole", controller.sys.user.queryUserRole);
  53. // router.put("/sys/user/frozenBatch", controller.sys.user.frozenBatch);
  54. router.get("/sys/user/checkOnlyUser", controller.sys.user.checkOnlyUser);
  55. // router.get("/sys/role/queryall", controller.sys.perm.queryallrole);
  56. // router.get("/sys/role/list", controller.sys.user.roleList);
  57. // router.post("/sys/role/add", controller.sys.user.addRole);
  58. // router.put("/sys/role/edit", controller.sys.user.editRole);
  59. // router.delete("/sys/role/delete", controller.sys.user.deleteRole);
  60. // router.get("/sys/role/queryTreeList", controller.sys.user.queryTreeList);
  61. // router.post("/sys/permission/saveRolePermission", controller.sys.user.saveRolePermission);
  62. // router.get("/sys/permission/queryRolePermission", controller.sys.user.queryRolePermission);
  63. // router.get("/sys/permission/queryTreeList", controller.sys.user.queryTreeList);
  64. // router.post("/sys/permission/add", controller.sys.perm.add);
  65. // router.get("/sys/permission/list", controller.sys.perm.list);
  66. // router.delete("/sys/permission/delete",controller.sys.perm.delete);
  67. // router.put("/sys/permission/edit", controller.sys.perm.edit);
  68. // router.delete("/sys/permission/deleteBatch", controller.sys.perm.deleteBatch);
  69. router.get("/sys/permission/getUserPermissionByToken", controller.sys.perm.getUserPermissionByToken);
  70. router.get("/sys/user/userRoleList", controller.sys.user.userRoleList);
  71. router.post("/sys/user/addSysUserRole",controller.sys.user.addSysUserRole);
  72. router.delete("/sys/user/deleteUserRole", controller.sys.user.deleteUserRole);
  73. router.delete("/sys/user/deleteUserRoleBatch", controller.sys.user.deleteUserRoleBatch);
  74. //icon
  75. router.get("/admin/icons/list", controller.admin.icon.list);
  76. router.delete("/admin/icons/delete", controller.admin.icon.delete);
  77. router.put("/admin/icons/edit", controller.admin.icon.edit);
  78. router.post("/admin/icons/add", controller.admin.icon.add);
  79. //weapon
  80. router.get("/admin/weapon/list", controller.admin.weapon.list);
  81. router.delete("/admin/weapon/delete", controller.admin.weapon.delete);
  82. router.put("/admin/weapon/edit", controller.admin.weapon.edit);
  83. router.post("/admin/weapon/add", controller.admin.weapon.add);
  84. router.get("/admin/weapon/exportXls", controller.admin.weapon.exportXls);
  85. //app
  86. router.post("/app/login/in", controller.app.user.loginPassword);
  87. router.get("/app/course/list", controller.app.course.list);
  88. router.post("/app/course/add", controller.app.course.add);
  89. router.post("/app/course/save", controller.app.course.save);
  90. router.post("/app/record/add", controller.app.record.create);
  91. router.post("/app/record/update", controller.app.record.update);
  92. router.post("/app/record/complete", controller.app.record.complete);
  93. router.post("/app/record/addplayback", controller.app.record.addPlayback);
  94. router.get("/app/record/playback", controller.app.record.playbackList);
  95. router.post("/app/message/add", controller.app.message.add);
  96. router.post("/app/logs/add", controller.app.logs.add);
  97. router.post("/app/logs/flyPosture", controller.app.logs.flyPosture);
  98. router.post("/app/logs/flyState", controller.app.logs.flyState);
  99. router.get("/app/icons/list", controller.app.icon.list);
  100. router.get("/app/weapon/supportedPlane",controller.app.weapon.supportedPlane);
  101. router.get("/app/weapon/plane",controller.app.weapon.getPlaneInfo);
  102. router.get("/app/screen/info", controller.app.other.bigScreen);
  103. //获取领航配置的线条
  104. router.get("/app/screen/naviLine", controller.app.other.naviConfig);
  105. //获取飞行员的速度和高度曲线
  106. router.get("/app/screen/twoline", controller.app.other.twolines);
  107. //获取飞行员的飞行轨迹
  108. router.get("/app/screen/pilotFlyLine", controller.app.other.pilotFlyLines);
  109. //地图相关
  110. router.get("/app/map/points", controller.app.map.points);
  111. router.get("/app/map/search", controller.app.map.search);
  112. //领航规划图
  113. router.post("/app/map/naviConfig", controller.app.map.updateNaviConfig);
  114. router.get('/*', controller.home.index);
  115. router.post('/*', controller.home.index);
  116. };