import { BasicColumn, FormSchema } from '@/components/Table';
import dayjs from 'dayjs';

// 无人机发现违法行为情况统计明细表-table
export const columns: BasicColumn[] = [
  {
    title: 'countyid',
    dataIndex: '县区id',
    ifShow: false,
  },
  {
    title: '县区',
    dataIndex: 'countyname',
    width: 100,
    fixed: 'left',
  },
  {
    title: '下发问题总数',
    dataIndex: 'xfwtzs',
    width: 100,
  },
  {
    title: '合法',
    dataIndex: 'hf',
    width: 100,
  },
  {
    title: '其他',
    dataIndex: 'qt',
    width: 100,
  },
  {
    title: '违法',
    dataIndex: 'wf',
    width: 100,
  },
  {
    title: '已完成归档',
    dataIndex: 'ywcgd',
    width: 100,
  },
  {
    title: '未完成归档',
    dataIndex: 'wwcgd',
    width: 100,
  },
  {
    title: '未完成归档',
    width: 200,
    children: [
      {
        title: '违法采矿',
        dataIndex: 'wfck',
        width: 100,
      },
      {
        title: '违法加工',
        dataIndex: 'wfjg',
        width: 100,
      },
    ],
  },
  {
    title: '整改率',
    dataIndex: 'zgl',
    fixed: 'right',
    width: 100,
  },
  {
    title: '驳回率',
    dataIndex: 'bhl',
    fixed: 'right',
    width: 100,
  },
];

// 无人机发现违法行为情况统计明细表-搜索
export const searchFormSchema: FormSchema[] = [
  {
    field: '[startTime, endTime]',
    label: '日期范围',
    component: 'RangePicker',
    colProps: { span: 8 },
    componentProps: {
      format: 'YYYY-MM-DD',
      placeholder: ['开始日期', '结束日期'],
      defaultValue: [dayjs(dayjs().add(-1, 'day'), 'YYYY-MM-DD'), dayjs(dayjs().add(-1, 'day'), 'YYYY-MM-DD')]
    },
  },
];
