data.config.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import { BasicColumn, FormSchema } from '/@/components/Table';
  2. import { getDataOption } from '/@/api/system/dic';
  3. import { requestMagicApi } from '/@/api/magicApi';
  4. export const tableColumns: BasicColumn[] = [
  5. // {
  6. // title: '招生名称',
  7. // dataIndex: 'name',
  8. // align: 'left',
  9. // },
  10. {
  11. title: '年级',
  12. dataIndex: 'gradeName',
  13. align: 'left',
  14. // width: 100,
  15. },
  16. {
  17. title: '招生类型',
  18. dataIndex: 'enrollTypeCn',
  19. align: 'left',
  20. width: 100,
  21. },
  22. {
  23. title: '已录取人数',
  24. dataIndex: 'ab',
  25. align: 'left',
  26. width: 100,
  27. },
  28. {
  29. title: '已分班人数',
  30. dataIndex: 'abc',
  31. align: 'left',
  32. width: 100,
  33. },
  34. ];
  35. export const searchFormSchema: FormSchema[] = [
  36. // {
  37. // field: 'name',
  38. // label: '招生名称',
  39. // component: 'Input',
  40. // colProps: { span: 8 },
  41. // },
  42. {
  43. field: 'enrollType',
  44. label: '招生类型',
  45. component: 'ApiSelect',
  46. colProps: { span: 8 },
  47. componentProps: {
  48. getPopupContainer: () => document.body,
  49. api: getDataOption,
  50. params: { code: 'enroll_type' },
  51. },
  52. },
  53. ];
  54. export const formSchema: FormSchema[] = [
  55. {
  56. label: '所属年级',
  57. field: 'gradeId',
  58. component: 'ApiSelect',
  59. required: true,
  60. componentProps: {
  61. getPopupContainer: () => document.body,
  62. api: requestMagicApi,
  63. params: { url: 'baseData/grade/option' },
  64. },
  65. colProps: { span: 24 },
  66. },
  67. {
  68. label: '招生类型',
  69. field: 'enrollType',
  70. component: 'ApiSelect',
  71. required: true,
  72. componentProps: {
  73. getPopupContainer: () => document.body,
  74. api: getDataOption,
  75. params: { code: 'enroll_type' },
  76. },
  77. colProps: { span: 24 },
  78. },
  79. ];