 <template>
  <el-container>
    <el-main>
      <el-card>
        <el-form :inline="true" class="demo-form-inline">
          <el-row :gutter="1">
            <el-form-item label="风场">
              <el-select v-model="fc" clearable placeholder="请选择" @change="query_xml()">
                <el-option
                  v-for="item in wpIdslist"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item label="项目">
              <el-select v-model="pj" clearable placeholder="请选择" @change="query_xl()">
                <el-option
                  v-for="item in projectlist"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>

            <el-form-item label="线路">
              <el-select v-model="xl" clearable placeholder="请选择">
                <el-option
                  v-for="item in linelist"
                  :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="queryPowerAll" :plain="true"
                >查询</el-button
              >
            </el-form-item>

            <el-form-item>
              <el-button type="primary" @click="queryApDataMx"
                >明细信息</el-button
              >
            </el-form-item>

            <el-form-item>
              <el-button type="primary">导出</el-button>
            </el-form-item>
          </el-row>
        </el-form>

        <el-tabs
          v-model="activeName"
          type="card"
          @tab-click="handleClick"
          style="height: 100%; width: 100%"
        >
          <el-tab-pane label="风场" name="first" id="fc">
            <el-row
              style="
                width: 100%;
                height: 100%;
                display: flex;
                justify-content: space-between;
              "
            >
              <el-card
                shadow="always"
                ref="fc_zzt_card"
                :style="styleObject_fc"
                style="
                  width: 45%;
                  display: table-cell;
                  vertical-align: middle;
                "
              >

                <div
                  id="histogram_fc"
                  ref="fc_zzt"
                  style="width: 800px"
                  
                ></div>
              </el-card>

              <el-card
                shadow="always"
                style="width: 48%"
                :style="styleObject_fc"
                id="moban"
              >
                <el-table
                  id="fc_table"
                  :data="fc_date"
                  style="width: 100%; font-size: 1px"
                  :max-height="tableHeight_fc"
                >
                  <el-table-column label="项目列表">
                    <el-table-column fixed type="index" width="40">
                    </el-table-column>
                    <el-table-column
                      prop="wtName"
                      sortable
                      label="名称"
                      width="103"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_total"
                      prop="total"
                      label="理论发电"
                      width="83"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daydl2"
                      prop="daydl2"
                      label="SCADA"
                      width="81"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_dayspeed"
                      prop="dayspeed"
                      label="风速"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhgzssdl"
                      prop="daynhgzssdl"
                      label="非计划检修"
                      width="103"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhwhssdl"
                      prop="daynhwhssdl"
                      label="计划检修"
                      width="85"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhcfdl"
                      prop="daynhcfdl"
                      label="受累"
                      width="75"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhxdssdl"
                      prop="daynhxdssdl"
                      label="限电"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhxdssdl"
                      prop="daynhxdssdl"
                      label="性能"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_lyl"
                      prop="lyl"
                      label="利用率%"
                      width="90"
                    >
                    </el-table-column>
                  </el-table-column>
                </el-table>
              </el-card>
            </el-row>
          </el-tab-pane>

          <el-tab-pane label="项目" name="second" id="xm">
            <el-row
              style="
                width: 100%;
                height: 100%;
                display: flex;
                justify-content: space-between;
              "
            >
              <el-card
                shadow="always"
                :style="styleObject_pj"
                style="
                  width: 48%;
                  display: table-cell;
                  vertical-align: middle;
                "
              >

                <div
                  id="histogram_xm"
                  style="width: 800px; height: 400px; margin: auto"
                ></div>
              </el-card>

              <el-card
                shadow="always"
                :style="styleObject_pj"
                style="width: 48%"
                id="moban"
              >
                <el-table
                  id="pj_table"
                  :data="pj_date"
                  style="width: 100%; font-size: 1px"
                  :max-height="tableHeight_pj"
                >
                  <el-table-column label="项目列表">
                    <el-table-column fixed type="index" width="40">
                    </el-table-column>
                    <el-table-column
                      prop="wtName"
                      sortable
                      label="名称"
                      width="103"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_total"
                      prop="total"
                      label="理论发电"
                      width="83"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daydl2"
                      prop="daydl2"
                      label="SCADA"
                      width="81"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_dayspeed"
                      prop="dayspeed"
                      label="风速"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhgzssdl"
                      prop="daynhgzssdl"
                      label="非计划检修"
                      width="103"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhwhssdl"
                      prop="daynhwhssdl"
                      label="计划检修"
                      width="85"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhcfdl"
                      prop="daynhcfdl"
                      label="受累"
                      width="75"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhxdssdl"
                      prop="daynhxdssdl"
                      label="限电"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhxdssdl"
                      prop="daynhqfdl"
                      label="性能"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_lyl"
                      prop="lyl"
                      label="利用率%"
                      width="90"
                    >
                    </el-table-column>
                  </el-table-column>
                </el-table>
              </el-card>
            </el-row>
          </el-tab-pane>

          <el-tab-pane label="集电线路" name="jdxl" id="jdxl">
            <el-row
              style="
                width: 100%;
                height: 100%;
                display: flex;
                justify-content: space-between;
              "
            >
              <el-card
                shadow="always"
                :style="styleObject_xl"
                style="width: 48%; display: table-cell; vertical-align: middle"
              >

                <div
                  id="histogram_jdxl"
                  style="width: 800px; margin: auto"
                ></div>
              </el-card>

              <el-card
                shadow="always"
                style="width: 48%"
                :style="styleObject_xl"
                id="moban"
              >
                <el-table
                  id="xl_table"
                  :data="xl_date"
                  style="width: 100%; font-size: 1px;margin-bottom:10px"
                  :max-height="tableHeight_xl"
                >
                  <el-table-column label="项目列表">
                    <el-table-column fixed type="index" width="40">
                    </el-table-column>
                    <el-table-column
                      prop="wtName"
                      sortable
                      label="名称"
                      width="103"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_total"
                      prop="total"
                      label="理论发电"
                      width="83"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daydl2"
                      prop="daydl2"
                      label="SCADA"
                      width="81"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_dayspeed"
                      prop="dayspeed"
                      label="风速"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhgzssdl"
                      prop="daynhgzssdl"
                      label="非计划检修"
                      width="103"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhwhssdl"
                      prop="daynhwhssdl"
                      label="计划检修"
                      width="85"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhcfdl"
                      prop="daynhcfdl"
                      label="受累"
                      width="75"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhxdssdl"
                      prop="daynhxdssdl"
                      label="限电"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_daynhxdssdl"
                      prop="daynhxdssdl"
                      label="性能"
                      width="63"
                    >
                    </el-table-column>
                    <el-table-column
                      sortable
                      :formatter="filter_lyl"
                      prop="lyl"
                      label="利用率%"
                      width="90"
                    >
                    </el-table-column>
                  </el-table-column>
                </el-table>
              </el-card>
            </el-row>
          </el-tab-pane>
        </el-tabs>
      </el-card>
    </el-main>
  </el-container>
</template>

<script>
import performanceList from "@assets/js/benchmarkingSys/performanceList";
export default performanceList;
</script>

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