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: '活动主题',
    dataIndex: 'zjxm'
  },
  {
    title: '活动类别',
    dataIndex: 'gzdwszqyName'
  },
  {
    title: '抽取时间',
    dataIndex: 'gzdw'
  },
  
  {
    title: '添加人',
    dataIndex: 'createByName'
  },
  
  {
    title: '状态',
    dataIndex: 'status',
    customRender: ({ record }: any) => {
      console.log(record, 'record')
      let res = ''
      if (record.status == 10) {
        res = '启用'
      } else if (record.status == -10) {
        res = '停用'
      }
      return res
    },
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    label: '活动主题',
    field: 'zjxm',
    component: 'Input'
  },
  {
    label: '抽取开始时间',
    field: 'gzdw',
    component: 'Input'
  },
  {
    label: '抽取结束时间',
    field: 'zjlbName',
    component: 'Input'
  },
  {
    label: '活动类型',
    field: 'createByName',
    component: 'Input'
  },
  {
    label: '添加人',
    field: 'createByName',
    component: 'Input'
  },
  {
    label: '状态',
    field: 'createByName',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  { label: '', field: 'id', component: 'Input', show: false },
  {
    label: '身份证号',
    field: 'sfzh',
    component: 'Input',
  },
  {
    label: '姓名',
    field: 'zjxm',
    component: 'Input',
  },
  {
    label: '出生年月',
    field: 'csny',
    component: 'Input',
  },
  {
    label: '性别',
    field: 'sex',
    component: 'Input',
  },
  {
    label: '民族',
    field: 'mz',
    component: 'Input',
  },
  {
    label: '照片',
    field: 'photo',
    component: 'Input',
  },
  {
    label: '工作单位所在区域',
    field: 'gzdwszqyName',
    component: 'Input',
  },
  {
    label: '健康状况',
    field: 'jkzk',
    component: 'Input',
  },
  {
    label: '技术职称',
    field: 'jszc',
    component: 'Input',
  },
  {
    label: '评聘时间',
    field: 'ppsj',
    component: 'Input',
  },
  {
    label: '创建人',
    field: 'createByName',
    component: 'Input',
  },

  {
    label: '单位地址',
    field: 'dwdz',
    component: 'Input',
  },
  {
    label: '单位电话',
    field: 'dwdh',
    component: 'Input',
  },
  {
    label: '职业资格证书名称',
    field: 'zyzgzsmc',
    component: 'Input',
  },
  {
    label: '职业资格证书编号',
    field: 'zyzgzsbh',
    component: 'Input',
  },
  {
    label: '专业类别',
    field: 'zylb',
    component: 'Input',
  },
  {
    label: '状态：启用、停用',
    field: 'status',
    component: 'Input',
  },
  {
    label: '行业领域编码',
    field: 'hylyCode',
    component: 'Input',
  },
  {
    label: '行业领域名称',
    field: 'hylyName',
    component: 'Input',
  },
  {
    label: '行业领域其它',
    field: 'hylyQt',
    component: 'Input',
  },
  {
    label: '专业领域编码',
    field: 'zylyCode',
    component: 'Input',
  },
  {
    label: '专业领域名称',
    field: 'zylyName',
    component: 'Input',
  },
  {
    label: '专业领域其它',
    field: 'zylyQt',
    component: 'Input',
  },
  {
    label: '专家类别编码',
    field: 'zjlbCode',
    component: 'Input',
  },
  {
    label: '专家类别名称',
    field: 'zjlbName',
    component: 'Input',
  },
  {
    label: '专家类别其它',
    field: 'zjlbQt',
    component: 'Input',
  },
  {
    label: '个人简历',
    field: 'grjl',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'bz',
    component: 'Input',
  },
  {
    label: '附件名称',
    field: 'fileName',
    component: 'Input',
  },
  {
    label: '附件地址',
    field: 'filePath',
    component: 'Input',
  },
  {
    label: '专家级别',
    field: 'level',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'bz',
    component: 'Input',
  },
];
