import { BasicColumn, FormSchema } from '@/components/Table';
// import { getChildrenTree } from '@/api/demo/system';

const getYearList = () => {
  const num = 10;
  const currentYear = new Date().getFullYear();
  // 存储年份数据的数组
  const list: any = [];
  // 获取当前年份
  // year.value = Number(`${currentYear}`);
  list.push({
    value: Number(`${currentYear}`),
    label: Number(`${currentYear}`),
  });
  // 获取后面几年的数据
  for (let i = 1; i <= num; i++) {
    list.push({
      value: Number(`${currentYear - i}`),
      label: Number(`${currentYear - i}`),
    });
  }
  return list;
};
export const columns: BasicColumn[] = [
  {
    title: '线索编号',
    dataIndex: 'case_no',
    width:180,
  },
  {
    title: '线索描述',
    dataIndex: 'case_description',
    width:230,
  },
  {
    title: '区县',
    dataIndex: 'countyname',
  },
  {
    title: '乡镇',
    dataIndex: 'streetname',
  },
  {
    title: '社区',
    dataIndex: 'communityname',
  },
  {
    title: '线索面积',
    dataIndex: 'area',
  },
  {
    title: '农用地面积',
    dataIndex: 'nongyongdi_area',
  },
  {
    title: '耕地面积',
    dataIndex: 'gengdi_area',
  },
  {
    title: '永农面积',
    dataIndex: 'yongjiujibennongtian_area',
  },
  {
    title: '重点区域面积',
    dataIndex: 'zhongdianquyu_area',
  },
  {
    title: '生态保护红线面积',
    dataIndex: 'shengtaibaohuhongxian_area',
  },
  {
    title: '国土空间规划面积',
    dataIndex: 'guotukongjianguihua_area',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'key',
    label: '线索编号',
    component: 'Input',
    colProps: { span: 4 },
  },
  {
    field: 'originalcaseno',
    label: '标识号',
    component: 'Input',
    colProps: { span: 4 },
  },
];
