/**
 * 灾害处理搜索配置
 */
import type { SearchConfig } from '@/types/basic-search';
import { ACTIVE_STATUS_OPTIONS } from '@/views/disaster/constant';
import {
  TASK_STAGE_OPTIONS_DISPOSAL_MANAGEMENT,
  TASK_STAGE_OPTIONS_REPORT_TASK,
  FIX_STATUS_OPTIONS,
} from '../constant';

// 通用搜索配置
const BASIC_SEARCH_CONFIG = {
  FIX_STATUS: {
    label: '整改进度：',
    prop: 'fixStatus',
    component: 'ElSelect',
    selectOptions: FIX_STATUS_OPTIONS,
    componentProps: {
      placeholder: '请选择整改进度',
    },
  },
};

// 灾害处理搜索配置
export const DISPOSAL_MANAGEMENT_SEARCH_CONFIG: SearchConfig[] = [
  {
    label: '上报单位：',
    prop: 'reportDeptIds',
    slot: 'reportDeptIds',
  },
  {
    label: '生效状态：',
    prop: 'status',
    component: 'ElSelect',
    selectOptions: ACTIVE_STATUS_OPTIONS,
    componentProps: {
      placeholder: '请选择生效状态',
    },
  },
  {
    label: '任务阶段：',
    prop: 'taskStage',
    component: 'ElSelect',
    selectOptions: TASK_STAGE_OPTIONS_DISPOSAL_MANAGEMENT,
    componentProps: {
      placeholder: '请选择任务阶段',
    },
  },
];

// 损失上报-上报任务搜索配置
export const LOSS_REPORT_REPORT_TASK_SEARCH_CONFIG: SearchConfig[] = [
  {
    label: '任务阶段：',
    prop: 'taskStage',
    component: 'ElSelect',
    selectOptions: TASK_STAGE_OPTIONS_REPORT_TASK,
    componentProps: {
      placeholder: '请选择任务阶段',
    },
  },
];

// 损失记录-损失记录搜索配置
export const LOSS_RECORD_LOSS_RECORD_SEARCH_CONFIG: SearchConfig[] = [
  {
    label: '整改部门：',
    prop: 'handleDeptIds',
    slot: 'handleDeptIds',
  },
  BASIC_SEARCH_CONFIG.FIX_STATUS,
];

// 处置整改搜索配置
export const DISPOSAL_RECTIFICATION_SEARCH_CONFIG: SearchConfig[] = [
  {
    label: '优先级：',
    prop: 'priority',
    slot: 'priority',
  },
  BASIC_SEARCH_CONFIG.FIX_STATUS,
];
