<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="请选择" @change="queryApData">
                <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-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-form-item>
                  <el-button type="primary" @click="goReturn">返回</el-button>
                </el-form-item>
            </el-row>
            </el-form>
            </el-card>
            <el-table
            class="table_sty"
            :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">
            </el-table-column>
            <el-table-column
              prop="windturbineid"
              label="风机">
            </el-table-column>
            <el-table-column
            :formatter="dateformat"
            prop="recorddate"
              label="日期">
            <!-- <template slot-scope="scope">
                {{scope.row.recorddate  | formatDate}}
            </template> -->
            </el-table-column>
            <el-table-column
              prop="inputsmallratio"
              label="总小风切入">
            </el-table-column>
            <el-table-column
              prop="inputbigratio"
              label="总大风切入">
            </el-table-column>
            <el-table-column
              prop="outputsmallratio"
              label="总小风切出">
            </el-table-column>
            <el-table-column
              prop="outputbigmaxratio"
              label="总大风切出">
            </el-table-column>
            <el-table-column
              prop="dayinputsmall"
              label="日小风切入"
               width="150">
            </el-table-column>
            <el-table-column
              prop="dayoutputsmall"
              label="日小风切出">
            </el-table-column>
            <el-table-column
              prop="dayinputbig"
              label="日大风切入">
            </el-table-column>
            <el-table-column
              prop="dayoutputbig"
              label="日大风切出">
            </el-table-column>
            <el-table-column
              prop="monthinputsmall"
              label="月小风切入">
            </el-table-column>
            <el-table-column
              prop="monthinputbig"
              label="月大风切入">
            </el-table-column>
            <el-table-column
              prop="monthoutputsmall"
              label="月小风切出">
            </el-table-column>
            <el-table-column
              prop="monthoutputbig"
              label="月大风切出">
            </el-table-column>
            <el-table-column
              prop="yearinputsmall"
              label="年小风切入">
            </el-table-column>
            <el-table-column
              prop="yearinputbig"
              label="年大风切入">
            </el-table-column>
            <el-table-column
              prop="yearoutputsmall"
              label="年小风切出">
            </el-table-column>
            <el-table-column
              prop="yearoutputbig"
              label="年大风切出">
            </el-table-column>
            </el-table-column>        
       </el-table>
       <div style="margin-top:1%"> 
       <div id="chartHistogram" style="width: 100%; height: 250px; margin: auto"></div>
       </div>
       </div>
    </div>
</template>
<script>
  import cutAndSpeedHistory from "@assets/js/performanceAnalysis/cutAndSpeedHistory";
  export default cutAndSpeedHistory;
</script>
<style lang="scss" scoped>
    @import "@assets/css/performanceAnalysis/cutAndSpeedHistory.scss";
</style>