|
@@ -0,0 +1,214 @@
|
|
|
+import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
|
+import { requestMagicApi } from '/@/api/magicApi';
|
|
|
+import { getDataOption } from '/@/api/system/dic';
|
|
|
+const statusMap = {
|
|
|
+ 1: '待发布',
|
|
|
+ 2: '已发布',
|
|
|
+ 3: '已过期',
|
|
|
+};
|
|
|
+export const tableColumns: BasicColumn[] = [
|
|
|
+ {
|
|
|
+ title: '计划名称',
|
|
|
+ dataIndex: 'name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '招生类型',
|
|
|
+ dataIndex: 'semesterName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '招生年级',
|
|
|
+ dataIndex: 'assessmentAddress',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '招生工作起始日期',
|
|
|
+ dataIndex: 'behaviorCategoryName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总的招生专业方向个数',
|
|
|
+ dataIndex: 'assessmentDate',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总计划招生人数',
|
|
|
+ dataIndex: 'assessmentUserName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '状态',
|
|
|
+ dataIndex: 'status',
|
|
|
+ customRender({ text }) {
|
|
|
+ return statusMap[text];
|
|
|
+ },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const searchForm: FormSchema[] = [
|
|
|
+ {
|
|
|
+ field: 'name',
|
|
|
+ label: '招生计划名称',
|
|
|
+ component: 'Input',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'gradeId',
|
|
|
+ label: '年级',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ componentProps: ({}) => {
|
|
|
+ return {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: requestMagicApi,
|
|
|
+ params: { url: 'baseData/grade/option' },
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ colProps: { span: 8 },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const formSchema: FormSchema[] = [
|
|
|
+ {
|
|
|
+ field: 'name',
|
|
|
+ label: '招生计划名称',
|
|
|
+ component: 'Input',
|
|
|
+ colProps: { span: 24 },
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'type',
|
|
|
+ label: '招生类型',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: getDataOption,
|
|
|
+ params: { code: 'enroll_type' },
|
|
|
+ },
|
|
|
+ colProps: { span: 24 },
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'gradeId',
|
|
|
+ label: '招生年级',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ required: true,
|
|
|
+ componentProps: ({}) => {
|
|
|
+ return {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: requestMagicApi,
|
|
|
+ params: { url: 'baseData/grade/option' },
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ colProps: { span: 24 },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'startDate',
|
|
|
+ label: '招生工作开始时间',
|
|
|
+ component: 'DatePicker',
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ format: 'YYYY-MM-DD',
|
|
|
+ valueFormat: 'YYYY-MM-DD',
|
|
|
+ },
|
|
|
+ colProps: { span: 24 },
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'endDate',
|
|
|
+ label: '招生工作结束时间',
|
|
|
+ component: 'DatePicker',
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ format: 'YYYY-MM-DD',
|
|
|
+ valueFormat: 'YYYY-MM-DD',
|
|
|
+ },
|
|
|
+ colProps: { span: 24 },
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const planTableColumns: BasicColumn[] = [
|
|
|
+ {
|
|
|
+ title: '专业方向名称',
|
|
|
+ dataIndex: 'name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所属校区',
|
|
|
+ dataIndex: 'semesterName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所属专业部',
|
|
|
+ dataIndex: 'm',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '层级',
|
|
|
+ dataIndex: 'level',
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const maintenanceSearchFormSchema: FormSchema[] = [
|
|
|
+ {
|
|
|
+ field: 'orgId',
|
|
|
+ label: '专业部',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: requestMagicApi,
|
|
|
+ params: { url: '/educational/six-dept-ooas/option' },
|
|
|
+ },
|
|
|
+ colProps: { span: 8 },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'name',
|
|
|
+ label: '专业方向名称',
|
|
|
+ component: 'Input',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const maintenanceTableColumns: BasicColumn[] = [
|
|
|
+ {
|
|
|
+ title: '层次',
|
|
|
+ dataIndex: 'level',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '招生专业方向名称',
|
|
|
+ dataIndex: 'name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所属校区',
|
|
|
+ dataIndex: 'orgName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所属专业部',
|
|
|
+ dataIndex: 'orgName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '招生毕业中学数',
|
|
|
+ dataIndex: 'number',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '专业方向计划招生人数',
|
|
|
+ dataIndex: 'sum',
|
|
|
+ slots: { customRender: 'sum' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '专业方向最大招生人数',
|
|
|
+ dataIndex: 'maxSum',
|
|
|
+ slots: { customRender: 'maxSum' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ slots: { customRender: 'action' },
|
|
|
+ },
|
|
|
+];
|