<template>
  <el-container>
    <el-header>
      <el-card style="margin-top: -10px">
        <el-row :gutter="1">
          <el-form :inline="true" class="demo-form-inline">
            <el-form-item label="类型">
              <el-select
                v-model="lx"
                @change="query_gb"
                clearable
                placeholder="请选择"
              >
                <el-option
                  v-for="item in lxlist"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item label="风场">
              <el-select
                v-model="fc"
                clearable
                placeholder="请选择"
                @change="query_table"
              >
                <el-option
                  v-for="item in FClist"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item label="开始时间">
              <el-date-picker
                v-model="beginDate"
                value-format="yyyy-MM-dd"
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions">
              >
              </el-date-picker>
            </el-form-item>

            <el-form-item label="结束时间">
              <el-date-picker
                v-model="endDate"
                value-format="yyyy-MM-dd"
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions">
              >
              </el-date-picker>
            </el-form-item>

            <el-form-item>
              <el-button type="primary" @click="query_table" :plain="true"
                >查询</el-button
              >
            </el-form-item>

            <el-form-item>
              <el-button type="primary" :plain="true">导出</el-button>
            </el-form-item>
          </el-form>
        </el-row>
      </el-card>
    </el-header>

    <el-main>
      <el-card style="height: 759px">
        <el-table
          :data="tableData"
          id="tableData"
          style="width: 100%"
          :cell-style="{ textAlign: 'center' }"
          :header-cell-style="headStyle"
          max-height="739px"
          @selection-change="changeFun"
        >
          >
          <el-table-column label="损失率排行榜">
            <el-table-column type="index" width="80"> </el-table-column>
            <el-table-column
              type="selection"
              class="selection"
              @selection-change="changeFun"
              width="130"
            >
            </el-table-column>
            <el-table-column sortable prop="windturbineid" label="名称" width="330">
            </el-table-column>
            <el-table-column
              sortable
              prop="daynhgzssdl2"
              label="非计划检修损失率(%)"
              width="330"
            >
            </el-table-column>
            <el-table-column
              sortable
              prop="daynhwhssdl2"
              label="计划检修损失率(%)"
              width="330"
            >
            </el-table-column>
            <el-table-column sortable prop="daynhxdssdl2" label="弃风率(%)" width="330">
            </el-table-column>
            <el-table-column
              sortable
              prop="dayspeed"
              label="受累损失率(%)"
              width="339"
            >
            </el-table-column>
          </el-table-column>
        </el-table>
      </el-card>
    </el-main>
  </el-container>
</template>

<script>
  import percentageLossrRank from "@assets/js/normRanking/percentageLossrRank";
  export default percentageLossrRank;
</script>

<style lang="scss" scoped>
 @import "@assets/css/normRanking/percentageLossrRank.scss";
</style>