<template>
  <div class="box">
    <div class="searchBar">
      <el-form :inline="true" class="demo-form-inline" style="margin-left:1% ;margin-top:5px">
        <el-row :gutter="1">
          <el-form-item label="风场">
            <el-select v-model="value" multiple placeholder="请选择">
              <el-option
                v-for="item in FClist"
                :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="结束日期"
            >
            </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="queryApDataMx"
              >对标分析</el-button
            >
          </el-form-item>
        </el-row>
      </el-form>
      <el-table
        :data="gridData"
        :row-style="{ height: '10px' }"
        :cell-style="{ textAlign: 'center'}"
        :header-cell-style="headStyle"
        @selection-change="handleSelectionChange"
        @sort-change="changeTableSort"
      >
        
          <el-table-column type="index" width="50"> </el-table-column>
          <el-table-column
            type="selection"
            class="selection"
            @selection-change="changeFun"
            width="50"
          >
          </el-table-column>
          <el-table-column sortable prop="wpName" label="风电场名称" width="130">
          </el-table-column>
          <el-table-column sortable prop="ordernum" label="综合排名" width="130">
          </el-table-column>
         
          <el-table-column
            sortable
            prop="scadafdlnum"
            label="发电量排名"
            width="130"
          >
          </el-table-column>
          <el-table-column sortable prop="fdl" :formatter="simplification" label="发电量" width="110">
          </el-table-column>
          <el-table-column
            sortable
            prop="gzssnum"
            label="故障损失排名"
            width="130"
          >
          </el-table-column>
          <el-table-column sortable prop="gzss" label="故障损失电量" width="130">
          </el-table-column>
          <el-table-column
            sortable
            prop="whssnum"
            label="检修损失排名"
            width="130"
          >
          </el-table-column>
          <el-table-column sortable prop="whss" label="检修损失电量" width="130">
          </el-table-column>
          <el-table-column
            sortable
            prop="qfssnum"
            label="性能损失排名"
            width="130"
          >
          </el-table-column>
          <el-table-column sortable prop="qfss" label="性能损失电量" width="130">
          </el-table-column>
          <el-table-column
            sortable
            prop="xdssnum"
            label="限电损失排名"
            width="130"
          >
          </el-table-column>
          <el-table-column sortable prop="xdss" label="限电损失电量" width="130">
          </el-table-column>
          <el-table-column
            sortable
            prop="slssnum"
            label="受累损失排名"
            width="130"
          >
          </el-table-column>
          <el-table-column sortable prop="slss" label="受累损失电量" width="130">
          </el-table-column>
          <el-table-column
            sortable
            prop="fnlylnum"
            label="风能利用率排名"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="fnlyl"
            label="风能利用率(%)"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="gzsslnum"
            label="故障损失率排名"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="gzssl"
            label="故障损失率(%)"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="jxsslnum"
            label="检修损失率排名"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="jxssl"
            label="检修损失率(%)"
            width="150"
          >
          </el-table-column>
          <el-table-column sortable prop="qflnum" label="弃风率排名" width="130">
          </el-table-column>
          <el-table-column sortable prop="qfl" label="弃风率(%)" width="130">
          </el-table-column>
          <el-table-column
            sortable
            prop="xnsslnum"
            label="性能损失率排名"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="xnssl"
            label="性能损失率(%)"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="slsslnum"
            label="受累损失率排名"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="slssl"
            label="受累损失率(%)"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="fwjslnum"
            label="复位及时率排名"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="fwjsl"
            label="复位及时率(%)"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="ztzhjslnum"
            label="状态转换率排名"
            width="150"
          >
          </el-table-column>
          <el-table-column
            sortable
            prop="ztzhjsl"
            label="状态转换率(%)"
            width="150"
          >
          </el-table-column>
          <el-table-column fixed="right" prop="address" label="操作" width="70">
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                @click="handleEdit(scope.$index, scope.row)"
                >详情</el-button
              >
            </template>
          </el-table-column>
      </el-table>

      <el-dialog
        class="el-dialog_body"
        width="60%"
        title="对标信息分析"
        :visible.sync="dialogTableVisible"
        append-to-body
      >
        <div class="margin">
          <div class="dialogLeftData">
            <div id="leiDaTu" class="echart"></div>
            <div id="leiDaTu2" class="echart"></div>
          </div>
          <div class="dialogRightData">
            <el-table
              :data="getTableData"
              height="618"
              :row-style="{ height: '10px' }"
              border
              :header-cell-style="headStyle"
              :cell-style="{ textAlign: 'center', padding: '7px' }"
              style="width: 100%; font-size: 10px"
            >
              <el-table-column prop="index" label="指标"> </el-table-column>
              <el-table-column prop="data1" :label="fdcName1">
              </el-table-column>
              <el-table-column prop="data2" :label="fdcName2">
              </el-table-column>
            </el-table>
          </div>
        </div>
      </el-dialog>
      <!-- <div style="text-align: center;">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage2"
					 :page-sizes="[10, 50, 100, 1000]"
					 :page-size="pagesize" layout="sizes, prev, pager, next" :total="1000">
					</el-pagination>
				</div> -->

      <el-row>
        <el-col :span="12"
          ><div
            id="chartPie"
            style="width: 800px; height: 400px; margin-top: 33px;margin-left:99px"
          ></div>
        </el-col>
        <el-col :span="12">
          <div
            id="chartPieRight"
            style="width: 800px; height: 400px;  margin-top: 33px;margin-left:99px"
          ></div
        ></el-col>
      </el-row>

      <el-row>
        <div class="box">
          <div
            id="chartHistogram"
            style="width: 90%; height: 300px; margin: auto"
          ></div>
        </div>
      </el-row>
    </div>
  </div>
</template>
<script>
import internationalBenchmark from "@assets/js/benchmarkingSys/internationalBenchmark";
export default internationalBenchmark;
</script>

<style lang="scss" scoped>
 @import "@assets/css/benchmarkingSys/internationalBenchmark.scss";
</style>