import type { SearchConfig } from '@/types/basic-search';
import { EMERGENCY_DRILL_STATUS, EMERGENCY_DRILL_STATUS_DICT } from '../../constants';

// drillplan表格搜索 演练规模 演练内容 责任部门 计划完成日期 状态
export const DRILL_PLAN_LIST_SEARCH_CONFIG: SearchConfig[] = [
  {
    label: '演练规模：',
    prop: 'drillScope',
    slot: 'drillScope',
  },
  {
    label: '演练内容：',
    prop: 'drillContent',
    component: 'ElInput',
  },
  {
    label: '责任部门：',
    prop: 'responsibleDept',
    component: 'ElInput',
  },
  {
    label: '演练时间：',
    prop: 'daterange',
    component: 'ElDatePicker',
    componentProps: {
      type: 'daterange',
      startPlaceholder: '开始时间',
      endPlaceholder: '结束时间',
      valueFormat: 'YYYY-MM-DD',
    },
  },
  {
    label: '状态：',
    prop: 'status',
    component: 'ElSelect',
    selectOptions: [
      { label: '选择全部', value: EMERGENCY_DRILL_STATUS.TOTAL },
      {
        label: EMERGENCY_DRILL_STATUS_DICT[EMERGENCY_DRILL_STATUS.WAIT_SCRIPT],
        value: EMERGENCY_DRILL_STATUS.WAIT_SCRIPT,
      },
      { label: EMERGENCY_DRILL_STATUS_DICT[EMERGENCY_DRILL_STATUS.WAIT_SIGN], value: EMERGENCY_DRILL_STATUS.WAIT_SIGN },
      {
        label: EMERGENCY_DRILL_STATUS_DICT[EMERGENCY_DRILL_STATUS.WAIT_EXECUTE],
        value: EMERGENCY_DRILL_STATUS.WAIT_EXECUTE,
      },
      {
        label: EMERGENCY_DRILL_STATUS_DICT[EMERGENCY_DRILL_STATUS.WAIT_RECORD],
        value: EMERGENCY_DRILL_STATUS.WAIT_RECORD,
      },
      {
        label: EMERGENCY_DRILL_STATUS_DICT[EMERGENCY_DRILL_STATUS.WAIT_CHECK],
        value: EMERGENCY_DRILL_STATUS.WAIT_CHECK,
      },
      {
        label: EMERGENCY_DRILL_STATUS_DICT[EMERGENCY_DRILL_STATUS.RETURN],
        value: EMERGENCY_DRILL_STATUS.RETURN,
      },
      { label: EMERGENCY_DRILL_STATUS_DICT[EMERGENCY_DRILL_STATUS.COMPLETE], value: EMERGENCY_DRILL_STATUS.COMPLETE },
    ],
    componentProps: { placeholder: '选择全部' },
  },
];
