<template>
  <div >
    <div class="content">
      <dataTable :table-data="tableData" :columns="columns" :page-obj="pageObj" :breads="breads" :checklist="checklist" :table-top="60">
        <el-table-column slot="operate" label="操作" align="center" fixed="right" width="100">
          <template slot-scope="scope">
            <el-button type="text" size="small" @click="examine(scope.row)">审核</el-button>
          </template>
        </el-table-column>
      </dataTable>
      <div class="absolute">
        <el-button type="primary" @click="create">创建新的角色</el-button> 
      </div>
    </div>
  </div>
</template>

<script>
import dataTable from '@components/dataTable.vue'
export default {
  name: 'poswerList',
  components: {
    dataTable
  },
  data() {
    return {
      checklist: [],
      breads: ['系统管理', '权限管理'],
      tableData: [{
        name: '部长',
        data: '2017-10-01 15：00',
        remark: '错别字'
      },
      {
        name: '分管副总',
        data: '2017-10-01 15：00',
        remark: '错别字'
      },
      {
        name: '分管科员',
        data: '2017-10-01 15：00'
      }],
      columns: [{
        label: '角色名称',
        prop: 'name'
      },
      {
        label: '备注',
        prop: 'remark'
      },
      {
        label: '创建时间',
        prop: 'data',
        sortable: true
      },
      {
        slot: 'operate'
      }
      ], // 操作列
     
      pageObj: {
        size: 10,
        total: 1,
        currentPage: 1,
        sizes: [100, 200, 300],
        func: (currentPage) => {
          this.pageTurning(currentPage)
        }
      }
    }
  },
  methods: {
    create() {
      this.$router.push('/admin/system/createUser')
    }
  }
}
</script>

<style scoped>
	.absolute{
		position: absolute;
		top:67px;
		left:50px
	}
</style>
