import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';

/**
 * 搜索表单配置
 */
export const queryFormSchema: FormSchemaGetter = () => [
  {
    component: 'Input',
    fieldName: 'examName',
    label: '考卷名称',
    componentProps: {
      placeholder: '请输入考卷名称',
    },
  },
];

/**
 * 表格列配置
 */
export const tableColumns: VxeGridProps['columns'] = [
  {
    type: 'seq',
    title: '序号',
    width: 80,
    align: 'center',
  },
  {
    field: 'examRule',
    title: '考卷规则',
    width: 120,
    align: 'center',
  },
  {
    field: 'examName',
    title: '考卷名称',
    minWidth: 200,
    align: 'center',
  },
  {
    field: 'corrector',
    title: '批改人',
    width: 100,
    align: 'center',
  },
  {
    field: 'correctTime',
    title: '批改时间',
    width: 160,
    align: 'center',
  },
  {
    field: 'score',
    title: '得分',
    width: 80,
    align: 'center',
  },
  {
    field: 'action',
    title: '操作',
    width: 100,
    align: 'center',
    fixed: 'right',
    slots: { default: 'action' },
  },
];
