<template>
    <div class="box">
        <div class="searchBar">
            <el-card class="box-card">
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-row :gutter="1">
                <el-form-item label="查询条件">
                </el-form-item>
                <el-form-item label="类型">
                <el-select v-model="value"  placeholder="请选择">
                <el-option
                    v-for="item in options"
                    :key="item.label"
                    :label="item.label"
                    :value="item.value">
                </el-option>
                </el-select>
                </el-form-item>
                <el-form-item label="风场">
                <el-select v-model="value2"  
                 placeholder="请选择">
                <el-option
                    v-for="item in options2"
                    :key="item.name"
                    :label="item.name"
                    :value="item.id"
                >
                </el-option>
                </el-select>
                </el-form-item>
                <el-form-item label="选择时间：">
                <el-date-picker
                    v-model="timedate"
                    value-format="yyyy-MM-dd"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    format="yyyy-MM-dd"
                >
                </el-date-picker>
                </el-form-item>

                <el-form-item>
                <el-button type="primary" @click="queryApData" :plain="true"
                    >查询</el-button
                >
                </el-form-item>
                <el-form-item>
                <el-button type="primary" @click="toExcel()">导出</el-button>
                </el-form-item>
            </el-row>
            </el-form>
            </el-card>
            <el-table
            id="loadratetable"
            :data="gridData"
            :row-style="{ height: '10px' }" 
            :cell-style="{ textAlign: 'center'}" 
            :header-cell-style="headStyle"
            @sort-change="changeTableSort"
            style="width:100%;margin-top:1%">
            <el-table-column label="利用率排行榜">
            <el-table-column
              type="index"
              width="40">
            </el-table-column>
            <el-table-column
              prop="windturbineid"
              label="名称"
               width="460">
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="daydl2"
              label="实际发电量(万KW)"
               width="460">
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="daylldl"
              label="理论发电量(万KW)"
               width="460">
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayspeed"
              label="风能利用率(%)"
               width="460">
            </el-table-column>
            </el-table-column>        
       </el-table>
        </div>
    </div>
</template>
<script>
    import rankingUtilization from "@assets/js/performanceAnalysis/rankingUtilization";
    export default rankingUtilization;
</script>
<style lang="scss" scoped>
    @import "@assets/css/performanceAnalysis/rankingUtilization.scss";
</style>