/**
 * 监控调阅记录表格配置
 */
import type { TableColumnProps } from '@/types/basic-table';

export const SURVEILLANCE_LIST_TABLE_MAX_HEIGHT_DEFAULT = 'calc(70vh - 130px)';
export const SURVEILLANCE_LIST_TABLE_MAX_HEIGHT_PERMISSION = 'calc(70vh - 180px)';

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

// 监控调阅记录表格样式配置
export const SURVEILLANCE_LIST_TABLE_OPTIONS = {
  ...TABLE_OPTIONS,
};

// 监控调阅记录表格列配置
export const SURVEILLANCE_LIST_TABLE_COLUMNS: TableColumnProps[] = [
  {
    label: '序号',
    prop: 'index',
    width: '80px',
    type: 'index',
    align: 'center',
  },
  {
    label: '姓名',
    prop: 'userName',
    align: 'left',
    minWidth: '100px',
  },
  {
    label: '工号',
    prop: 'staffNo',
    align: 'left',
    minWidth: '100px',
  },
  {
    label: '部门',
    prop: 'deptName',
    align: 'left',
    minWidth: '150px',
  },
  {
    label: '调阅位置',
    prop: 'accessLocation',
    align: 'left',
    minWidth: '150px',
  },
  {
    label: '调阅时段',
    prop: 'accessTimePeriod',
    align: 'left',
    minWidth: '200px',
    slot: 'accessTimePeriod',
  },
  {
    label: '是否拷贝',
    prop: 'isCopy',
    align: 'center',
    width: '110px',
    slot: 'isCopy',
  },
  {
    label: '审批单',
    prop: 'approvalForm',
    align: 'center',
    width: '180px',
    slot: 'approvalForm',
  },
  {
    label: '调阅状态',
    prop: 'accessStatus',
    align: 'center',
    width: '110px',
    slot: 'accessStatus',
  },
  {
    label: '记录人',
    prop: 'createdByName',
    align: 'left',
    minWidth: '100px',
  },
  {
    label: '操作',
    prop: 'action',
    align: 'left',
    slot: 'action',
    fixed: 'right',
    width: '128px',
  },
];
