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: 'headImage',
    customRender:render.renderAvatar,
   },
   {
    title: '姓名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '性别',
    align:"center",
    dataIndex: 'sex'
   },
   {
    title: '年龄',
    align:"center",
    sorter: true,
    dataIndex: 'age'
   },
   {
    title: '学历',
    align:"center",
    dataIndex: 'qualification'
   },
   {
    title: '电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '期望工作地',
    align:"center",
    dataIndex: 'expectAddress_dictText'
   },
   {
    title: '民族',
    align:"center",
    dataIndex: 'nation'
   },
   {
    title: '工龄',
    align:"center",
    sorter: true,
    dataIndex: 'workTime'
   },
   {
    title: 'ip归属地',
    align:"center",
    dataIndex: 'ipAddress'
   },
   {
    title: '标签',
    align:"center",
    dataIndex: 'tag'
   },
   {
    title: '期望薪资下限',
    align:"center",
    sorter: true,
    dataIndex: 'salaryLow'
   },
   {
    title: '期望薪资上限',
    align:"center",
    sorter: true,
    dataIndex: 'salaryUp'
   },
   {
    title: '工种类型',
    align:"center",
    dataIndex: 'typeId_dictText'
   },
   {
    title: '工作性质',
    align:"center",
    dataIndex: 'natureId_dictText'
   },
   {
    title: '关联用户id',
    align:"center",
    dataIndex: 'userId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "求职岗位",
      field: "title",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "姓名",
      field: "name",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "电话",
      field: "phone",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "期望工作地",
      field: "expectAddress",
      component: 'JSearchSelect',
      componentProps:{
         dict:"employ_address,adress,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},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '求职岗位',
    field: 'title',
    component: 'Input',
  },
  {
    label: '头像',
    field: 'headImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '性别',
    field: 'sex',
    component: 'Input',
  },
  {
    label: '年龄',
    field: 'age',
    component: 'InputNumber',
  },
  {
    label: '学历',
    field: 'qualification',
    component: 'Input',
  },
  {
    label: '电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '期望工作地',
    field: 'expectAddress',
    component: 'JSearchSelect',
    componentProps:{
       dict:"employ_address,adress,id"
    },
  },
  {
    label: '民族',
    field: 'nation',
    component: 'Input',
  },
  {
    label: '工龄',
    field: 'workTime',
    component: 'InputNumber',
  },
  {
    label: 'ip归属地',
    field: 'ipAddress',
    component: 'Input',
  },
  {
    label: '个人介绍',
    field: 'brief',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '标签',
    field: 'tag',
    component: 'Input',
  },
  {
    label: '期望薪资下限',
    field: 'salaryLow',
    component: 'InputNumber',
  },
  {
    label: '期望薪资上限',
    field: 'salaryUp',
    component: 'InputNumber',
  },
  {
    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"
     },
  },
];
