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.

vehiclePlateColor.js 1.7KB

2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. export const vehiclePlateColor = [{
  2. id: 0,
  3. color: '蓝色'
  4. },
  5. {
  6. id: 1,
  7. color: '黄色'
  8. },
  9. {
  10. id: 2,
  11. color: '黑色'
  12. },
  13. {
  14. id: 3,
  15. color: '白色'
  16. },
  17. {
  18. id: 4,
  19. color: '渐变绿色'
  20. },
  21. {
  22. id: 5,
  23. color: '黄绿双拼色'
  24. },
  25. {
  26. id: 6,
  27. color: '蓝白渐变色'
  28. },
  29. {
  30. id: 9,
  31. color: '未确定'
  32. },
  33. {
  34. id: 11,
  35. color: '绿色'
  36. },
  37. {
  38. id: 12,
  39. color: '红色'
  40. }
  41. ]
  42. //获取车牌颜色
  43. export const getVehiclePlateColor = (id) => {
  44. let colors = vehiclePlateColor.filter(item => item.id == id);
  45. if (colors) {
  46. return colors[0] ? colors[0].color : ''
  47. } else {
  48. return ''
  49. }
  50. }
  51. export const vehiclePlateColorPai = [{
  52. id: 0,
  53. color: '蓝牌',
  54. showColor: "rgb(56,139,252)",
  55. },
  56. {
  57. id: 1,
  58. color: '黄牌',
  59. showColor: "rgb(255,156,0)",
  60. },
  61. {
  62. id: 2,
  63. color: '黑牌',
  64. showColor: "rgb(0,0,0)",
  65. },
  66. {
  67. id: 3,
  68. color: '白牌',
  69. showColor: "white",
  70. },
  71. {
  72. id: 4,
  73. color: '渐变绿牌',
  74. showColor: "rgb(56,139,252)",
  75. },
  76. {
  77. id: 5,
  78. color: '黄绿双拼牌',
  79. showColor: "rgb(252,204,1)",
  80. },
  81. {
  82. id: 6,
  83. color: '蓝白渐变牌',
  84. showColor: "rgb(56,139,252)",
  85. },
  86. {
  87. id: 9,
  88. color: '未确定',
  89. showColor: "",
  90. },
  91. {
  92. id: 11,
  93. color: '绿牌',
  94. showColor: "rgb(26,250,31)",
  95. },
  96. {
  97. id: 12,
  98. color: '红牌',
  99. showColor: "red",
  100. }
  101. ]
  102. //获取车牌颜色
  103. export const getVehiclePlateColorPai = (id = 0) => {
  104. let colors = vehiclePlateColorPai.filter(item => item.id == id);
  105. return colors[0] ? colors[0].color : ''
  106. }
  107. // 获取车牌展示颜色
  108. export const getVehiclePlateColorPaiShow = (id = 0) => {
  109. let colors = vehiclePlateColorPai.filter(item => item.id == id);
  110. return colors[0] ? colors[0].showColor : ''
  111. }