/*
 * @Author: liuJie
 * @Date: 2026-02-03 17:55:50
 * @LastEditors: liuJie
 * @LastEditTime: 2026-03-13 11:31:24
 * @Describe: file describe
 */
import type { TableColumnProps } from '@/types/basic-table';

// 基础表格样式配置
export const TABLE_OPTIONS = {
  emptyText: '暂无数据',
  loading: true,
  maxHeight: 'calc(70vh - 150px)',
};
// 下发参数
export interface DistributeParameters {
  id: string | number;
  groupId: string;
  startTime: string;
  endTime: string;
  responsibleDeptIds: string;
}

// 状态选项
export const STATUS_OPTIONS = [
  { label: '全部', value: undefined },
  { label: '未下发', value: 1 },
  { label: '进行中', value: 2 },
  { label: '已完成', value: 3 },
  { label: '已作废', value: 4 },
];

// 状态标签映射
export const STATUS_LABEL: Record<string, string> = {
  '1': '未下发',
  '2': '进行中',
  '3': '已完成',
  '4': '已作废',
};

export const TABLE_COLUMNS: TableColumnProps[] = [
  {
    label: '编号',
    type: 'index',
    align: 'center',
    width: '80px',
    fixed: 'left',
  },
  {
    label: '培训名称（内容）',
    prop: 'trainingContent',
    align: 'left',
    minWidth: '220px',
    fixed: 'left',
  },
  {
    label: '状态',
    prop: 'statusname',
    align: 'center',
    minWidth: '100px',
  },
  {
    label: '分类名称',
    prop: 'categoryName',
    align: 'center',
    minWidth: '110px',
  },
  {
    label: '培训计划名称',
    prop: 'trainingPlanName',
    align: 'center',
    minWidth: '140px',
  },
  {
    label: '培训对象',
    prop: 'trainingObject',
    align: 'center',
    minWidth: '110px',
  },
  {
    label: '培训人数',
    prop: 'trainingCount',
    align: 'center',
    minWidth: '120px',
  },
  {
    label: '培训方式',
    prop: 'trainingMethod',
    align: 'center',
    minWidth: '150px',
  },
  {
    label: '培训时间',
    prop: 'trainingTime',
    align: 'center',
    minWidth: '120px',
  },
  {
    label: '考核方式',
    prop: 'assessmentMethod',
    align: 'center',
    minWidth: '120px',
  },
  {
    label: '培训责任部门',
    prop: 'responsibleNames',
    align: 'left',
    minWidth: '200px',
  },
  {
    label: '学时',
    prop: 'studyHours',
    align: 'center',
    minWidth: '80px',
  },
  {
    label: '培训责任部门责任人所属分组名称',
    prop: 'groupName',
    align: 'left',
    minWidth: '280px',
  },
  {
    label: '培训责任部门责任人',
    prop: 'responsiblePersonName',
    align: 'center',
    minWidth: '200px',
  },
  {
    label: '计划开始时间',
    prop: 'startTime',
    align: 'center',
    minWidth: '150px',
  },
  {
    label: '计划结束时间',
    prop: 'endTime',
    align: 'center',
    minWidth: '150px',
  },
  {
    label: '操作',
    prop: 'action',
    slot: 'action',
    fixed: 'right',
    width: '300px',
    align: 'left',
  },
];
