Browse Source

fix: change banding task

DESKTOP-USV654P\pc 6 days ago
parent
commit
d7c75bcd67

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change basicInformation"
+	git commit --no-verify -m "fix: change banding task"
 
 checkPre:
 	git checkout pre

+ 8 - 1
src/views/educational/division/components/adjust.vue

@@ -36,7 +36,7 @@
   const modelRef = ref<Recordable[]>([]);
   const emit = defineEmits(['success', 'register']);
   const { createMessage } = useMessage();
-  const [registerForm, { validate, resetFields, updateSchema }] = useForm({
+  const [registerForm, { validate, resetFields, updateSchema, setFieldsValue }] = useForm({
     labelWidth: 100,
     schemas: form4Schema,
     showActionButtonGroup: false,
@@ -64,6 +64,13 @@
         field: 'bandingTaskClassId',
         componentProps: {
           options: classList,
+          onChange: (value: string) => {
+            const filterItme = taskClassList.find((it) => it.id === value);
+            if (filterItme) {
+              setFieldsValue({ teacherName: filterItme.teacherName });
+              // formModel.teacherName = filterItme.teacherName;
+            }
+          },
         },
       },
     ]);

+ 14 - 2
src/views/educational/division/data.config.ts

@@ -1,4 +1,3 @@
-
 import { requestMagicApi } from '/@/api/magicApi';
 import { getDataOption } from '/@/api/system/dic';
 import { getClassOption, getMajorSetOption } from '/@/api/userMagic';
@@ -398,6 +397,19 @@ export const form4Schema: FormSchema[] = [
       getPopupContainer: () => document.body,
     },
   },
+  {
+    field: 'teacherName',
+    label: '班主任',
+    component: 'Input',
+    colProps: { span: 24 },
+    dynamicDisabled: true,
+  },
+  {
+    field: 'remarks',
+    label: '分班备注',
+    component: 'Input',
+    colProps: { span: 24 },
+  },
 ];
 
 export const table5Columns: BasicColumn[] = [
@@ -618,4 +630,4 @@ export const table6Columns: BasicColumn[] = [
     align: 'left',
     width: 150,
   },
-];
+];