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

export const formSchemas: FormSchema[] = [
  {
    label: '电梯名称',
    field: 'elevatorName',

    component: 'Input',
  },
  {
    label: '电梯地址',
    field: 'elevatorAddress',

    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',
  },
];

export const columns: BasicColumn[] = [
  {
    title: '电梯名称',
    dataIndex: 'elevatorName',
  },
  {
    title: '设备编号',
    dataIndex: 'deviceCode',
  },
  {
    title: '开关门次数',
    dataIndex: 'openCloseNum',
  },
  {
    title: '上行次数',
    dataIndex: 'upNum',
  },
  {
    title: '下行次数',
    dataIndex: 'downNum',
  },
  {
    title: '运行里程数',
    dataIndex: 'mileage',
  },
  {
    title: '停站次数',
    dataIndex: 'stopStationNum',
  },
];

export const modalSchemas: FormSchema[] = [
  {
    label: '主键id',
    field: 'id',
    required: false,
    component: 'Input',
    show: false,
  },
  {
    label: '电梯名称',
    field: 'elevatorName',
    required: false,
    component: 'Input',
  },
  {
    label: '开关门次数',
    field: 'openCloseNum',
    required: false,
    component: 'Input',
  },
  {
    label: '上行次数',
    field: 'upNum',
    required: false,
    component: 'Input',
  },
  {
    label: '下行次数',
    field: 'downNum',
    required: false,
    component: 'Input',
  },
  {
    label: '运行里程数',
    field: 'mileage',
    required: false,
    component: 'Input',
  },
  {
    label: '停站次数',
    field: 'stopStationNum',
    required: false,
    component: 'Input',
  },
];
