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",
    dataIndex: 'name'
   },
   {
    title: '性别',
    align:"center",
    dataIndex: 'sex_dictText'
   },
   {
    title: '年龄',
    align:"center",
    dataIndex: 'age'
   },
   {
    title: '所属行业id',
    align:"center",
    dataIndex: 'categoryOne_dictText'
   },
   {
    title: '所属工种id',
    align:"center",
    dataIndex: 'categoryTwo_dictText'
   },
   {
    title: '头像',
    align:"center",
    dataIndex: 'headImage',
    customRender:render.renderAvatar,
   },
   {
    title: '月薪最小值',
    align:"center",
    dataIndex: 'salaryMin'
   },
   {
    title: '月薪最大值',
    align:"center",
    dataIndex: 'salaryMax'
   },
   {
    title: '联系电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '结算方式',
    align:"center",
    dataIndex: 'payType_dictText'
   },
   {
    title: '出行方式',
    align:"center",
    dataIndex: 'commuteType'
   },
   {
    title: '出发地址',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '工作标题',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '民族',
    align:"center",
    dataIndex: 'nation'
   },
   {
    title: '个人介绍',
    align:"center",
    dataIndex: 'brief',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '关联用户id',
    align:"center",
    dataIndex: 'userId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '性别',
    field: 'sex',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_sex"
     },
  },
  {
    label: '年龄',
    field: 'age',
    component: 'InputNumber',
  },
  {
    label: '所属行业id',
    field: 'categoryOne',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_category,name,id"
     },
  },
  {
    label: '所属工种id',
    field: 'categoryTwo',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_category,name,id"
     },
  },
  {
    label: '头像',
    field: 'headImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '月薪最小值',
    field: 'salaryMin',
    component: 'InputNumber',
  },
  {
    label: '月薪最大值',
    field: 'salaryMax',
    component: 'InputNumber',
  },
  {
    label: '联系电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '结算方式',
    field: 'payType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"employ_pay_type"
     },
  },
  {
    label: '出行方式',
    field: 'commuteType',
    component: 'Input',
  },
  {
    label: '出发地址',
    field: 'address',
    component: 'Input',
  },
  {
    label: '工作标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '民族',
    field: 'nation',
    component: 'Input',
  },
  {
    label: '个人介绍',
    field: 'brief',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '关联用户id',
    field: 'userId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"han_hai_member,nick_name,id"
     },
  },
];
