routes.ts 13 KB

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