import dayjs from 'dayjs';

export const columns = [
    {
      title: 'ID',
      dataIndex: 'id',
      ifShow: false,
    },
    {
      title: '名称',
      dataIndex: 'name',
      ifShow: false,
      width: 100,
    },
    {
      title: '任务名称',
      dataIndex: 'taskName',
      width: 150,
    },
    {
      title: '飞手',
      dataIndex: 'flyer',
      width: 80,
    },
    {
        title: '图片数量',
        dataIndex: 'imageCount',
        width: 80,
    },
    {
      title: '任务时间',
      dataIndex: 'taskDate',
      width: 100,
    },
    {
      title: '创建时间',
      dataIndex: 'createTime',
      width: 130,
    },
];

export const columnsRender = [
  {
    title: 'ID',
    dataIndex: 'id',
    ifShow: false,
  },
  {
    title: '飞手',
    dataIndex: 'flyer',
    width: 80,
  },
  {
    title: '飞行时间',
    dataIndex: 'flyTime',
    width: 150,
  },
  {
    title: '工作地址',
    dataIndex: 'workPosition',
    width: 100,
  },
  {
      title: '任务数量',
      dataIndex: 'count',
      width: 80,
  },
];

export const searchFormSchema_table = [
  {
    field: 'taskName',
    label: '任务名称',
    helpMessage: '筛选范围只包含表格里的航飞任务',
    component: 'Input',
    colProps: { span: 8 },
  },
  {
    field: '[tableBeginDate, tableEndDate]',
    label: '任务日期范围',
    helpMessage: '筛选范围只包含表格里的航飞任务',
    component: 'RangePicker',
    colProps: { span: 12 },
    componentProps: {
      format: 'YYYY-MM-DD',
      placeholder: ['开始日期', '结束日期'],
    },
  }
];  

export const searchFormSchema_map = [
  {
    field: '[mapBeginDate, mapEndDate]',
    label: '航飞日期范围',
    helpMessage: '筛选范围只包含选中的任务地图里的航飞图片',
    component: 'RangePicker',
    colProps: { span: 20 },
    componentProps: {
      format: 'YYYY-MM-DD',
      placeholder: ['开始日期', '结束日期'],
    },
  }
];  