import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';

export const queryFormSchema: FormSchemaGetter = () => [
  {
    component: 'Select',
    fieldName: 'station',
    label: '油站',
    componentProps: {
      placeholder: '请选择油站',
      options: [
        { label: '油站1', value: '油站1' },
        { label: '油站2', value: '油站2' },
        { label: '油站3', value: '油站3' },
        { label: '油站4', value: '油站4' },
        { label: '油站5', value: '油站5' },
      ],
    },
  },
  {
    component: 'DatePicker',
    fieldName: 'operationTime',
    label: '操作时间',
    componentProps: {
      type: 'daterange',
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      startPlaceholder: '开始时间',
      endPlaceholder: '结束时间',
    },
  },
];

export const tableColumns: VxeGridProps['columns'] = [
  {
    type: 'checkbox',
    width: 80,
  },
  {
    field: 'executor',
    title: '执行人',
    minWidth: 120,
  },
  {
    field: 'position',
    title: '岗位',
    minWidth: 120,
  },
  {
    field: 'station',
    title: '油站',
    minWidth: 120,
  },
  {
    field: 'taskName',
    title: '任务名称',
    minWidth: 150,
  },
  {
    field: 'originalPlanTime',
    title: '原计划时间',
    minWidth: 200,
  },
  {
    field: 'modifiedPlanTime',
    title: '修改后计划时间',
    minWidth: 200,
  },
  {
    field: 'operationTime',
    title: '操作时间',
    minWidth: 200,
  },
];
