<template>
  <div :style="{height:height,width:width}">
    <el-table :data="lbnhjstjList" :height="height" border>
      <el-table-column :label="$t('结束时间')" align="center" prop="endtime" width="100">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column :label="$t('班次')" align="center" prop="team" width="80" :show-overflow-tooltip="true"/>
      <el-table-column :label="$t('乙烯产量(吨/班次)')" align="center" prop="ethyleneprocd" :show-overflow-tooltip="true"/>
      <el-table-column :label="$t('乙烯能耗(班次)')" align="center" prop="ethyenergyconsump" :show-overflow-tooltip="true"/>
      <el-table-column :label="$t('芳烃产量(吨/班次)')" align="center" prop="btxprocd" :show-overflow-tooltip="true"/>
    </el-table>
  </div>
</template>

<script>
import { listLbnhjstj } from "@/api/production/lbnhjstj";

export default {
  props: {
    width: {
      type: String,
      default: '100%'
    },
    height: {
      type: String,
      default: '210px'
    }
  },
  data() {
    return {
      // 查询参数
      queryParams: {
      },
      // 能耗管理统计表格数据
      lbnhjstjList: [],
    }
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询能耗管理统计列表 */
    getList() {
      this.loading = true;
      listLbnhjstj(this.queryParams).then(response => {
        this.lbnhjstjList = response.rows;
        this.loading = false;
      });
    },
  }
}
</script>

<style scoped>
  /deep/.el-table--enable-row-hover .el-table__body tr:hover > td {
    background-color: rgba(0, 0, 0, 0.01) !important;
  }

  /deep/.el-table .el-table__header-wrapper th, .el-table .el-table__fixed-header-wrapper th {
    font-size: 12px;
    height: 10px;
    background-color: #11285a;
    color: #ffffff;
  }

  /deep/.el-table--group, .el-table--border {
    border: 1px solid #11285a;
  }

  /deep/.el-table--group::after, .el-table--border::after, .el-table::before {
    background: rgba(253, 245, 245, 0) linear-gradient(to right, #11285a, #1d2d4a) repeat scroll 0% 0%;
  }

  /deep/.el-table--border th, .el-table--border td {
    border-right: 1px solid #11285a;
  }

  /deep/.el-table--border th, .el-table--border td {
    border-right: 1px solid #11285a;
  }

  /deep/.el-table {
    color: #ffffff;
  }

  /deep/.el-table tr {
    background: rgba(253, 245, 245, 0) linear-gradient(to right, #11285a, #1d2d4a) repeat scroll 0% 0%;
  }
</style>
