Explorar o código

fix: change banding task

DESKTOP-USV654P\pc hai 14 horas
pai
achega
ec5873838a

+ 10 - 5
src/views/educational/division/components/satisfy.vue

@@ -49,11 +49,16 @@
   });
 
   const handleDelete = async (record: Recordable) => {
-    await postBandingTaskClassRemoveStudent({
-      bandingTaskClassId: modelRef.value.id,
-      newStudentIds: [record.id],
-    });
-    reload();
+    try {
+      setModalProps({ loading: true });
+      await postBandingTaskClassRemoveStudent({
+        bandingTaskClassId: modelRef.value.id,
+        newStudentIds: [record.id],
+      });
+      reload();
+    } finally {
+      setModalProps({ loading: false });
+    }
   };
 
   const handleCancel = () => {

+ 10 - 5
src/views/educational/division/components/surplus.vue

@@ -49,11 +49,16 @@
   });
 
   const handleDelete = async (record: Recordable) => {
-    await postBandingTaskClassInsertStudent({
-      bandingTaskClassId: modelRef.value.id,
-      newStudentIds: [record.id],
-    });
-    reload();
+    try {
+      setModalProps({ loading: true });
+      await postBandingTaskClassInsertStudent({
+        bandingTaskClassId: modelRef.value.id,
+        newStudentIds: [record.id],
+      });
+      reload();
+    } finally {
+      setModalProps({ loading: false });
+    }
   };
 
   const handleCancel = () => {