瀏覽代碼

fix: change bedRoomManager adjust

DESKTOP-USV654P\pc 2 月之前
父節點
當前提交
f9368f3c77
共有 2 個文件被更改,包括 29 次插入8 次删除
  1. 1 1
      Makefile
  2. 28 7
      src/views/bedRoomManager/adjust/data.config.ts

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change textbookSubscription"
+	git commit --no-verify -m "fix: change bedRoomManager adjust"
 
 checkPre:
 	git checkout pre

+ 28 - 7
src/views/bedRoomManager/adjust/data.config.ts

@@ -20,6 +20,12 @@ export const formStudentSchema: FormSchema[] = [
     },
     colProps: { span: 12 },
   },
+  {
+    field: 'studentName',
+    label: '姓名',
+    component: 'Input',
+    colProps: { span: 12 },
+  },
   {
     label: '行政班',
     field: 'classId',
@@ -29,9 +35,16 @@ export const formStudentSchema: FormSchema[] = [
         getPopupContainer: () => document.body,
         api: requestMagicApi,
         params: { url: `educational/class/gradeid?grade_id=${formModel.gradeId}` },
+        showSearch: true,
+        filterOption: (input: string, option: any) => {
+          return (
+            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+            option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+          );
+        },
       };
     },
-    colProps: { span: 12 },
+    colProps: { span: 24 },
   },
   {
     label: '性别',
@@ -57,12 +70,6 @@ export const formStudentSchema: FormSchema[] = [
     },
     colProps: { span: 12 },
   },
-  {
-    field: 'studentName',
-    label: '姓名',
-    component: 'Input',
-    colProps: { span: 12 },
-  },
 ];
 
 const DataList = await requestMagicApi({ url: 'baseData/dormitory/info' } as any);
@@ -93,6 +100,13 @@ export const formRoomSchema: FormSchema[] = [
           return { label: item.officeBuildName, value: item.officeBuildId };
         }),
         params: { url: 'baseData/dormitory/info' },
+        showSearch: true,
+        filterOption: (input: string, option: any) => {
+          return (
+            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+            option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+          );
+        },
         onChange: (e) => {
           if (!e) {
             formModel.floorNumber = undefined;
@@ -172,6 +186,13 @@ export const formRoomSchema: FormSchema[] = [
       api: requestMagicApi,
       params: { url: 'educational/class/option' },
       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: 8 },
   },