Browse Source

fix: change basicInformation

DESKTOP-USV654P\pc 5 days ago
parent
commit
59cd840eb8

+ 1 - 1
Makefile

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

+ 1 - 1
src/services/apis/BaseNewStudentController.ts

@@ -27,7 +27,7 @@ export async function postBaseNewStudentActiveAccount(params:API.ActiveAccountDt
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/student/baseNewStudent/active-account', data:params},{errorMessageMode:mode});}
 /** 修改分班状态 POST /student/baseNewStudent/change-banding-status */
-export async function postBaseNewStudentChangeBandingStatus(params:API.ChangeBandingStatusDto
+export async function postBaseNewStudentChangeBandingStatus(params:API.ChangeBandingStatusDto[]
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/student/baseNewStudent/change-banding-status', data:params},{errorMessageMode:mode});}
 /** 删除新生(保留新生信息,删除基础信息) DELETE /student/baseNewStudent/deleteByUserIds */

+ 14 - 6
src/views/educational/basicInformation/components/editState.vue

@@ -77,15 +77,23 @@
     try {
       const values = await validate();
       setModalProps({ confirmLoading: true });
-      const postParams = {
-        id: unref(modelRef).id,
-        isCanBanding: unref(modelRef).isCanBanding === 0 ? 1 : 0,
-        remarks: values.remarks,
-      };
+      const postParams: Recordable[] = [];
       if (unref(isUpdate)) {
+        unref(modelRef).data.forEach((item) => {
+          postParams.push({
+            id: item.id,
+            isCanBanding: values.isCanBanding,
+            remarks: values.remarks,
+          });
+        });
       } else {
-        await postBaseNewStudentChangeBandingStatus(postParams);
+        postParams.push({
+          id: unref(modelRef).id,
+          isCanBanding: unref(modelRef).isCanBanding === 0 ? 1 : 0,
+          remarks: values.remarks,
+        });
       }
+      await postBaseNewStudentChangeBandingStatus(postParams);
 
       createMessage.success('操作成功');
       closeModal();