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: 'waterId'
   },
   {
    title: '考生姓名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '身份证号码',
    align:"center",
    dataIndex: 'idCard'
   },
   {
    title: '准考证号',
    align:"center",
    dataIndex: 'ticketNumber'
   },
   {
    title: '考试车型',
    align:"center",
    dataIndex: 'vehicleModel'
   },
   {
    title: '考试日期',
    align:"center",
    dataIndex: 'vehicleDate',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '考试场地',
    align:"center",
    dataIndex: 'vehicleAddress'
   },
   {
    title: '考试场次',
    align:"center",
    dataIndex: 'vehicleSession'
   },
   {
    title: '注意事项',
    align:"center",
    dataIndex: 'note'
   },
   {
    title: '访问域名',
    align:"center",
    dataIndex: 'confId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "标题地区",
      field: "title",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "流水号",
      field: "waterId",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "考生姓名",
      field: "name",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "身份证号码",
      field: "idCard",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "准考证号",
      field: "ticketNumber",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "考试车型",
      field: "vehicleModel",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "考试日期",
      field: "vehicleDate",
      component: 'DatePicker',
      colProps: {span: 6},
 	},
	{
      label: "考试场地",
      field: "vehicleAddress",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "考试场次",
      field: "vehicleSession",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "访问域名",
      field: "confId",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"db_conf,url,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '标题地区',
    field: 'title',
    component: 'Input',
  },
  {
    label: '流水号',
    field: 'waterId',
    component: 'Input',
  },
  {
    label: '考生姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '身份证号码',
    field: 'idCard',
    component: 'Input',
  },
  {
    label: '准考证号',
    field: 'ticketNumber',
    component: 'Input',
  },
  {
    label: '考试车型',
    field: 'vehicleModel',
    component: 'Input',
  },
  {
    label: '考试日期',
    field: 'vehicleDate',
    component: 'DatePicker',
  },
  {
    label: '考试场地',
    field: 'vehicleAddress',
    component: 'Input',
  },
  {
    label: '考试场次',
    field: 'vehicleSession',
    component: 'Input',
  },
  {
    label: '注意事项',
    field: 'note',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
  {
    label: '访问域名',
    field: 'confId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"db_conf,url,id"
     },
  },
];
