|
@@ -0,0 +1,176 @@
|
|
|
+import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
|
+
|
|
|
+import { requestMagicApi } from '/@/api/magicApi';
|
|
|
+import { getClassOption } from '/@/api/userMagic';
|
|
|
+import { getExamPlanPlanList } from '/@/services/apis/ExamPlanController';
|
|
|
+
|
|
|
+export const tableColumns: BasicColumn[] = [
|
|
|
+ {
|
|
|
+ title: '考试学期',
|
|
|
+ dataIndex: 'semesterName',
|
|
|
+ align: 'left',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '考试计划',
|
|
|
+ dataIndex: 'examPlanName',
|
|
|
+ align: 'left',
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '科目',
|
|
|
+ dataIndex: 'milexamnames',
|
|
|
+ align: 'left',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '班级',
|
|
|
+ dataIndex: 'milexamnames',
|
|
|
+ align: 'left',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '录入时间',
|
|
|
+ dataIndex: 'milexamnames',
|
|
|
+ align: 'left',
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '录入人',
|
|
|
+ dataIndex: 'milexamnames',
|
|
|
+ align: 'left',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const searchFormSchema: FormSchema[] = [
|
|
|
+ {
|
|
|
+ field: 'semesterId',
|
|
|
+ label: '学期',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: requestMagicApi,
|
|
|
+ params: {
|
|
|
+ url: '/baseData/semester/option',
|
|
|
+ },
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'examPlanId',
|
|
|
+ label: '计划',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: getExamPlanPlanList,
|
|
|
+ valueField: 'id',
|
|
|
+ labelField: 'name',
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'courseName',
|
|
|
+ label: '科目',
|
|
|
+ component: 'Input',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'classId',
|
|
|
+ label: '班级',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ colProps: { span: 8 },
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: getClassOption,
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+export const formSchema: FormSchema[] = [
|
|
|
+ {
|
|
|
+ label: '学期',
|
|
|
+ field: 'semesterId',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ required: true,
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: requestMagicApi,
|
|
|
+ params: {
|
|
|
+ url: '/baseData/semester/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: 'examPlanId',
|
|
|
+ label: '考试计划',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ required: true,
|
|
|
+ colProps: { span: 24 },
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: getExamPlanPlanList,
|
|
|
+ valueField: 'id',
|
|
|
+ labelField: 'name',
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'courseName',
|
|
|
+ label: '科目',
|
|
|
+ component: 'Input',
|
|
|
+ required: true,
|
|
|
+ colProps: { span: 24 },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'classIds',
|
|
|
+ label: '班级',
|
|
|
+ component: 'ApiSelect',
|
|
|
+ required: true,
|
|
|
+ colProps: { span: 24 },
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: getClassOption,
|
|
|
+ mode: 'multiple',
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+];
|