export default {
  data() {
    return {
      total: 20,
      loading: false,
      tableData: [],
      tableOptions: {
        sortTable: true,
        maxHeight: 'calc(100vh - 335px)',
        height: 'calc(100vh - 335px)'
      },
      columns: [
        {
          label: '序号',
          index: true
        },
        {
          label: '登录名',
          prop: 'loginName',
          showTooltip: true
        },
        {
          label: '姓名',
          prop: 'name',
          showTooltip: true
        },
        {
          label: '事件',
          showTooltip: true,
          prop: 'remark'
        },
        {
          label: '操作',
          show: true,
          render: (h, row) => {
            return (
              <el-tooltip class='item' effect='dark' content='查看' placement='top' >
                <span class='table-icon-box'>
                  <i class='iconfont icon-Magnifier' onClick={() => { this.handlerOperate('see', row) }}></i>
                </span>
              </el-tooltip>
            )
          },
          width: 200
        }
      ]
    }
  },
  computed: {
    tablePower() {
      return ({ item, tab, row }) => {
        const { tabPower, rowPower } = item
        if (rowPower) {
          if (tabPower.includes(tab) && rowPower.includes(row.statusName)) {
            return true
          }
        } else {
          if (tabPower.includes(tab)) {
            return true
          }
        }
      }
    }
  }
}
