Jelajahi Sumber

fix: change student

DESKTOP-USV654P\pc 1 Minggu lalu
induk
melakukan
6fc1dc168a

+ 1 - 1
Makefile

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

+ 5 - 1
src/views/educational/class/components/ClassGroup.vue

@@ -40,10 +40,14 @@
         emit('select', { id: e.node.id, type: e.node.treeType });
       }
 
+      const clearSelected = () => {
+        selectedKeys.value = [];
+      };
+
       onMounted(() => {
         fetch();
       });
-      return { treeData, handleSelect, selectedKeys, t };
+      return { treeData, handleSelect, selectedKeys, t, clearSelected };
     },
   });
 </script>

+ 17 - 3
src/views/educational/stdudentBaseManager/index.vue

@@ -1,6 +1,6 @@
 <template>
   <PageWrapper dense fixedHeight contentFullHeight contentClass="flex">
-    <ClassTree class="w-1/3 xl:w-1/4" @select="handleChange" />
+    <ClassTree ref="classTreeRef" class="w-1/3 xl:w-1/4" @select="handleChange" />
     <BasicTable
       class="w-3/4 xl:w-4/5"
       @register="registerTable"
@@ -92,7 +92,6 @@
   import { useMessage } from '/@/hooks/web/useMessage';
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useRouter } from 'vue-router';
-  import { PrintButton } from '/@/enums/printEnum';
   import stdudentBaseManagerDrawer from './components/stdudentBaseManagerDrawer.vue';
   import { useDrawer } from '/@/components/Drawer';
   import { columns, searchFormSchema } from './components/config';
@@ -107,9 +106,11 @@
 
   import ExportTool from '/@/views/export/template/components/tool.vue';
   import { useLoading } from '/@/components/Loading';
+  import { set } from 'nprogress';
 
   const exportToolRef = ref<ElRef>(null);
   const searchInfo = reactive<Recordable>({});
+  const classTreeRef = ref<ElRef>(null);
 
   const handelExportClick = (type) => {
     // if (searchInfo.treeType !== 4) {
@@ -162,7 +163,6 @@
     exportToolRef.value?.open(data);
   };
 
-  onMounted(async () => {});
   const { notification, createMessage } = useMessage();
   const { t } = useI18n();
   defineEmits(['register']);
@@ -212,6 +212,20 @@
     customRow,
   });
 
+  onMounted(async () => {
+    setTimeout(() => {
+      getForm().updateSchema({
+        field: 'gradeId',
+        componentProps: {
+          onChange: (value) => {
+            if (value) {
+              classTreeRef.value?.clearSelected();
+            }
+          },
+        },
+      });
+    }, 500);
+  });
   function handleAdd() {
     openDrawer(true, {
       isUpdate: false,