<template>
    <div class='compute-item'>
        <div class='compute-table'>
            <el-table
                :border='true'
                v-if='table2.length>=0'
                v-loading='loading'
                :data='table2'
                style='width: 100%'
                :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
            >
                <el-table-column type='index' label='序号' width='50' :index='indexMethod'></el-table-column>
                <el-table-column prop='a' label='抽屉编号' :show-overflow-tooltip='true' resizable>
                    <template slot-scope='{row}'>{{row.drawernum||'--'}}</template>
                </el-table-column>
                <el-table-column prop='a' label='出线规格' :show-overflow-tooltip='true'>
                    <template slot-scope='{row}'>{{row.outspec||'--'}}</template>
                </el-table-column>
                <el-table-column prop='a' label='楼层' :show-overflow-tooltip='true'>
                    <template slot-scope='{row}'>{{row.floor||'--'}}</template>
                </el-table-column>
                <el-table-column prop='a' label='电井编号' :show-overflow-tooltip='true'>
                    <template slot-scope='{row}'>{{row.wellnum||'--'}}</template>
                </el-table-column>
                <el-table-column prop='brand' label='电箱编号' :show-overflow-tooltip='true'>
                    <template slot-scope='{row}'>{{row.boxnum||'--'}}</template>
                </el-table-column>
                <el-table-column prop='brand' label='供电容量（kw）' :show-overflow-tooltip='true'>
                    <template slot-scope='{row}'>{{row.capacitynum||'--'}}</template>
                </el-table-column>
                <el-table-column prop='brand' label='控制回路' :show-overflow-tooltip='true'>
                    <template slot-scope='{row}'>{{row.control||'--'}}</template>
                </el-table-column>
            </el-table>
        </div>
        <div class='foot'>
            <el-pagination
                background
                layout='prev, pager, next'
                :total='total'
                :page-size='size'
                @prev-click='pageChanged'
                @next-click='pageChanged'
                @current-change='pageChanged'
            ></el-pagination>
        </div>
    </div>
</template>
<script>
import { Select } from 'meri-design'
// import Select from '@/components/Select/Select.vue'
import { mapGetters } from 'vuex'
export default {
    props: ['table2', 'total', 'page', 'size', 'loading'],
    data() {
        return {
            dataSelect2: [
                { id: 'test1', name: '选择项' },
                { id: 'test2', name: '单平米' },
                { id: 'test3', name: '下级分项' },
                { id: 'test4', name: '滑动平均滑动平均' }
            ],
            searVal: ''
        }
    },
    computed: {
        ...mapGetters(['floorSelect'])
    },
    components: { Select },
    methods: {
        indexMethod(index) {
            return (this.page - 1) * this.size + index + 1
        },
        pageChanged(page) {
            this.$emit('Index1Emit', page)
        }
    },
    mounted() {}
}
</script>
<style lang="less" scoped>
</style>
<style lang="less">
.compute-item {
    .compute-center {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
    }
    .foot {
        height: 32px;
        display: flex;
        justify-content: flex-end;
        margin-top: 28px;
    }
}
</style>