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: 'customerComplaintIssueSelect',
    labelClass: 'text-xs',
    label: '客户投诉问题',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'areaSelect',
    label: '片区',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'gasStationSelect',
    label: '油站',
  },
  {
    component: 'DatePicker',
    componentProps: {
      type: 'daterange',
      format: 'YYYY-MM-DD',
      valueFormat: 'YYYY-MM-DD',
      startPlaceholder: '开始日期',
      endPlaceholder: '结束日期',
    },
    fieldName: 'enterTime',
    label: '录入时间',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'taskStatus',
    label: '任务状态',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'commentStatus',
    label: '评论',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'executorStatus',
    label: '执行人',
  },
  {
    component: 'Select',
    componentProps: {
      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
    },
    fieldName: 'judgmentResultSelect',
    label: '判定结果',
  },
];

export const columns: VxeGridProps['columns'] = [
  {
    title: '客户投诉问题',
    fixed: 'left',
    field: 'customerComplaintIssue',
    minWidth: 130,
  },
  {
    title: '执行人',
    field: 'executor',
    minWidth: 130,
  },
  {
    title: '岗位',
    field: 'position',
    minWidth: 130,
  },
  {
    title: '评论',
    field: 'comment',
    minWidth: 130,
  },
  {
    title: '判定结果',
    field: 'judgmentResult',
    minWidth: 130,
  },
  {
    title: '任务状态',
    field: 'taskStatus',
    minWidth: 130,
  },
  {
    title: '录入人',
    field: 'dataEntryClerk',
    minWidth: 130,
  },
  {
    title: '录入时间',
    field: 'entryTime',
    minWidth: 130,
  },
];
export const mockData = [
  {
    customerComplaintIssue: '油枪跳码频繁，疑似计量不准',
    executor: '王保瑞',
    position: '当班经理',
    comment: '已通知计量员校准，待复测',
    judgmentResult: '属实',
    taskStatus: '处理中',
    dataEntryClerk: '李晴',
    entryTime: '2024-06-01 08:15',
  },
  {
    customerComplaintIssue: '便利店商品价格高于周边',
    executor: '王凯',
    position: '收银员',
    comment: '已做价格对比，准备调价',
    judgmentResult: '部分属实',
    taskStatus: '已完成',
    dataEntryClerk: '张敏',
    entryTime: '2024-06-01 09:30',
  },
  {
    customerComplaintIssue: '卫生间地面湿滑，无警示牌',
    executor: '李威',
    position: '安全员',
    comment: '已放置警示牌并清洁地面',
    judgmentResult: '属实',
    taskStatus: '已完成',
    dataEntryClerk: '刘洋',
    entryTime: '2024-06-01 10:45',
  },
  {
    customerComplaintIssue: '充电桩接地电阻偏高',
    executor: '刘洋',
    position: '电工',
    comment: '已安排复检，等待结果',
    judgmentResult: '属实',
    taskStatus: '处理中',
    dataEntryClerk: '王保瑞',
    entryTime: '2024-06-01 11:00',
  },
  {
    customerComplaintIssue: '小票打印机不出纸',
    executor: '张敏',
    position: '收银员',
    comment: '已更换纸卷并测试正常',
    judgmentResult: '不属实',
    taskStatus: '已完成',
    dataEntryClerk: '李晴',
    entryTime: '2024-06-01 12:20',
  },
];
