function getcolumns(ifs) {
  return [
    {
      title: '表单名称',
      dataIndex: 'formName',
      key: 'formName',
      fieldProps: {
        disabled: true,
      },
      formItemProps: {
        rules: [
          {
            required: true,
            message: '此项为必填项',
            disabled: true,
          },
        ],
      },
      hideInForm: false,
      hideInTable: true,
      search: false,
    },
    {
      title: '字段名称',
      dataIndex: 'fieldName',
      formItemProps: {
        rules: [
          {
            required: true,
            message: '此项为必填项',
          },
        ],
      },
      hideInForm: false,
    },
    {
      title: '字段类型',
      dataIndex: 'fieldCharName',
      key: 'fieldChar',
      fieldProps: {
        disabled: ifs,
      },
      formItemProps: {
        rules: [
          {
            required: true,
            message: '此项为必填项',
          },
        ],
      },
      valueType: 'select',
      options: [
        {
          label: '输入框',
          value: '1',
        },
        {
          label: '下拉单选型',
          value: '2',
        },
        {
          label: '单选项型',
          value: '3',
        },
        {
          label: '下拉多选型',
          value: '4',
        },
      ],
    },
    {
      title: '选项内容',
      dataIndex: 'fieldCharValue',
      formItemProps: {
        rules: [
          {
            required: true,
            message: '此项为必填项',
          },
        ],
      },
      fieldProps: {
        disabled: ifs,
        placeholder: '请输入,用分号“;”隔开',
      },
      hideInForm: {
        fieldChar: ['1'],
      },
      search: false,
    },
    {
      title: '排序号',
      dataIndex: 'sort',
      valueType: 'digit',
      formItemProps: {
        rules: [
          {
            required: false,
            message: '此项为必填项',
          },
        ],
      },
      search: false,
    },
  ];
}

export default getcolumns;
