<!--
 * @Author: zhangtq 2452618307@qq.com
 * @Date: 2024-11-13 09:20:54
 * @LastEditors: zhangtq 2452618307@qq.com
 * @LastEditTime: 2024-11-19 09:32:36
 * @FilePath: src/views/screen/components/video/components/LogList.vue
 * @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
 -->
<template>
  <div style="width: 35%;position: absolute;top: 17%;overflow:auto;background-color: rgb(5, 32, 75) !important">
    <el-table :data="tableData" style="max-height: 67.5vh;width: 600px;overflow:auto;">
      <el-table-column prop="onLineTime" show-overflow-tooltip align="center" label="时间" width="170"></el-table-column>
      <el-table-column prop="type" show-overflow-tooltip align="center" label="事件类型" width="140"
      ></el-table-column>
      <el-table-column prop="name" show-overflow-tooltip align="center" label="来源"></el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  name: 'LogList',
  props: {
    total: {
      type: Number,
      default: 0
    },
    tableData: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      currentPage: 1
    }
  },
  methods: {
    handlePageChange(val) {
      this.currentPage = val
      this.$emit('pageChange', val)
    }
  }
}
</script>
<style scoped lang="scss">

/**
  * 表格样式
 */

/**
  * 表格样式
 */
::v-deep .el-table {
  background-color: rgb(5, 32, 75) !important;
  color: whitesmoke;
  padding: 0 10px 0 10px;

  // th高度
  th.el-table__cell div {
    height: 1.73vw;
    line-height: 1.73vw;
  }

  // td高度
  td.el-table__cell div {
    height: 1.7vw;
    line-height: 1.7vw;
  }

  // 卸载掉背景颜色
  tbody tr:hover > td {
    background-color: unset !important //修改成自己想要的颜色即可
  }

  tr {
    background-color: rgba(#fff, 0);
  }

  .el-table__cell {
    padding: 0.2vh !important;
  }

  td.el-table__cell, th.el-table__cell.is-leaf {
    border: none;
  }

  .el-table__header-wrapper,
  th.el-table__cell {
    background-color: rgba(#fff, 0.04); // 表头背景色
    font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
    font-weight: bold;
    color: #ffffff;
    // opacity: 0.04;
  }

  .el-table__body-wrapper {
    height: 62vh;
    overflow-y: scroll;
    font-size: 0.75vw;

    &::-webkit-scrollbar {
      z-index: 11;
      // width: 6px;
      display: none;
    }

    &::-webkit-scrollbar-track,
    &::-webkit-scrollbar-corner {
      background: #fff;
      background-color: #09203b;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 5px;
      width: 6px;
      background: #b4bccc;
    }

    &::-webkit-scrollbar-track-piece {
      background: #fff;
      background-color: #0c2646;
      width: 6px;
      border: none; // 滚动条去边框
    }
  }
}

// 表格背景色
::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: none !important;
  background-color: rgba(#fff, 0.04) !important;
}

// 表格边框
::v-deep .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
  border-bottom: none !important;
}

// 表格底部边框
::v-deep .el-table::before {
  height: 0 !important;
}

// 表格头部边框
::v-deep .el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell {
  border-bottom: none !important;
}

::v-deep .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
  border-bottom: none !important;
}

::v-deep .el-table__empty-block {
  background-color: rgba(#fff, 0.04) !important;
}



.page_dialog {
  width: 100%;
  float: right;
  background: rgb(5, 32, 75) !important;
  display: flex;
  justify-content: flex-end;
  margin-top: 1vh;

  .el-pagination {
    margin-top: 1vh;
  }

  ::v-deep .btn-prev,
  ::v-deep .btn-next {
    border: 1px solid #278996;
    background-color: transparent;
    width: 30px;
    height: 30px;
    margin-right: 8px;
  }

  ::v-deep .el-icon-arrow-left:before,
  ::v-deep .el-icon-arrow-right:before {
    color: whitesmoke;
    font-size: 16px;
  }


  ::v-deep .el-pagination .el-pager li {
    border: 1px solid #278996;
    background-color: transparent;
    color: whitesmoke;
    width: 40px;
    height: 30px;
    line-height: 30px;
    font-size: 16px;
    margin-right: 8px;
  }

  ::v-deep .el-pagination .el-pager li:not(.disabled).active {
    background-color: #035581;
    color: whitesmoke;
  }

  ::v-deep .el-pagination__total {
    font-size: 18px !important;
    color: white;
    line-height: 30px;
  }
}

</style>
