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: 'title'
   },
   {
    title: '工作地点',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '所属行业id',
    align:"center",
    dataIndex: 'categoryOne_dictText'
   },
   {
    title: '所属工种id',
    align:"center",
    dataIndex: 'categoryTwo_dictText'
   },
   {
    title: '月薪最小值',
    align:"center",
    dataIndex: 'salaryMin'
   },
   {
    title: '月薪最大值',
    align:"center",
    dataIndex: 'salaryMax'
   },
   {
    title: '期望日薪',
    align:"center",
    dataIndex: 'salaryDay'
   },
   {
    title: '结算方式',
    align:"center",
    dataIndex: 'payType_dictText'
   },
   {
    title: '时间',
    align:"center",
    dataIndex: 'workTime'
   },
   {
    title: '联系电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '工作内容',
    align:"center",
    dataIndex: 'details',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '图片',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '关联用户id',
    align:"center",
    dataIndex: 'userId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '工作标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '工作地点',
    field: 'address',
    component: 'Input',
  },
  {
    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: 'salaryMin',
    component: 'InputNumber',
  },
  {
    label: '月薪最大值',
    field: 'salaryMax',
    component: 'InputNumber',
  },
  {
    label: '期望日薪',
    field: 'salaryDay',
    component: 'InputNumber',
  },
  {
    label: '结算方式',
    field: 'payType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"	employ_pay_type"
     },
  },
  {
    label: '时间',
    field: 'workTime',
    component: 'Input',
  },
  {
    label: '联系电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '工作内容',
    field: 'details',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '图片',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '关联用户id',
    field: 'userId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"han_hai_member,nick_name,id"
     },
  },
];
