<template>
  <div id="direct">
    <el-row>
      <el-col :span="24" class="info">
        <el-col :span="24" class="topInfo">
          <el-col :span="20" class="left">{{ title }}</el-col>
        </el-col>
        <el-col :span="24" class="list">
          <el-table :data="directData" stripe style="width: 100%">
            <el-table-column prop="title" label="名称" align="center"> </el-table-column>
            <el-table-column prop="type" label="信息类型" align="center"> </el-table-column>
            <el-table-column prop="person" label="发布人" align="center"> </el-table-column>
            <el-table-column prop="date" label="发布时间" align="center"> </el-table-column>
          </el-table>
          <el-col :span="24" class="page">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              layout="total, prev, pager, next, jumper"
              :total="1"
            >
            </el-pagination>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'direct',
  props: {
    directData: null,
  },
  components: {},
  data: () => ({
    title: '指导信息',
    currentPage: 1,
  }),
  created() {},
  computed: {},
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
};
</script>

<style lang="less" scoped>
.info {
  width: 100%;
  height: 580px;
  overflow: hidden;
  padding: 20px;
  background-color: #fff;
}
.topInfo {
  height: 30px;
  line-height: 30px;
  margin: 0 0 10px 0;
}
.topInfo .left {
  font-size: 22px;
  color: #2c3350;
  font-weight: bold;
}
.topInfo .more {
  height: 30px;
  text-align: right;
  padding: 6px 0;
}
.list {
  height: 500px;
  overflow: hidden;
}
/deep/.el-table {
  height: 430px;
}
/deep/.el-table td {
  padding: 8px 0;
}
/deep/.el-table th {
  padding: 8px 0;
  background-color: #f5f4f4;
}
/deep/ .el-table th.is-leaf {
  border-bottom: none;
  color: #000;
}
/deep/.el-table td {
  border-bottom: none;
}
.page {
  position: absolute;
  bottom: 20px;
  width: 910px;
  text-align: center;
}
</style>
