vehicle.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <zz-table :settings="{ showIndex: true, stripe: true, hideFoot: true }" :cols="cols" :data="mixins_list"> </zz-table>
  3. </template>
  4. <script>
  5. import list from '@utils/list.js';
  6. export default {
  7. mixins: [list],
  8. data() {
  9. return {
  10. id: '',
  11. cols: [
  12. {
  13. label: '车牌号',
  14. prop: 'fullCarNoStr'
  15. },
  16. {
  17. label: '车辆类型',
  18. prop: 'cardType',
  19. format(val) {
  20. if (val == 0) {
  21. return '临时车';
  22. } else if (val == 1) {
  23. return 'VIP车';
  24. } else if (val == 2) {
  25. return '月租车';
  26. } else if (val == 3) {
  27. return '充值车';
  28. } else if (val == 4) {
  29. return '时租车';
  30. } else if (val == 5) {
  31. return '产权车';
  32. } else if (val == 6) {
  33. return '计次车';
  34. } else if (val == 7) {
  35. return '贵宾卡';
  36. } else if (val == 8) {
  37. return '员工卡';
  38. } else if (val == 9) {
  39. return '大客车';
  40. }
  41. }
  42. },
  43. {
  44. label: '颜色',
  45. prop: 'cardColor'
  46. },
  47. {
  48. label: '车型',
  49. prop: '2'
  50. },
  51. {
  52. label: '品牌',
  53. prop: '3'
  54. }
  55. ],
  56. mixins_post: 'get'
  57. };
  58. },
  59. methods: {
  60. getData() {
  61. this.$http.get('/sc-community/parkingCar/findResidentCar?userId=' + this.$route.query.id).then(({ msg, data, status }) => {
  62. if (status == 0) {
  63. this.mixins_list = data;
  64. }
  65. });
  66. }
  67. },
  68. created() {
  69. this.getData();
  70. }
  71. };
  72. </script>