import { BasicColumn, FormSchema } from '@/components/Table';
import { GetStreetInfo } from '@/api/qydata/index';
import { getRightTable } from '@/api/sys/categories';

export const columns: BasicColumn[] = [
  {
    title: '序号',
    dataIndex: 'RowNumber',
    width: 80
  },
  {
    title: '宗地编码',
    dataIndex: 'zdbm',
  },
  {
    title: '使用人名称',
    dataIndex: 'syrmc',
  },
  {
    title: '不动产单元号',
    dataIndex: 'bdcdyh',
  },
  {
    title: '乡镇',
    dataIndex: 'djqmc',
  },
  {
    title: '村庄',
    dataIndex: 'djzqmc',
  },
  {
    title: '使用起始期',
    dataIndex: 'syqsq',
  },
  {
    title: '宗地发证面积',
    dataIndex: 'zdfzmj',
  },
  {
    title: '土地性质',
    dataIndex: 'tdxz',
  },
  {
    title: '建筑发证总面积',
    dataIndex: 'jzfzzmj',
  },
  {
    title: '土地取得方式',
    dataIndex: 'tdqdfs',
  }
];
export const companyColumns: BasicColumn[] = [
  {
    title: '序号',
    dataIndex: 'RowNumber',
    width: 80
  },
  {
    title: '社会信用代码',
    dataIndex: 'shxydm',
  },
  {
    title: '企业名称',
    dataIndex: 'syrmc',
  },
  {
    title: '行业',
    dataIndex: 'hy',
  },
  {
    title: '法人代表',
    dataIndex: 'frdb',
  },
  {
    title: '联系方式',
    dataIndex: 'lxfs',
  }
];
export const searchFormSchema: FormSchema[] = [
  {
    field: 'zdbm',
    label: '宗地编码',
    component: 'Input',
    colProps: { span: 4 },
  },
  {
    field: 'bdcdyh',
    label: '不动产单元号',
    component: 'Input',
    colProps: { span: 4 },
  },
  {
    field: 'djqdm',
    component: 'ApiSelect',
    label: '乡镇',
    colProps: {
      span: 4,
    },
    componentProps: () => {
      return {
        api: GetStreetInfo,
        params: {
          // code: 'FormSort',
        },
        resultField: '',
        labelField: 'djqmc',
        valueField: 'djqdm',
      };
    },
  },
  {
    component: 'Input',
    label: '使用起始期',
    field: 'syqsq',
    colProps: { span: 4 },
    componentProps: {},
  },
  // {
  //   component: 'DatePicker',
  //   label: '使用起始期',
  //   field: 'syqsq',
  //   colProps: { span: 4 },
  //   componentProps: {},
  // },
  {
    field: 'tdxz',
    component: 'ApiSelect',
    label: '土地性质',
    colProps: {
      span: 4,
    },
    componentProps: () => {
      return {
        api: getRightTable,
        params: {
          code: 'TDjtxz',
        },
        resultField: '',
        labelField: 'itemName',
        valueField: 'itemName',
      };
    },
  },
];
export const defaultValue = {
    "gid": 0,
    "objectid": 0,
    "shape_leng": "",
    "shape_area": "",
    "zdbm": "",
    "djqdm": "",
    "djqmc": "",
    "djzqdm": "",
    "djzqmc": "",
    "syrmc": null,
    "syrlx": null,
    "shxydm": null,
    "sjyt": null,
    "tdxz": "",
    "tdqdfs": null,
    "synx": null,
    "symj": "",
    "zdfzmj": "",
    "zdsjmj": "",
    "jzfzzmj": "",
    "jzsjzmj": "",
    "gjgjzmj": "",
    "zhjgjzmj": "",
    "dcr": "",
    "dcrq": "",
    "clr": "",
    "clrq": "",
    "bz": "",
    "bdcdyh": null,
    "zdybh": "",
    "jzsyzmj": "",
    "zddm": null,
    "syqsq": null,
    "syzzq": null,
    "geom": []
}
