123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- export const vehiclePlateColor = [{
- id: 0,
- color: '蓝色'
- },
- {
- id: 1,
- color: '黄色'
- },
- {
- id: 2,
- color: '黑色'
- },
- {
- id: 3,
- color: '白色'
- },
- {
- id: 4,
- color: '渐变绿色'
- },
- {
- id: 5,
- color: '黄绿双拼色'
- },
- // {
- // id: 6,
- // color: '蓝白渐变色'
- // },
- {
- id: 9,
- color: '未确定'
- },
- {
- id: 11,
- color: '绿色'
- },
- {
- id: 12,
- color: '红色'
- }
- ]
-
-
- export const vehiclePlateColorPai = [{
- id: 0,
- color: '蓝牌',
- showColor: "rgb(56,139,252)",
- style: {
- color: '#FFFFFF',
- background: 'rgb(56,139,252)'
- }
- },
- {
- id: 1,
- color: '黄牌',
- showColor: "rgb(255,156,0)",
- style: {
- color: '#FFFFFF',
- background: 'rgb(255,156,0)'
- }
- },
- {
- id: 2,
- color: '黑牌',
- showColor: "rgb(0,0,0)",
- style: {
- color: '#FFFFFF',
- background: 'rgb(0,0,0)'
- }
- },
- {
- id: 3,
- color: '白牌',
- showColor: "white",
- style: {
- color: '#000000',
- background: 'rgb(255, 255, 255)'
- }
- },
- {
- id: 4,
- color: '渐变绿牌',
- showColor: "rgb(56,139,252)",
- style: {
- color: '#000000',
- background: 'linear-gradient(135deg, #00b09b, #2ec46d, #00b09b)'
- }
- },
- {
- id: 5,
- color: '黄绿双拼牌',
- showColor: "rgb(252,204,1)",
- style: {
- color: '#000000',
- background: 'rgb(255, 255, 255)'
- }
- },
- // {
- // id: 6,
- // color: '蓝白渐变牌',
- // showColor: "rgb(56,139,252)",
- // },
- {
- id: 9,
- color: '未确定',
- showColor: "",
- style: {
- color: '#FFFFFF',
- background: 'rgb(56,139,252)'
- }
- },
- {
- id: 11,
- color: '绿牌',
- showColor: "rgb(26,250,31)",
- style: {
- color: '#000000',
- background: 'rgb(26,250,31)'
- }
- },
- {
- id: 12,
- color: '红牌',
- showColor: "red",
- style: {
- color: '#FFFFFF',
- background: 'red'
- }
- }
- ]
-
- //获取车牌颜色
- export const getVehiclePlateColor = (id) => {
- let colors = vehiclePlateColor.filter(item => item.id == id);
- if (colors) {
- return colors[0] ? colors[0].color : ''
- } else {
- return ''
- }
- }
-
- //获取车牌颜色
- export const getVehiclePlateColorPai = (id = 0) => {
- if (id) {
- id = Number(id)
- let colors = vehiclePlateColorPai.filter(item => item.id == id);
- return colors[0] ? colors[0].color : ''
- } else {
- return "蓝色"
- }
- }
- // 获取车牌展示颜色
- export const getVehiclePlateColorPaiShow = (id = 0) => {
- if (id) {
- id = Number(id)
- let colors = vehiclePlateColorPai.filter(item => item.id == id);
- return colors[0] ? colors[0].showColor : ''
- } else {
- return "rgb(56,139,252)"
- }
- }
-
- export const getVehiclePlateStyle = (id = 0) => {
- if (id) {
- id = Number(id)
- let colors = vehiclePlateColorPai.filter(item => item.id == id);
- return colors[0] ? colors[0].style : {}
- } else {
- return {
- color: '#FFFFFF',
- background: 'rgb(56,139,252)'
- }
- }
- }
|