<template>
    <el-container>
        <el-header>
            <div class="panel_title">厂内清洁
                <div class="backMap" @click="backtoMap">
                    切换地图
                    <el-icon>
                        <Switch />
                    </el-icon>
                </div>
            </div>
        </el-header>
        <el-main class="nopadding">
            <el-container>
                <el-header>
                    <div class="searchWrap">
                        <div style="font-size: 1vh;">
                            车辆总数：<span class="totalNumber">0</span>
                        </div>
                        <div>
                            <el-select v-model="query.cate" placeholder="车辆分类" @change="handleQuery" clearable>
                                <el-option v-for="item in cateOptions" :key="item.id" :label="item.name"
                                    :value="item.id"></el-option>
                            </el-select>
                            <el-select v-model="query.area" placeholder="" style="width:7vw">
                                <el-option v-for="item in options" :key="item.value" :label="item.label"
                                    :value="item.value">
                                </el-option>
                            </el-select>
                            <el-input :input-style="searchInputStyle" style="width:7vw;margin:0 5px" v-model="query.search"
                                placeholder=""></el-input>
                            <el-button @click="handleQuery">查询</el-button>
                        </div>

                    </div>
                </el-header>
                <el-main>
                    <scTable :data="tableData" :apiObj="apiObj" size="large" style="" @row-click="rowClick">
                        <el-table-column prop="index" label="序号"></el-table-column>
                        <el-table-column prop="number" label="车牌号"></el-table-column>
                        <el-table-column prop="name" label="内部管理号牌"></el-table-column>
                        <el-table-column prop="level" label="环保登记编码"></el-table-column>
                        <el-table-column prop="mgroup" label="注册日期"></el-table-column>
                        <el-table-column prop="eqpment" label="车辆识别代号（VIN）"></el-table-column>
                        <el-table-column prop="mgroup" label="发动机号码"></el-table-column>
                        <el-table-column prop="mgroup" label="排放阶段"></el-table-column>
                        <el-table-column prop="mgroup" label="随车清单"></el-table-column>
                        <el-table-column prop="mgroup" label="行驶证"></el-table-column>
                    </scTable>
                </el-main>
            </el-container>
        </el-main>
    </el-container>
</template>
<script>
export default {
    data() {
        return {
            query: {},
            cateOptions: [
                { id: 1, name: '场内运输车辆（白名单）' },
                { id: 2, name: '非路道移动机械' },
                { id: 3, name: '环卫车辆' },
                { id: 4, name: '其他车辆' },
            ],
            apiObj: this.$API.enp.vehicle_access,
            params: { type: 1 },
        }
    },
    methods: {
        handleQuery() {
            this.$refs.table.queryData(this.query);
        }
    }
}
</script>