import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { DictEnum } from '@vben/constants';
import { getDictOptions } from '#/utils/dict';
export const querySchema: FormSchemaGetter = () => [
  {
    component: 'Select',
    componentProps: { options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE) },
    fieldName: 'stationStatus',
    label: '油站',
  },
  {
    component: 'Select',
    componentProps: { options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE) },
    fieldName: 'shiftStatus',
    label: '班次',
  },
  {
    component: 'Select',
    componentProps: { options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE) },
    fieldName: 'positionStatus',
    label: '岗位',
  },
  {
    component: 'DatePicker',
    componentProps: {
      type: 'daterange',
      format: 'YYYY-MM-DD',
      valueFormat: 'YYYY-MM-DD',
      startPlaceholder: '开始日期',
      endPlaceholder: '结束日期',
    },
    fieldName: 'workDateRange',
    label: '上班时间',
  },
  {
    component: 'Input',
    fieldName: 'employeeName',
    label: '姓名',
  },
  {
    component: 'Select',
    componentProps: { options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE) },
    fieldName: 'attendanceStatus',
    label: '状态',
  },
  {
    component: 'Select',
    componentProps: { options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE) },
    fieldName: 'workContentStatus',
    label: '上班内容',
  },
];

export const columns: VxeGridProps['columns'] = [
  {
    title: '姓名',
    field: 'Name',
    minWidth: 130,
  },
  {
    title: '工号',
    field: 'EmployeeID',
    minWidth: 130,
  },
  {
    title: '岗位',
    field: 'Position',
    minWidth: 130,
  },
  {
    title: '上班日期',
    field: 'Startdate',
    minWidth: 130,
  },
  {
    title: '班次',
    field: 'Shift',
    minWidth: 130,
  },
  {
    title: '上班时间',
    field: 'Workinghoursdata',
    minWidth: 130,
  },
  {
    title: '下班时间',
    field: 'Offwork',
    minWidth: 130,
  },
  {
    title: '上班时长',
    field: 'Workinghours',
    minWidth: 130,
  },
  {
    title: '上班内容',
    field: 'Worktasks',
    minWidth: 130,
  },
];
