<template>
    <zz-table :settings="{ showIndex: true, stripe: true, hideFoot: true }" :cols="cols" :data="mixins_list"> </zz-table>
</template>

<script>
import list from '@utils/list.js';

export default {
    mixins: [list],
    data() {
        return {
            id: '',
            cols: [
                {
                    label: '车牌号',
                    prop: 'fullCarNoStr'
                },
                {
                    label: '车辆类型',
                    prop: 'cardType',
                    format(val) {
                        if (val == 0) {
                            return '临时车';
                        } else if (val == 1) {
                            return 'VIP车';
                        } else if (val == 2) {
                            return '月租车';
                        } else if (val == 3) {
                            return '充值车';
                        } else if (val == 4) {
                            return '时租车';
                        } else if (val == 5) {
                            return '产权车';
                        } else if (val == 6) {
                            return '计次车';
                        } else if (val == 7) {
                            return '贵宾卡';
                        } else if (val == 8) {
                            return '员工卡';
                        } else if (val == 9) {
                            return '大客车';
                        }
                    }
                },
                {
                    label: '颜色',
                    prop: 'cardColor'
                },
                {
                    label: '车型',
                    prop: '2'
                },
                {
                    label: '品牌',
                    prop: '3'
                }
            ],
            mixins_post: 'get'
        };
    },
    methods: {
        getData() {
            this.$http.get('/sc-community/parkingCar/findResidentCar?userId=' + this.$route.query.id).then(({ msg, data, status }) => {
                if (status == 0) {
                    this.mixins_list = data;
                }
            });
        }
    },
    created() {
        this.getData();
    }
};
</script>
