|
@@ -3,6 +3,8 @@ import { BasicColumn } from '/@/components/Table';
|
|
|
import { getDataOption } from '/@/api/system/dic';
|
|
|
import { getAreaOption, getClassOption, getGradeOption, getMajorSetOption } from '/@/api/userMagic';
|
|
|
import { getDepartmentTree } from '/@/api/system/department';
|
|
|
+import { filterOption } from 'ant-design-vue/lib/vc-mentions/src/util';
|
|
|
+import { requestMagicApi } from '/@/api/magicApi';
|
|
|
|
|
|
export const columns1: BasicColumn[] = [
|
|
|
{
|
|
@@ -349,6 +351,7 @@ export const fromSchema: FormSchema[] = [
|
|
|
field: 'gender',
|
|
|
label: '性别',
|
|
|
component: 'ApiSelect',
|
|
|
+ required: true,
|
|
|
componentProps: {
|
|
|
getPopupContainer: () => document.body,
|
|
|
api: getDataOption,
|
|
@@ -434,7 +437,7 @@ export const fromSchema: FormSchema[] = [
|
|
|
field: 'dayOfBirth',
|
|
|
label: '出生日期',
|
|
|
component: 'DatePicker',
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
componentProps: {
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
},
|
|
@@ -444,7 +447,7 @@ export const fromSchema: FormSchema[] = [
|
|
|
field: 'birthType',
|
|
|
label: '生日类型',
|
|
|
component: 'ApiSelect',
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
componentProps: {
|
|
|
api: () => {
|
|
|
return getDataOption({ code: 'date_type' });
|
|
@@ -456,7 +459,7 @@ export const fromSchema: FormSchema[] = [
|
|
|
field: 'nation',
|
|
|
label: '民族',
|
|
|
component: 'ApiSelect',
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
componentProps: {
|
|
|
api: () => {
|
|
|
return getDataOption({ code: 'nation' });
|
|
@@ -784,7 +787,7 @@ export const fromSchema: FormSchema[] = [
|
|
|
},
|
|
|
{
|
|
|
field: 'departmentIds',
|
|
|
- label: '所属机构',
|
|
|
+ label: '所属部门',
|
|
|
component: 'ApiTreeSelect',
|
|
|
componentProps: {
|
|
|
api: getDepartmentTree,
|
|
@@ -839,13 +842,13 @@ export const schoolRoll: FormSchema[] = [
|
|
|
field: 'rollNumber',
|
|
|
label: '学籍号',
|
|
|
component: 'InputNumber',
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
colProps: { span: 7 },
|
|
|
},
|
|
|
{
|
|
|
field: 'archivesNumber',
|
|
|
label: '学生档案编号',
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
component: 'Input',
|
|
|
colProps: { span: 7 },
|
|
|
},
|
|
@@ -875,10 +878,40 @@ export const schoolRoll: FormSchema[] = [
|
|
|
label: '入学年级',
|
|
|
component: 'ApiSelect',
|
|
|
required: true,
|
|
|
- componentProps: {
|
|
|
- api: () => {
|
|
|
- return getGradeOption();
|
|
|
- },
|
|
|
+ componentProps: ({ formActionType }) => {
|
|
|
+ return {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ api: getGradeOption,
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ onChange: async (vlaue) => {
|
|
|
+ const { updateSchema } = formActionType;
|
|
|
+ const classData = await requestMagicApi({
|
|
|
+ url: 'educational/class-by',
|
|
|
+ query: { grade_id: vlaue },
|
|
|
+ } as any);
|
|
|
+ updateSchema({
|
|
|
+ field: 'classId',
|
|
|
+ component: 'Select',
|
|
|
+ componentProps: {
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ options: classData,
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
colProps: { span: 7 },
|
|
|
},
|
|
@@ -891,7 +924,7 @@ export const schoolRoll: FormSchema[] = [
|
|
|
return getDataOption({ code: 'enroll_type' });
|
|
|
},
|
|
|
},
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
colProps: { span: 7 },
|
|
|
},
|
|
|
{
|
|
@@ -909,6 +942,13 @@ export const schoolRoll: FormSchema[] = [
|
|
|
formModel.studyYear = res.find((item) => item.value === value)?.year;
|
|
|
});
|
|
|
},
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
colProps: { span: 7 },
|
|
@@ -926,8 +966,14 @@ export const schoolRoll: FormSchema[] = [
|
|
|
component: 'ApiSelect',
|
|
|
required: true,
|
|
|
componentProps: {
|
|
|
- api: () => {
|
|
|
- return getClassOption();
|
|
|
+ api: getClassOption,
|
|
|
+ getPopupContainer: () => document.body,
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
},
|
|
|
},
|
|
|
colProps: { span: 7 },
|
|
@@ -944,7 +990,7 @@ export const schoolRoll: FormSchema[] = [
|
|
|
field: 'studentSource',
|
|
|
label: '学生来源',
|
|
|
component: 'ApiSelect',
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
componentProps: {
|
|
|
api: () => {
|
|
|
return getDataOption({ code: 'student_type' });
|
|
@@ -973,6 +1019,13 @@ export const schoolRoll: FormSchema[] = [
|
|
|
api: () => {
|
|
|
return getDataOption({ code: 'archives_status' });
|
|
|
},
|
|
|
+ showSearch: true,
|
|
|
+ filterOption: (input: string, option: any) => {
|
|
|
+ return (
|
|
|
+ option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
|
|
|
+ option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
colProps: { span: 7 },
|
|
|
},
|
|
@@ -980,7 +1033,7 @@ export const schoolRoll: FormSchema[] = [
|
|
|
field: 'learnStatus',
|
|
|
label: '学习形式',
|
|
|
component: 'ApiSelect',
|
|
|
- required: true,
|
|
|
+ // required: true,
|
|
|
componentProps: {
|
|
|
api: () => {
|
|
|
return getDataOption({ code: 'roll_modality' });
|