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

export const formSchemas: FormSchema[] = [
  {
    label: '角色名称',
    field: 'registCode',
    component: 'Input',
  },
];

export const columns: BasicColumn[] = [
  {
    title: '主键id',
    dataIndex: 'id',
    ifShow: false,
  },
  {
    title: '角色名称',
    dataIndex: 'registCode',
  },
  {
    title: '角色类型',
    dataIndex: 'elevatorNum',
  },
  {
    title: '备注',
    dataIndex: 'qrCode',
  },
];

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

  {
    label: '角色名称',
    field: 'elevatorName',
    required: true,
    component: 'Input',
  },
  {
    label: '用户类型',
    field: 'elevatorAddress',
    required: true,
    component: 'Select',
    componentProps: {
      options: getDictOptions('user_type'),
    },
  },

  {
    label: '备注',
    field: 'suggestion',
    required: true,
    component: 'Input',
  },
];
