PurchaseStorageTable.vue 2.21 KB
<template>
  <div>
    <el-table :id="id" :data="tableData" style="width: 100%" :header-cell-style="{ color: '#e8e8e8', fontSize: '11px', height: '3.11vh', background: '#0a214d' }">
      <el-table-column prop="merchantname" :label="firstName" width="250"></el-table-column>
      <el-table-column prop="amounttotal" label="采购额/元"></el-table-column>
      <el-table-column prop="warehousing" label="入库额/元"></el-table-column>
      <template slot="empty">
        <div class="empty">
          <Empty></Empty>
        </div>
      </template>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'PurchaseStorageTable',
  props: {
    tableData: {
      type: Array,
      default: () => []
    },
    id: String,
    firstName: {
      type: String,
      default: '服务中心名称'
    }
  },
  data() {
    return {}
  },

  mounted() {},

  methods: {}
}
</script>

<style lang="scss">
.el-table {
  font-weight: 500;
  font-size: 11px;
  text-align: center;
  height: 26.33vh;
  overflow: auto;
  background-color: #061422;
  thead {
    height: 3.11vh;
    background: #0a214d;
    color: #e8e8e8;
  }
  tbody tr {
    height: 2.56vh;
    color: #ffffff;
  }
}
.el-table__body-wrapper {
  max-height: 52vh;
  // overflow-y: scroll;
}
.el-table tr {
  background-color: #061422;
}
.el-table .el-table__cell {
  padding: 0 !important;
}
.el-table--enable-row-hover .el-table__body tr:hover > td {
  background-color: transparent !important;
}
.el-table--enable-row-hover .el-table__body tr:hover {
  background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%) !important;
  font-weight: 500;
  color: #ffffff;
}
.pagination-box {
  margin-top: 1.78vh;
}
.el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
  border-bottom: 1px solid #161c5f;
}
.el-table--border::after,
.el-table--group::after,
.el-table::before {
  content: '';
  position: absolute;
  background-color: transparent;
  z-index: 1;
}
.el-scrollbar {
  .el-scrollbar__wrap {
    margin-bottom: -15px !important;
  }
}
.el-table__empty-block {
  background-color: #051526;
}
.el-table .cell {
  line-height: 1vw;
}
.el-table__empty-text {
  line-height: 2.11vh;
}
</style>

<style lang="scss" scoped>
.empty {
  margin: 5vh 0;
}
</style>