import moment from 'moment';
import useSelectStore from '@/store/commonSelect/common'
let bm = useSelectStore().deptListData 

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