<template>
    <div class="box">
        <div class="searchBar">
            <el-card class="box-card">
                <!-- <div slot="header" class="clearfix" style="font-size:15px">
                    <span>查询条件</span>
                </div> -->
                <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.name"
                    :label="item.name"
                    :value="item.id">
                </el-option>
                </el-select>
                </el-form-item>
                <el-form-item label="日期：">
                        <el-date-picker
                        value-format="yyyy-MM-dd"
                        v-model="time"
                        type="date"
                        placeholder="选择日期">
                        </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
            
            class="table_sty"
            id="callthepolicetable"
            :data="gridData"
            style="width: 100%"
            border
            :row-style="{ height: '10px' }" 
            :cell-style="{ textAlign: 'center'}" 
            :header-cell-style="headStyle"
            @sort-change="changeTableSort"
            max-height="750px"
            >
            <!-- <el-table-column label="切入切出风速整合"> -->
            <el-table-column
              type="index"
              width="40">
            </el-table-column>
            <el-table-column
              prop="windturbineid"
              label="风机"
               width="150">
            <template slot-scope="{row}">
                {{ row.windturbineid || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="inputsmallratio"
              label="总小风切入"
              width="150">
            <template slot-scope="{row}">
                {{ row.inputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="inputbigratio"
              label="总大风切入"
               width="150">
            <template slot-scope="{row}">
                {{ row.inputbigratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="outputsmallratio"
              label="总小风切出"
               width="150">
            <template slot-scope="{row}">
                {{ row.outputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="outputbigmaxratio"
              label="总大风切出"
               width="150">
            <template slot-scope="{row}">
                {{ row.outputbigmaxratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayinputsmall"
              label="日小风切入"
               width="150">
            <template slot-scope="{row}">
                {{ row.dayinputsmall || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayinputsmallratio"
              label="日小风切入合格"
               width="150">
            <template slot-scope="{row}">
                {{ row.dayinputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayoutputsmall"
              label="日小风切出"
               width="150">
            <template slot-scope="{row}">
                {{ row.dayoutputsmall || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayoutputsmallratio"
              label="日小风切出合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.dayoutputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayinputbig"
              label="日大风切入"
               width="150">
                <template slot-scope="{row}">
                {{ row.dayinputbig || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayinputbigratio"
              label="日大风切入合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.dayinputbigratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayoutputbig"
              label="日大风切出"
               width="150">
               <template slot-scope="{row}">
                {{ row.dayoutputbig || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="dayoutputbigratio"
              label="日大风切出合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.dayoutputbigratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthinputsmall"
              label="月小风切入"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthinputsmall || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthinputsmallratio"
              label="月小风切入合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthinputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthinputbig"
              label="月大风切入"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthinputbig || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthinputbigratio"
              label="月大风切入合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthinputbigratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthoutputsmall"
              label="月小风切出"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthoutputsmall || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthoutputsmallratio"
              label="月小风切出合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthoutputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthoutputbig"
              label="月大风切出"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthoutputbig || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="monthoutputbigratio"
              label="月大风切出合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.monthoutputbigratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearinputsmall"
              label="年小风切入"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearinputsmall || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearinputsmallratio"
              label="年小风切入合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearinputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearinputbig"
              label="年大风切入"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearinputbig || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearinputbigratio"
              label="年大风切入合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearinputbigratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearoutputsmall"
              label="年小风切出"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearoutputsmall || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearoutputsmallratio"
              label="年小风切出合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearoutputsmallratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearoutputbig"
              label="年大风切出"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearoutputbig || '0' }}
            </template>
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="yearoutputbigratio"
              label="年大风切出合格"
               width="150">
               <template slot-scope="{row}">
                {{ row.yearoutputbigratio || '0' }}
            </template>
            </el-table-column>
            <el-table-column
              fixed="right"
              label="操作"
               width="100">
               <template slot-scope="scope">
                  <el-button size="mini"  @click="handleEdit(scope.$index, scope.row)">历史</el-button>
               </template>
            </el-table-column>  
            <!-- </el-table-column>         -->
       </el-table>
       </div>
    </div>
</template>
<script>
  import cutAndSpeed from "@assets/js/performanceAnalysis/cutAndSpeed";
  export default cutAndSpeed;
</script>
<style lang="scss" scoped>
    @import "@assets/css/performanceAnalysis/cutAndSpeed.scss";
</style>