import { h } from 'vue';
import { BasicColumn } from '@/components/Table';

export const columns: BasicColumn[] = [
  {
    label: '编号',
    render(record) {
      return h('span', {}, { default: () => `${record.index + 1}` });
    },
  },
  {
    label: '会话编号',
    prop: 'token',
    width: 300,
  },
  {
    label: '用户名',
    prop: 'username',
  },
  {
    label: '部门名称',
    prop: 'deptName',
  },
  {
    label: '登录地址',
    prop: 'loginIp',
  },
  {
    label: '登录地点',
    prop: 'loginAddr',
  },
  {
    label: '浏览器',
    prop: 'browser',
  },
  {
    label: '操作系统',
    prop: 'operatingSystem',
  },
  {
    label: '登录设备',
    prop: 'device',
  },
  {
    label: '登录时间',
    prop: 'loginTime',
    width: 180,
  },
];
