<template>
    <div class="box" id="pdfDom">
        <div class="searchBar">
           <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="getFCData">
                <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" v-on:click="getPdf('单机性能分析')">导出pdf</el-button>
                </el-form-item> -->
            </el-row>
            </el-form>
            <el-table
                id="callthepolicetable"
                :row-style="{ height: '10px' }" 
                :cell-style="{ textAlign: 'center'}" 
                :header-cell-style="{ textAlign:'center',background:'#F5F7FA'}"
                @sort-change="changeTableSort"
                :data="tableData"
                align="center"
                border
                style="width:100%;margin-top:2%;cursor: pointer;">
                <el-table-column
                prop="wtid"
                label="风机"
                width="300">
                </el-table-column>
                 <el-table-column
                :formatter="formatDate"
                 prop="recodedate"
                label="日期"
                width="300">
                </el-table-column>
                <el-table-column
                prop="gztop3name"
                label="推荐情况"
                width="300">
                </el-table-column>
                <el-table-column
                prop="mainreason"
                label="等级评估"
                width="300">
                </el-table-column>
                <el-table-column
                prop="mainreason"
                label="等级评估"
                width="300">
                </el-table-column>
                <el-table-column
                    prop="address"
                    label="操作"
                    width="300">
                    <template slot-scope="scope">
                        <el-button size="mini"  @click="handleEdit(scope.$index, scope.row)">详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>
<script>
    import healthAssessment from "@assets/js/healthManagement/healthAssessment";
    export default healthAssessment;
</script>
<style lang="scss" scoped>
    @import "@assets/css/healthManagement/healthAssessment.scss";
</style>