import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '创建日期',
    align:"center",
    sorter: true,
    dataIndex: 'createTime'
   },
   {
    title: '工作标题',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '工作地址',
    align:"center",
    dataIndex: 'workAddress'
   },
   {
    title: '工龄要求',
    align:"center",
    dataIndex: 'workAge'
   },
   {
    title: '学历要求',
    align:"center",
    dataIndex: 'qulification'
   },
   {
    title: '薪资下限',
    align:"center",
    dataIndex: 'salaryLow'
   },
   {
    title: '薪资上限',
    align:"center",
    dataIndex: 'salaryUp'
   },
   {
    title: '招聘者职位',
    align:"center",
    dataIndex: 'career'
   },
   {
    title: '招聘公司名称',
    align:"center",
    dataIndex: 'company_dictText'
   },
   {
    title: '标签',
    align:"center",
    dataIndex: 'tab'
   },
   {
    title: '工种类型',
    align:"center",
    dataIndex: 'typeId_dictText'
   },
   {
    title: '工作性质',
    align:"center",
    dataIndex: 'natureId_dictText'
   },
   {
    title: '关联用户id',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '关联区域id',
    align:"center",
    dataIndex: 'areaId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "工作标题",
      field: "title",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "招聘者姓名",
      field: "name",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "招聘公司名称",
      field: "company",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"employ_company,company_name,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "工种类型",
      field: "typeId",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"employ_job_type,name,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "工作性质",
      field: "natureId",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"employ_nature,name,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "关联区域id",
      field: "areaId",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"employ_address,adress,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '工作标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '工作地址',
    field: 'workAddress',
    component: 'Input',
  },
  {
    label: '工龄要求',
    field: 'workAge',
    component: 'Input',
  },
  {
    label: '学历要求',
    field: 'qulification',
    component: 'Input',
  },
  {
    label: '薪资下限',
    field: 'salaryLow',
    component: 'InputNumber',
  },
  {
    label: '薪资上限',
    field: 'salaryUp',
    component: 'InputNumber',
  },
  {
    label: '招聘者职位',
    field: 'career',
    component: 'Input',
  },
  {
    label: '职位详情',
    field: 'workDetail',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '招聘公司名称',
    field: 'company',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_company,company_name,id"
     },
  },
  {
    label: '标签',
    field: 'tab',
    component: 'Input',
  },
  {
    label: '工种类型',
    field: 'typeId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_job_type,name,id"
     },
  },
  {
    label: '工作性质',
    field: 'natureId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_nature,name,id"
     },
  },
  {
    label: '关联用户id',
    field: 'userId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"han_hai_member,nick_name,id"
     },
  },
  {
    label: '关联区域id',
    field: 'areaId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_address,adress,id"
     },
  },
  {
    label: '经度',
    field: 'longitude',
    component: 'InputNumber',
  },
  {
    label: '纬度',
    field: 'latitude',
    component: 'InputNumber',
  },
];
