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: 'areaStatus',
    label: '片区',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'gasStationStatus',
    label: '油站',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'status',
    label: '状态',
  },
  {
    component: 'DatePicker',
    componentProps: {
      type: 'daterange',
      format: 'YYYY-MM-DD',
      valueFormat: 'YYYY-MM-DD',
      startPlaceholder: '开始日期',
      endPlaceholder: '结束日期',
    },
    fieldName: 'handleTime',
    label: '处理时间',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'commentStatus',
    label: '评论',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'positionStatus',
    label: '岗位',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'createStatus',
    label: '创建',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'executorStatus',
    label: '执行人',
  },
];

export const columns: VxeGridProps['columns'] = [
  {
    field: 'action',
    fixed: 'left',
    slots: { default: 'action' },
    resizable: false,
    title: '操作',
    width: 180,
  },
  {
    title: '油站',
    field: 'gasStation',
    minWidth: 130,
  },
  {
    title: '执行人',
    field: 'executor',
    minWidth: 130,
  },
  {
    title: '岗位',
    field: 'position',
    minWidth: 130,
  },
  {
    title: '评论',
    field: 'comment',
    minWidth: 130,
  },
  {
    title: '截止时间',
    field: 'deadline',
    minWidth: 130,
  },
  {
    title: '处理时间',
    fixed: 'left',
    field: 'processingTime',
    minWidth: 130,
  },

  {
    title: '完成状态',
    fixed: 'left',
    field: 'completionStatus',
    minWidth: 130,
  },
];
export const mockData = [
  {
    gasStation: '中山路加油站',
    executor: '王保瑞',
    position: '当班经理',
    comment: '高峰期车流大，需增派人手',
    deadline: '2024-06-10 18:00',
    processingTime: '2024-06-01 08:00',
    completionStatus: '处理中',
  },
  {
    gasStation: '北环大道油站',
    executor: '王凯',
    position: '安全员',
    comment: '液位传感器读数漂移',
    deadline: '2024-06-05 12:00',
    processingTime: '2024-06-01 09:15',
    completionStatus: '已完成',
  },
  {
    gasStation: '城南综合能源站',
    executor: '李威',
    position: '设备管理员',
    comment: '滤芯堵塞超标，需更换',
    deadline: '2024-06-08 17:00',
    processingTime: '2024-06-01 10:30',
    completionStatus: '已完成',
  },
  {
    gasStation: '高速服务区东站',
    executor: '张敏',
    position: '收银员',
    comment: '小票打印机卡纸',
    deadline: '2024-06-07 20:00',
    processingTime: '2024-06-01 11:45',
    completionStatus: '处理中',
  },
  {
    gasStation: '城西快充站',
    executor: '刘洋',
    position: '电工',
    comment: '接地电阻偏高，需复检',
    deadline: '2024-06-06 16:00',
    processingTime: '2024-06-01 13:00',
    completionStatus: '待处理',
  },
];
