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: 'userName'
   },
   {
    title: '公司名称',
    align:"center",
    dataIndex: 'companyName'
   },
   {
    title: '地址',
    align:"center",
    dataIndex: 'companyAddress'
   },
   {
    title: '地址',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '行业/工种',
    align:"center",
    dataIndex: 'industryName'
   },
   {
    title: '个人简介',
    align:"center",
    dataIndex: 'detail'
   },
   {
    title: '身份证上传',
    align:"center",
    dataIndex: 'idcard',
    customRender:render.renderAvatar,
   },
   {
    title: '电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '年龄',
    align:"center",
    dataIndex: 'age'
   },
   {
    title: '性别',
    align:"center",
    dataIndex: 'gender_dictText'
   },
   {
    title: '期望薪资最小值',
    align:"center",
    dataIndex: 'moneymin'
   },
   {
    title: '期望薪资最大值',
    align:"center",
    dataIndex: 'moneymax'
   },
   {
    title: '角色',
    align:"center",
    dataIndex: 'role_dictText'
   },
   {
    title: '营业执照上传',
    align:"center",
    dataIndex: 'businessLicense',
    customRender:render.renderAvatar,
   },
   {
    title: '审核状态 0审核中 1 审核通过 2审核未通过',
    align:"center",
    dataIndex: 'auditStatus_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "电话",
      field: "phone",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "审核状态 0审核中 1 审核通过 2审核未通过",
      field: "auditStatus",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"audit_status"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户名',
    field: 'userName',
    component: 'Input',
  },
  {
    label: '公司名称',
    field: 'companyName',
    component: 'Input',
  },
  {
    label: '地址',
    field: 'companyAddress',
    component: 'Input',
  },
  {
    label: '地址',
    field: 'address',
    component: 'Input',
  },
  {
    label: '行业/工种',
    field: 'industryName',
    component: 'Input',
  },
  {
    label: '个人简介',
    field: 'detail',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
  {
    label: '身份证上传',
    field: 'idcard',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '年龄',
    field: 'age',
    component: 'InputNumber',
  },
  {
    label: '性别',
    field: 'gender',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"sex"
     },
  },
  {
    label: '期望薪资最小值',
    field: 'moneymin',
    component: 'InputNumber',
  },
  {
    label: '期望薪资最大值',
    field: 'moneymax',
    component: 'InputNumber',
  },
  {
    label: '角色',
    field: 'role',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"user_role"
     },
  },
  {
    label: '营业执照上传',
    field: 'businessLicense',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '审核状态 0审核中 1 审核通过 2审核未通过',
    field: 'auditStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"audit_status"
     },
  },
];
