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

export const columns: BasicColumn[] = [
  {
    title: '学校ID',
    align: 'center',
    dataIndex: 'schoolId',
  },
  {
    title: '年份',
    align: 'center',
    dataIndex: 'year',
  },
  {
    title: '省份',
    align: 'center',
    dataIndex: 'province',
  },
  {
    title: '计划内容',
    align: 'center',
    dataIndex: 'planContent',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    label: '学校ID',
    field: 'schoolId',
    component: 'InputNumber',
    colProps: { span: 6 },
  },
  {
    label: '年份',
    field: 'year',
    component: 'InputNumber',
    colProps: { span: 6 },
  },
  {
    label: '省份',
    field: 'province',
    component: 'Input',
    colProps: { span: 6 },
  },
];

export const formSchema: FormSchema[] = [
  {
    label: '学校ID',
    field: 'schoolId',
    component: 'InputNumber',
    required: true,
  },
  {
    label: '年份',
    field: 'year',
    component: 'InputNumber',
    required: true,
  },
  {
    label: '省份',
    field: 'province',
    component: 'Input',
  },
  {
    label: '计划内容',
    field: 'planContent',
    component: 'InputTextArea',
    componentProps: {
      rows: 6,
    },
  },
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

export function getBpmFormSchema(_formData): FormSchema[] {
  return formSchema;
}

