You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vehicleType.js 596B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //车辆类型
  2. export const vehicleType = [
  3. {
  4. id: 1,
  5. title: '一型客车'
  6. },
  7. {
  8. id: 2,
  9. title: '二型客车'
  10. },
  11. {
  12. id: 3,
  13. title: '三型客车'
  14. },
  15. {
  16. id: 4,
  17. title: '四型客车'
  18. },
  19. {
  20. id: 11,
  21. title: '一型货车'
  22. },
  23. {
  24. id: 12,
  25. title: '二型货车'
  26. },
  27. {
  28. id: 13,
  29. title: '三型货车'
  30. },
  31. {
  32. id: 14,
  33. title: '四型货车'
  34. },
  35. {
  36. id: 15,
  37. title: '五型货车'
  38. },
  39. {
  40. id: 16,
  41. title: '六型货车'
  42. }
  43. ];
  44. //获取车辆类型
  45. export const getVehicleType = (id) => {
  46. let types = vehicleType.filter(item => item.id == id);
  47. return types[0].title
  48. }