/**
 * 应急处置表格配置
 */
import type { TableColumnProps } from '@/types/basic-table';

export const PROCEDURE_LIST_TABLE_MAX_HEIGHT_DEFAULT = 'calc(70vh - 60px)';
export const PROCEDURE_LIST_TABLE_MAX_HEIGHT_PERMISSION = 'calc(70vh - 160px)';

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

// 应急处置表格样式配置
export const PROCEDURE_LIST_TABLE_OPTIONS = {
  ...TABLE_OPTIONS,
};

// 应急处置表格列配置
export const PROCEDURE_LIST_TABLE_COLUMNS: TableColumnProps[] = [
  {
    label: '序号',
    prop: 'index',
    width: '80px',
    type: 'index',
    align: 'center',
  },
  {
    label: '应急事件类型',
    prop: 'eventType',
    // slot: 'eventType',
    align: 'center',
    minWidth: '180px',
  },
  {
    label: '应急事件地点',
    prop: 'eventLocation',
    align: 'center',
    minWidth: '180px',
  },
  {
    label: '应急事件名称',
    prop: 'eventName',
    // slot: 'eventName',
    align: 'center',
    minWidth: '360px',
  },
  // {
  //   label: '关联预案',
  //   prop: 'emergencyPlanId',
  //   align: 'center',
  // },
  {
    label: '启动时间',
    prop: 'startTime',
    align: 'center',
    width: '180px',
  },
  {
    label: '状态',
    prop: 'status',
    slot: 'status',
    align: 'center',
    width: '120px',
  },
  {
    prop: 'action',
    label: '操作',
    align: 'center',
    slot: 'action',
    fixed: 'right',
    width: '350px',
  },
];

// 应急处置完成-损失记录表格
export const PROCEDURE_COMPLETE_LOSS_ITEM_TABLE_COLUMNS: TableColumnProps[] = [
  {
    label: '序号',
    prop: 'index',
    width: '80px',
    type: 'index',
    align: 'center',
  },
  {
    label: '受灾地点',
    prop: 'lossItemLocation',
    slot: 'lossItemLocation',
    align: 'center',
    minWidth: '160px',
  },
  {
    label: '受灾物品',
    prop: 'affectedItems',
    align: 'center',
    minWidth: '160px',
  },
  {
    label: '损失描述',
    prop: 'description',
    align: 'center',
    minWidth: '250px',
  },
  {
    label: '影响安全评估',
    prop: 'safetyLevel',
    slot: 'safetyLevel',
    align: 'center',
    minWidth: '100px',
  },
  {
    label: '灾害损失整改责任部门',
    prop: 'responsibleDeptName',
    align: 'center',
    minWidth: '160px',
  },
  {
    prop: 'action',
    label: '操作',
    align: 'center',
    slot: 'action',
    fixed: 'right',
    width: '80px',
  },
];
