/**
 * 入侵抓拍表格配置
 */
import type { TableColumnProps } from '@/types/basic-table';

export const INVASION_SNAPSHOT_LIST_TABLE_MAX_HEIGHT_DEFAULT = 'calc(70vh - 120px)';
export const INVASION_SNAPSHOT_LIST_TABLE_MAX_HEIGHT_PERMISSION = 'calc(70vh - 170px)';

// 基础表格样式配置
const TABLE_OPTIONS = {
  emptyText: '暂无数据',
  loading: true,
};

// 入侵抓拍表格样式配置
export const INVASION_SNAPSHOT_LIST_TABLE_OPTIONS = {
  ...TABLE_OPTIONS,
};

// 入侵抓拍表格列配置
export const INVASION_SNAPSHOT_LIST_TABLE_COLUMNS: TableColumnProps[] = [
  {
    label: '序号',
    prop: 'index',
    width: '80px',
    type: 'index',
    align: 'center',
  },
  {
    label: '事件',
    prop: 'event',
    align: 'center',
    minWidth: '100px',
  },
  {
    label: '抓拍地点',
    prop: 'location',
    align: 'left',
    minWidth: '200px',
  },
  {
    label: '抓拍时间',
    prop: 'eventTime',
    align: 'left',
    width: '200px',
  },
  {
    label: '抓拍图片',
    prop: 'pictures',
    align: 'center',
    slot: 'pictures',
    minWidth: '120px',
  },
];

/**
 * 门禁记录表格配置
 */
export const ACCESS_RECORD_LIST_TABLE_MAX_HEIGHT_DEFAULT = 'calc(70vh - 120px)';
export const ACCESS_RECORD_LIST_TABLE_MAX_HEIGHT_PERMISSION = 'calc(70vh - 170px)';

// 门禁记录表格样式配置
export const ACCESS_RECORD_LIST_TABLE_OPTIONS = {
  ...TABLE_OPTIONS,
};

// 门禁记录表格列配置
export const ACCESS_RECORD_LIST_TABLE_COLUMNS: TableColumnProps[] = [
  {
    label: '姓名',
    prop: 'username',
    align: 'left',
    minWidth: '120px',
  },
  {
    label: '卡号',
    prop: 'cardNum',
    align: 'left',
    minWidth: '150px',
  },
  {
    label: '部门',
    prop: 'deptName',
    align: 'left',
    minWidth: '150px',
  },
  {
    label: '事件',
    prop: 'event',
    align: 'center',
    minWidth: '120px',
  },
  {
    label: '进出地点',
    prop: 'location',
    align: 'left',
    minWidth: '200px',
  },
  {
    label: '进出时间',
    prop: 'eventTime',
    align: 'left',
    width: '200px',
  },
];
