import moment from 'moment';

export const searchFormConfig = {
  labelWidth: '120px',
  itemStyle: {
    padding: '0px'
  },
  colLayout: {
    span: 10
  },
  formItems: [
    {
      field: 'timeRange',
      type: 'datepicker',
      label: '时间范围',
      placeholder: '请输入时间范围',
      otherOptions: {
        'range-separator': '至',
        type: 'datetimerange',
        'value-format': 'YYYY-MM-DD HH:mm:ss',
      },
      fieldArray: ['startTime', 'endTime'],
      resFormat: (time) => {
        return moment(time).format('YYYY-MM-DD HH:mm:ss');
      }
    },
  ]
}
