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: 'documentNameSelect',
    label: '证件名称',
  },
  {
    component: 'DatePicker',
    componentProps: {
      type: 'daterange',
      format: 'YYYY-MM-DD',
      valueFormat: 'YYYY-MM-DD',
      startPlaceholder: '开始日期',
      endPlaceholder: '结束日期',
    },
    labelClass: 'text-xs',
    fieldName: 'taskStartedTime',
    label: '任务开始时间',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'taskStatus',
    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: 'documentName',
    minWidth: 130,
  },
  {
    title: '任务类型',
    field: 'taskType',
    minWidth: 130,
  },
  {
    title: '任务开始时间',
    field: 'taskStartedTime',
    minWidth: 130,
  },
  {
    title: '任务结束时间',
    field: 'taskCompletedTime',
    minWidth: 130,
  },
  {
    title: '执行人',
    field: 'executor',
    minWidth: 130,
  },
  {
    title: '任务状态',
    field: 'taskStatus',
    minWidth: 130,
  },
  {
    title: '操作人',
    field: 'Operator',
    minWidth: 130,
  },
];
export const mockData = [
  {
    gasstation: '中山路加油站',
    documentName: '营业执照年检',
    taskType: '年度例行',
    taskStartedTime: '2024-06-01 08:00',
    taskCompletedTime: '2024-06-01 12:00',
    executor: '王保瑞',
    taskStatus: '已完成',
    Operator: '李晴',
  },
  {
    gasstation: '北环大道油站',
    documentName: '消防器材检验',
    taskType: '安全巡检',
    taskStartedTime: '2024-06-01 09:15',
    taskCompletedTime: '2024-06-01 11:30',
    executor: '王凯',
    taskStatus: '已完成',
    Operator: '张敏',
  },
  {
    gasstation: '城南综合能源站',
    documentName: '油罐清洗记录',
    taskType: '设备维护',
    taskStartedTime: '2024-06-01 10:30',
    taskCompletedTime: '',
    executor: '李威',
    taskStatus: '处理中',
    Operator: '刘洋',
  },
  {
    gasstation: '高速服务区东站',
    documentName: '加油机校验报告',
    taskType: '计量检定',
    taskStartedTime: '2024-06-01 11:45',
    taskCompletedTime: '2024-06-01 14:20',
    executor: '张敏',
    taskStatus: '已完成',
    Operator: '王保瑞',
  },
  {
    gasstation: '城西快充站',
    documentName: '充电桩接地检测',
    taskType: '安全检定',
    taskStartedTime: '2024-06-01 13:00',
    taskCompletedTime: '',
    executor: '刘洋',
    taskStatus: '处理中',
    Operator: '李晴',
  },
];
