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: 'SubmitTime',
    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: '提交时间',
    field: 'SubmitTime',
    minWidth: 130,
  },
  {
    title: '任务状态',
    field: 'TaskStatus',
    minWidth: 130,
  },
];
export const mockData = [
  {
    Gasstation: '中山路加油站',
    Executor: '王保瑞',
    Position: '当班经理',
    Comment: '高峰期车流大，需增派人手',
    Deadline: '2024-06-10 18:00',
    SubmitTime: '2024-06-01 08:15',
    TaskStatus: '待处理',
  },
  {
    Gasstation: '北环大道油站',
    Executor: '王凯',
    Position: '安全员',
    Comment: '油罐液位异常，需立即检查',
    Deadline: '2024-06-05 12:00',
    SubmitTime: '2024-06-01 09:30',
    TaskStatus: '处理中',
  },
  {
    Gasstation: '城南综合能源站',
    Executor: '李威',
    Position: '设备管理员',
    Comment: '加油机滤芯更换完成，请复核',
    Deadline: '2024-06-08 17:00',
    SubmitTime: '2024-06-01 10:45',
    TaskStatus: '已完成',
  },
  {
    Gasstation: '高速服务区东站',
    Executor: '张敏',
    Position: '收银员',
    Comment: 'POS 系统版本升级，测试支付流程',
    Deadline: '2024-06-07 20:00',
    SubmitTime: '2024-06-01 14:20',
    TaskStatus: '待处理',
  },
  {
    Gasstation: '城西快充站',
    Executor: '刘洋',
    Position: '电工',
    Comment: '充电桩接地电阻复检',
    Deadline: '2024-06-06 16:00',
    SubmitTime: '2024-06-01 15:10',
    TaskStatus: '处理中',
  },
];
