Browse Source

feat:修改课时删除

DESKTOP-USV654P\pc 4 months ago
parent
commit
f1b5507f8b
1 changed files with 26 additions and 12 deletions
  1. 26 12
      src/views/course/erasure/data.config.ts

+ 26 - 12
src/views/course/erasure/data.config.ts

@@ -11,18 +11,18 @@ export const enabledOptions: BasicOptionModel[] = [
 ];
 
 export const timeOptions: BasicOptionModel[] = [
-  { label: '早自习', value: 0 },
-  { label: '上1', value: 1 },
-  { label: '上2', value: 2 },
-  { label: '上3', value: 3 },
-  { label: '上4', value: 4 },
-  { label: '下1', value: 5 },
-  { label: '下2', value: 6 },
-  { label: '下3', value: 7 },
-  { label: '下4', value: 8 },
-  { label: '晚1', value: 9 },
-  { label: '晚2', value: 10 },
-  { label: '晚3', value: 11 },
+  { label: '早自习', value: 1 },
+  { label: '上1', value: 2 },
+  { label: '上2', value: 3 },
+  { label: '上3', value: 4 },
+  { label: '上4', value: 5 },
+  { label: '下1', value: 6 },
+  { label: '下2', value: 7 },
+  { label: '下3', value: 8 },
+  { label: '下4', value: 9 },
+  { label: '晚1', value: 10 },
+  { label: '晚2', value: 11 },
+  { label: '晚3', value: 12 },
 ];
 
 export const tableColumns: BasicColumn[] = [
@@ -111,6 +111,13 @@ export const searchFormSchema: FormSchema[] = [
     componentProps: {
       api: requestMagicApi,
       params: { url: 'educational/class/option' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
       getPopupContainer: () => document.body,
     },
     ifShow: false,
@@ -142,6 +149,13 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       api: requestMagicApi,
       params: { url: 'educational/class/option' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
       getPopupContainer: () => document.body,
     },
   },