routes.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. // 行驶性能
  2. const getDrivingRoutes = () => {
  3. const routes = [
  4. 'operationalStability',
  5. 'ride',
  6. 'brakingPerformance',
  7. 'slide',
  8. 'swerve',
  9. 'CenterOfMass',
  10. ];
  11. return routes.map((item) => ({
  12. path: `/drivingPerformance/${item}/detail/:id`,
  13. name: '数据详情',
  14. access: 'drivingPerformance',
  15. component: './DrivingPerformance/Detail',
  16. hideInMenu: true,
  17. }));
  18. };
  19. const getDrivingCompareRoutes = () => {
  20. const routes = [
  21. 'operationalStability',
  22. 'ride',
  23. 'brakingPerformance',
  24. 'slide',
  25. 'swerve',
  26. 'CenterOfMass',
  27. ];
  28. return routes.map((item) => ({
  29. path: `/drivingPerformance/${item}/dataComparison/:carParam`,
  30. name: '数据对比',
  31. access: 'drivingPerformance',
  32. component: './DrivingPerformance/DataComparison',
  33. hideInMenu: true,
  34. }));
  35. };
  36. // 零部件
  37. const getComponentRoutes = () => {
  38. const routes = ['bushingData', 'shockAbsorberDebugging', 'tireData', 'springData'];
  39. return routes.map((item) => ({
  40. path: `/component/${item}/detail/:id`,
  41. name: '数据详情',
  42. access: 'component',
  43. component: './Component/Detail',
  44. hideInMenu: true,
  45. }));
  46. };
  47. const getComponentCompareRoutes = () => {
  48. const routes = ['bushingData', 'shockAbsorberDebugging', 'tireData', 'springData'];
  49. return routes.map((item) => ({
  50. path: `/component/${item}/dataComparison/:carParam`,
  51. name: '数据对比',
  52. access: 'component',
  53. component: './Component/DataComparison',
  54. hideInMenu: true,
  55. }));
  56. };
  57. // 主观评价
  58. const getSubjectiveRoutes = () => {
  59. const routes = [
  60. 'commercialDrivSubAssessment',
  61. 'passengerDrivSubAssessment',
  62. 'passengerComSubAssessment',
  63. 'trucksComSubAssessment',
  64. 'CoachComSubAssessment',
  65. 'NVHSubAssessment',
  66. ];
  67. return routes.map((item) => ({
  68. path: `/subjectiveAssessment/${item}/detail/:carParam`,
  69. name: '数据详情',
  70. access: 'subjectiveAssessment',
  71. component: './SubjectiveAssessment/Detail',
  72. hideInMenu: true,
  73. }));
  74. };
  75. const getSubjectiveCompareRoutes = () => {
  76. const routes = [
  77. 'commercialDrivSubAssessment',
  78. 'passengerDrivSubAssessment',
  79. 'passengerComSubAssessment',
  80. 'trucksComSubAssessment',
  81. 'CoachComSubAssessment',
  82. 'NVHSubAssessment',
  83. ];
  84. return routes.map((item) => ({
  85. path: `/subjectiveAssessment/${item}/dataComparison/:carParam`,
  86. name: '数据对比',
  87. access: 'subjectiveAssessment',
  88. component: './SubjectiveAssessment/DataComparison',
  89. hideInMenu: true,
  90. }));
  91. };
  92. /*
  93. * @description: Toto
  94. * @author: zx
  95. */
  96. export default [
  97. {
  98. path: '/user',
  99. layout: false,
  100. routes: [
  101. { name: '登录', path: '/user/login', component: './user/Login' },
  102. { component: './404' },
  103. ],
  104. },
  105. {
  106. name: '首页',
  107. path: '/welcome',
  108. hideInMenu: true,
  109. routes: [
  110. { path: '/welcome', component: './WelcomeNew' },
  111. {
  112. name: '个人中心',
  113. path: '/welcome/userCenter',
  114. component: './user/Center',
  115. hideInMenu: true,
  116. },
  117. {
  118. name: '上传中心',
  119. path: '/welcome/uploadCenter',
  120. component: './UploadCenter',
  121. },
  122. {
  123. path: '/welcome/userManagement',
  124. name: '用户管理',
  125. component: './SystemSettings/UserManagement',
  126. },
  127. {
  128. path: '/welcome/ModuleManagement',
  129. name: '模板管理',
  130. component: './SystemSettings/ModuleManagement',
  131. },
  132. ],
  133. },
  134. {
  135. name: '车辆信息',
  136. path: '/vehicleInfo',
  137. access: 'isRight',
  138. routes: [
  139. { path: '/vehicleInfo', redirect: '/vehicleInfo/dataQuery' },
  140. {
  141. path: '/vehicleInfo/dataQuery',
  142. name: '数据查询',
  143. access: 'vehicleInfo',
  144. component: './VehicleInfo/DataQuery',
  145. },
  146. {
  147. path: '/vehicleInfo/dataQuery/detail/:id',
  148. name: '数据详情',
  149. access: 'vehicleInfo',
  150. component: './VehicleInfo/Detail',
  151. hideInMenu: true,
  152. },
  153. {
  154. path: '/vehicleInfo/dataQuery/dataComparison/:carParam',
  155. name: '数据对比',
  156. access: 'vehicleInfo',
  157. component: './VehicleInfo/DataComparison',
  158. hideInMenu: true,
  159. },
  160. // {
  161. // path: '/vehicleInfo/dataStatistics',
  162. // name: '数据统计',
  163. // access: 'vehicleInfo',
  164. // component: './VehicleInfo/DataStatistics',
  165. // },
  166. { component: './404' },
  167. ],
  168. },
  169. {
  170. path: '/NVH',
  171. name: 'NVH',
  172. // icon: '/icons/Frame.png',
  173. access: 'isRight',
  174. routes: [
  175. { path: '/NVH', redirect: '/NVH/dataQuery' },
  176. {
  177. path: '/NVH/dataQuery',
  178. name: '数据查询',
  179. access: 'NVH',
  180. component: './NVH/DataQuery',
  181. },
  182. {
  183. path: '/NVH/dataImport/detail/:id',
  184. name: '查看数据',
  185. access: 'NVH',
  186. component: './NVH/DataImportDetail',
  187. hideInMenu: true,
  188. },
  189. {
  190. path: '/NVH/dataQuery/dataComparison/:carParam',
  191. name: '数据对比',
  192. access: 'NVH',
  193. component: './NVH/DataComparisonQuery',
  194. hideInMenu: true,
  195. },
  196. // {
  197. // path: '/NVH/dataStatistics',
  198. // name: '数据统计',
  199. // access: 'NVH',
  200. // component: './NVH/DataStatistics',
  201. // },
  202. {
  203. path: '/NVH/dataQuery/detail/:id',
  204. name: '数据详情',
  205. access: 'NVH',
  206. component: './NVH/Detail',
  207. hideInMenu: true,
  208. },
  209. { component: './404' },
  210. ],
  211. },
  212. {
  213. path: '/K&C',
  214. name: 'K&C',
  215. // icon: '/icons/Frame.png',
  216. access: 'isRight',
  217. routes: [
  218. { path: '/K&C', redirect: '/K&C/dataQuery' },
  219. {
  220. path: '/K&C/dataQuery',
  221. name: '数据查询',
  222. access: 'K&C',
  223. component: './K&C/DataQuery',
  224. },
  225. {
  226. path: '/K&C/dataQuery/dataComparison/:carParam',
  227. name: '数据对比',
  228. access: 'K&C',
  229. component: './K&C/DataComparison',
  230. hideInMenu: true,
  231. },
  232. // {
  233. // path: '/K&C/dataStatistics',
  234. // name: '数据统计',
  235. // access: 'K&C',
  236. // component: './K&C/DataStatistics',
  237. // },
  238. {
  239. path: '/K&C/dataQuery/detail/:id',
  240. name: '数据详情',
  241. access: 'K&C',
  242. component: './K&C/Detail',
  243. hideInMenu: true,
  244. },
  245. // {
  246. // path: '/K&C/systemSettings',
  247. // name: '系统设置',
  248. // access: 'K&C',
  249. // component: './K&C/SystemSettings',
  250. // },
  251. { component: './404' },
  252. ],
  253. },
  254. {
  255. path: '/drivingPerformance',
  256. name: '行驶性能',
  257. // icon: '/icons/Frame.png',
  258. access: 'isRight',
  259. routes: [
  260. {
  261. path: '/drivingPerformance',
  262. redirect: '/drivingPerformance/operationalStability',
  263. },
  264. {
  265. path: '/drivingPerformance/operationalStability',
  266. name: '操纵稳定性',
  267. access: 'drivingPerformance',
  268. component: './DrivingPerformance/OperationalStability',
  269. },
  270. {
  271. path: `/drivingPerformance/operationalStability/resultDetail/:id`,
  272. name: '数据详情',
  273. access: 'drivingPerformance',
  274. component: './DrivingPerformance/Detail/OperationalStabilityT/ResultDetail',
  275. hideInMenu: true,
  276. },
  277. // {
  278. // path: '/NVH/dataQuery/dataComparison/:carParam',
  279. // name: '数据对比',
  280. // access: 'NVH',
  281. // component: './NVH/DataComparisonQuery',
  282. // hideInMenu: true,
  283. // },
  284. {
  285. path: '/drivingPerformance/ride',
  286. name: '平顺性',
  287. access: 'drivingPerformance',
  288. component: './DrivingPerformance/Ride',
  289. },
  290. {
  291. path: `/drivingPerformance/ride/resultDetail/:id`,
  292. name: '数据详情',
  293. access: 'drivingPerformance',
  294. component: './DrivingPerformance/Detail/RideT/ResultDetail',
  295. hideInMenu: true,
  296. },
  297. {
  298. path: '/drivingPerformance/brakingPerformance',
  299. name: '制动性',
  300. access: 'drivingPerformance',
  301. component: './DrivingPerformance/BrakingPerformance',
  302. },
  303. {
  304. path: '/drivingPerformance/slide',
  305. name: '滑行',
  306. access: 'drivingPerformance',
  307. component: './DrivingPerformance/Slide',
  308. },
  309. {
  310. path: '/drivingPerformance/swerve',
  311. name: '转向',
  312. access: 'drivingPerformance',
  313. component: './DrivingPerformance/Swerve',
  314. },
  315. {
  316. path: '/drivingPerformance/CenterOfMass',
  317. name: '质心与转动惯量',
  318. access: 'drivingPerformance',
  319. component: './DrivingPerformance/CenterOfMass',
  320. },
  321. ...getDrivingRoutes(),
  322. ...getDrivingCompareRoutes(),
  323. { component: './404' },
  324. ],
  325. },
  326. {
  327. path: '/component',
  328. name: '零部件',
  329. access: 'isRight',
  330. routes: [
  331. {
  332. path: '/component',
  333. redirect: '/component/shockAbsorberDebugging',
  334. },
  335. {
  336. path: '/component/shockAbsorberDebugging',
  337. name: '减振器数据',
  338. access: 'Component',
  339. component: './Component/ShockAbsorberDebugging',
  340. },
  341. {
  342. path: '/component/springData',
  343. name: '弹簧数据',
  344. access: 'Component',
  345. component: './Component/SpringData',
  346. },
  347. {
  348. path: `/component/springData/resultDetail/:id`,
  349. name: '数据详情',
  350. access: 'Component',
  351. component: './Component/Detail/SpringDataT/ResultDetail',
  352. hideInMenu: true,
  353. },
  354. {
  355. path: '/component/bushingData',
  356. name: '衬套数据',
  357. access: 'component',
  358. component: './Component/BushingData',
  359. },
  360. {
  361. path: '/component/tireData',
  362. name: '轮胎数据',
  363. access: 'Component',
  364. component: './Component/TireData',
  365. },
  366. ...getComponentRoutes(),
  367. ...getComponentCompareRoutes(),
  368. { component: './404' },
  369. ],
  370. },
  371. {
  372. path: '/subjectiveAssessment',
  373. name: '主观评价',
  374. access: 'isRight',
  375. routes: [
  376. {
  377. path: '/subjectiveAssessment',
  378. redirect: '/subjectiveAssessment/commercialDrivSubAssessment',
  379. },
  380. {
  381. path: '/subjectiveAssessment/commercialDrivSubAssessment',
  382. name: '商用车行驶性能',
  383. access: 'subjectiveAssessment',
  384. component: './SubjectiveAssessment/CommercialDrivSubAssessment',
  385. },
  386. {
  387. path: '/subjectiveAssessment/passengerDrivSubAssessment',
  388. name: '乘用车行驶性能',
  389. access: 'subjectiveAssessment',
  390. component: './SubjectiveAssessment/PassengerDrivSubAssessment',
  391. },
  392. {
  393. path: '/subjectiveAssessment/passengerComSubAssessment',
  394. name: '乘用车商品性',
  395. access: 'subjectiveAssessment',
  396. component: './SubjectiveAssessment/PassengerComSubAssessment',
  397. },
  398. {
  399. path: '/subjectiveAssessment/trucksComSubAssessment',
  400. name: '货车商品性',
  401. access: 'subjectiveAssessment',
  402. component: './SubjectiveAssessment/TruckComSubAssessment',
  403. },
  404. {
  405. path: '/subjectiveAssessment/CoachComSubAssessment',
  406. name: '客车商品性',
  407. access: 'subjectiveAssessment',
  408. component: './SubjectiveAssessment/CoachComSubAssessment',
  409. },
  410. {
  411. path: '/subjectiveAssessment/NVHSubAssessment',
  412. name: 'NVH性能',
  413. access: 'subjectiveAssessment',
  414. component: './SubjectiveAssessment/NVHSubAssessment',
  415. },
  416. ...getSubjectiveRoutes(),
  417. ...getSubjectiveCompareRoutes(),
  418. { component: './404' },
  419. ],
  420. },
  421. // {
  422. // path: '/systemSettings',
  423. // name: '系统设置',
  424. // access: 'isRight',
  425. // hideinmenu: true,
  426. // routes: [
  427. // { path: '/systemSettings', redirect: '/systemSettings/userManagement' },
  428. // {
  429. // path: '/systemSettings/userManagement',
  430. // name: '用户管理',
  431. // access: 'systemSettings',
  432. // component: './SystemSettings/UserManagement',
  433. // },
  434. // {
  435. // path: '/systemSettings/roleManagement',
  436. // name: '角色管理',
  437. // access: 'systemSettings',
  438. // component: './SystemSettings/RoleManagement',
  439. // },
  440. // // {
  441. // // path: '/systemSettings/menuManagement',
  442. // // name: '菜单管理',
  443. // // access: 'systemSettings',
  444. // // component: './SystemSettings/MenuManagement',
  445. // // },
  446. // {
  447. // path: '/systemSettings/departmentManagement',
  448. // name: '部门管理',
  449. // access: 'systemSettings',
  450. // component: './SystemSettings/DepartmentManagement',
  451. // },
  452. // // {
  453. // // path: '/systemSettings/dataTableManagement',
  454. // // name: '数据表管理',
  455. // // access: 'systemSettings',
  456. // // component: './SystemSettings/DataTableManagement',
  457. // // },
  458. // {
  459. // path: '/systemSettings/ModuleManagement',
  460. // name: '模板管理',
  461. // access: 'systemSettings',
  462. // component: './SystemSettings/ModuleManagement',
  463. // },
  464. // // {
  465. // // path: '/systemSettings/OperationManagement',
  466. // // name: '工况管理',
  467. // // access: 'systemSettings',
  468. // // component: './SystemSettings/OperationManagement',
  469. // // },
  470. // // {
  471. // // path: '/systemSettings/PointManagement',
  472. // // name: '测点管理',
  473. // // access: 'systemSettings',
  474. // // component: './SystemSettings/PointManagement',
  475. // // },
  476. // { component: './404' },
  477. // ],
  478. // },
  479. ];