<template>
    <el-container>
        <el-header class="panel_title">
            <div class="left-panel">
                厂内清洁
            </div>
            <div class="right-panel">
                <el-button type="primary" @click="backtoMap"> 返回地图 </el-button>
            </div>
        </el-header>
        <el-main class="nopadding">
            <el-container>
                <el-header class="searchWrap">
                    <div class="left-panel">
                        <div style="font-size: 1.8vh;">
                            车辆总数：<span class="totalNumber">{{ count }}</span>
                        </div>
                    </div>
                    <div class="right-panel">
                        <el-select v-model="query.cate__code" 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-input :input-style="searchInputStyle" style="width:7vw;margin:0 5px" v-model="query.search"
                            placeholder=""></el-input>
                        <el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
                    </div>
                </el-header>
                <el-main>
                    <scTable ref="table" :data="tableData" :apiObj="apiObj" :params="params" :query="query" size="large" style=""
                        @row-click="rowClick">
                        <el-table-column type="index" width="50" />
                        <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 {
            count: 0,
            query: {},
            params: { type: 30, tags: 'carwash' },
            cateOptions: [
                { id: 'inner_car', name: '场内运输车辆' },
                { id: 'inner_car2', name: '非路道移动机械' },
            ],
            apiObj: this.$API.em.equipment.list,

        }
    },
    methods: {
        handleQuery() {
            this.$refs.table.queryData(this.query);
        },
        backtoMap() {
            this.$emit('close')
        },
    }
}
</script>