import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';

export const formSchemas: FormSchema[] = [
  {
    label: '注册代码',
    field: 'registerCode',

    component: 'Input',
  },
  {
    label: '电梯名称',
    field: 'elevatorName',

    component: 'Input',
  },
  {
    label: '电梯编号',
    field: 'elevatorNum',

    component: 'Input',
  },
  {
    label: '终端编号',
    field: 'deviceCode',

    component: 'Input',
  },
  {
    label: '故障名称',
    field: 'faultName',

    component: 'Input',
  },
  {
    label: '创建日期起',
    field: 'startDate',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      format: 'YYYY-MM-DD ',
      valueFormat: 'YYYY-MM-DD',
    },
  },
  {
    label: '创建日期止',
    field: 'endDate',
    componentProps: {
      showTime: true,
      format: 'YYYY-MM-DD ',
      valueFormat: 'YYYY-MM-DD',
    },

    component: 'DatePicker',
  },
  {
    label: '物业单位',
    field: 'tenementName',

    component: 'Input',
  },
];

export const columns: BasicColumn[] = [
  {
    title: '注册代码',
    dataIndex: 'registerCode',
  },
  {
    title: '电梯名称',
    dataIndex: 'elevatorName',
  },
  {
    title: '电梯编号',
    dataIndex: 'elevatorNum',
  },
  {
    title: '终端编号',
    dataIndex: 'deviceCode',
  },
  {
    title: '物业单位',
    dataIndex: 'tenementName',
  },
  {
    title: '维保单位',
    dataIndex: 'maintenanceName',
  },
  {
    title: '故障名称',
    dataIndex: 'faultName',
  },
  {
    title: '故障数量',
    dataIndex: 'faultNum',
  },
];

export const modalSchemas: FormSchema[] = [
  {
    label: '主键id',
    field: 'id',
    required: false,
    component: 'Input',
    show: false,
  },
  {
    label: '注册代码',
    field: 'registerCode',

    component: 'Input',
  },
  {
    label: '电梯名称',
    field: 'elevatorName',

    component: 'Input',
  },
  {
    label: '电梯编号',
    field: 'elevatorNum',

    component: 'Input',
  },
  {
    label: '终端编号',
    field: 'deviceCode',

    component: 'Input',
  },
  {
    label: '故障名称',
    field: 'faultName',

    component: 'Input',
  },

  {
    label: '物业单位',
    field: 'tenementName',

    component: 'Input',
  },
];
