import { checkMobile } from '@/utils/followup/followupUtils/checkField';

export default ($this) => {
  return [
    {
      formType: 'input',
      className: 'float-none',
      prop: 'followUpOrgName',
      model: 'followUpOrgName',
      label: '随访单位名称：',
      disabled: false,
      placeholder: '请输入随访单位名称',
      spanNum: 12,
      maxlength: 30,
      type: 'text',
      labmsg: '次',
      rules: [{required: true, message: '请输入随访单位名称', trigger: 'submit'}],
    },
    {
      formType: 'input',
      className: 'float-none',
      prop: 'followUpUser',
      model: 'followUpUser',
      label: '随访人员姓名：',
      disabled: false,
      placeholder: '请输入随访人员姓名',
      spanNum: 12,
      maxlength: 30,
      type: 'text',
      labmsg: '次',
      rules: [{required: true, message: '请输入随访人员姓名', trigger: 'submit'}],
    },
    {
      formType: 'input',
      className: 'float-none',
      prop: 'followUpMobile',
      model: 'followUpMobile',
      label: '随访人员联系电话：',
      disabled: false,
      placeholder: '请输入随访人员联系电话',
      spanNum: 12,
      maxlength: 11,
      type: 'tel',
      labmsg: '次',
      rules: [{required: true, message: '请输入随访人员联系电话', trigger: 'submit'},{ validator: checkMobile , trigger: 'submit' }],
    },
    {
      formType: 'date-picker',
      className: 'float-none',
      prop: 'surveyTime',
      model: 'surveyTime',
      placeholder: '请选择',
      label: '本次调查时间：',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      dateType: 'date',
      type: 'date',
      rules: [{required: true, message: '本次调查时间', trigger: 'submit'}],
      spanNum: 12,
    },
  ]
}

