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: 'IGasstationstatus',
    label: '我方油站',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'youGasstationstatus',
    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 HH:mm:ss',
      startPlaceholder: '开始日期',
      endPlaceholder: '结束日期',
    },
    fieldName: 'Time',
    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: '处理时间',
    fixed: 'left',
    field: 'ProcessingTime',
    minWidth: 130,
  },
  {
    title: '我方油站',
    fixed: 'left',
    field: 'IGasstationstatus',
    minWidth: 130,
  },
  {
    title: '竟对油站',
    fixed: 'left',
    field: 'youGasstationstatus',
    minWidth: 130,
  },
  {
    title: '油站性质',
    field: 'GasstationNature',
    minWidth: 130,
  },
  {
    title: '竞争关系',
    field: 'Competitiverelationship',
    minWidth: 130,
  },
  {
    title: '距离（KM）',
    field: 'Deadline',
    minWidth: 130,
  },
  {
    title: '挂牌价',
    field: 'Deadline',
    // minWidth: 130,
    children: [
      {
        title: '95#',
        field: '95#',
        minWidth: 130,
      },
      {
        title: '92#',
        field: '92#',
        minWidth: 130,
      },
      {
        title: '92#专车',
        field: 'Privatecar92#',
        minWidth: 130,
      },
      {
        title: '92#的士',
        field: 'taxi92#',
        minWidth: 130,
      },
      {
        title: '92#油卡',
        field: 'taxi92#',
        minWidth: 130,
      },
    ],
  },
];
export const mockData = [
  {
    ProcessingTime: '2024-06-01 08:00:00',
    IGasstationstatus: '正常营业',
    youGasstationstatus: '促销中',
    GasstationNature: '民营',
    Competitiverelationship: '直接竞争',
    Deadline: 1.2,
    '95#': 7.85,
    '92#': 7.45,
    'Privatecar92#': 7.35,
    'taxi92#': 7.25,
  },
  {
    ProcessingTime: '2024-06-01 09:15:00',
    IGasstationstatus: '库存预警',
    youGasstationstatus: '正常营业',
    GasstationNature: '国企',
    Competitiverelationship: '间接竞争',
    Deadline: 2.1,
    '95#': 7.90,
    '92#': 7.50,
    'Privatecar92#': 7.40,
    'taxi92#': 7.30,
  },
  {
    ProcessingTime: '2024-06-01 10:30:00',
    IGasstationstatus: '正常营业',
    youGasstationstatus: '降价促销',
    GasstationNature: '合资',
    Competitiverelationship: '直接竞争',
    Deadline: 0.8,
    '95#': 7.80,
    '92#': 7.40,
    'Privatecar92#': 7.30,
    'taxi92#': 7.20,
  },
  {
    ProcessingTime: '2024-06-01 11:45:00',
    IGasstationstatus: '设备维护',
    youGasstationstatus: '正常营业',
    GasstationNature: '民营',
    Competitiverelationship: '间接竞争',
    Deadline: 1.5,
    '95#': 7.95,
    '92#': 7.55,
    'Privatecar92#': 7.45,
    'taxi92#': 7.35,
  },
  {
    ProcessingTime: '2024-06-01 13:00:00',
    IGasstationstatus: '正常营业',
    youGasstationstatus: '会员日',
    GasstationNature: '国企',
    Competitiverelationship: '直接竞争',
    Deadline: 1.0,
    '95#': 7.88,
    '92#': 7.48,
    'Privatecar92#': 7.38,
    'taxi92#': 7.28,
  },
];
