Browse Source

feat:修改教职工添加时loading

DESKTOP-USV654P\pc 8 months ago
parent
commit
426821fec7
31 changed files with 2002 additions and 371 deletions
  1. 34 0
      src/services/apis/BandingRuleController.ts
  2. 61 0
      src/services/apis/BandingTaskClassController.ts
  3. 46 0
      src/services/apis/BandingTaskController.ts
  4. 21 0
      src/services/apis/BandingTaskMajorConditionController.ts
  5. 2 2
      src/services/apis/ConsumptionController.ts
  6. 2 2
      src/services/apis/FormExecuteController.ts
  7. 2 2
      src/services/apis/RoomBedAdjustController.ts
  8. 2 2
      src/services/apis/SystemUpdateMessageController.ts
  9. 1 1
      src/services/apis/WfSubscriptionController.ts
  10. 12 0
      src/services/apis/index.ts
  11. 331 7
      src/services/typing.d.ts
  12. 83 0
      src/views/educational/banding/task/data.config.ts
  13. 46 0
      src/views/educational/banding/task/division.vue
  14. 76 0
      src/views/educational/banding/task/edit.vue
  15. 118 0
      src/views/educational/banding/task/index.vue
  16. 84 50
      src/views/educational/division/components/DsionStep1.vue
  17. 96 33
      src/views/educational/division/components/DsionStep2.vue
  18. 74 7
      src/views/educational/division/components/DsionStep3.vue
  19. 56 7
      src/views/educational/division/components/DsionStep4.vue
  20. 25 1
      src/views/educational/division/components/DsionStep5.vue
  21. 93 0
      src/views/educational/division/components/DsionStep6.vue
  22. 59 0
      src/views/educational/division/components/adjust.vue
  23. 94 0
      src/views/educational/division/components/import.vue
  24. 85 0
      src/views/educational/division/components/satisfy.vue
  25. 85 0
      src/views/educational/division/components/surplus.vue
  26. 169 28
      src/views/educational/division/data.config.ts
  27. 43 9
      src/views/educational/division/index.vue
  28. 52 96
      src/views/educational/enrollment/components/data.config.ts
  29. 61 39
      src/views/educational/enrollment/components/edit.vue
  30. 25 26
      src/views/educational/enrollment/index.vue
  31. 64 59
      src/views/educational/teacherbasemanager/components/TeacherbaseManagerDrawer.vue

+ 34 - 0
src/services/apis/BandingRuleController.ts

@@ -0,0 +1,34 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Banding Rule Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增新生分班规则 POST /banding/bandingRule */
+export async function postBandingBandingRule(params:API.AddBandingRuleDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingRule', data:params},{errorMessageMode:mode});}
+/** 修改新生分班规则 PUT /banding/bandingRule */
+export async function putBandingBandingRule(params:API.UpdateBandingRuleDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/banding/bandingRule', data:params},{errorMessageMode:mode});}
+/** 删除新生分班规则 DELETE /banding/bandingRule */
+export async function deleteBandingBandingRule(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/banding/bandingRule', data:params},{errorMessageMode:mode});}
+/** 导入 POST /banding/bandingRule/import */
+export async function postBandingRuleImport(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingRule/import',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
+/** 根据id查询新生分班规则信息 GET /banding/bandingRule/info */
+export async function getBandingRuleInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingRuleVo>
+        ({url: '/banding/bandingRule/info', params:params},{errorMessageMode:mode});}
+/** 新生分班规则列表(分页) GET /banding/bandingRule/page */
+export async function getBandingRulePage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.BandingRulePageVo>>
+        ({url: '/banding/bandingRule/page', params:params},{errorMessageMode:mode});}
+            

+ 61 - 0
src/services/apis/BandingTaskClassController.ts

@@ -0,0 +1,61 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Banding Task Class Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增新生分班 POST /banding/bandingTaskClass */
+export async function postBandingBandingTaskClass(params:API.AddBandingTaskClassDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskClass', data:params},{errorMessageMode:mode});}
+/** 修改新生分班 PUT /banding/bandingTaskClass */
+export async function putBandingBandingTaskClass(params:API.UpdateBandingClassDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/banding/bandingTaskClass', data:params},{errorMessageMode:mode});}
+/** 删除新生分班 DELETE /banding/bandingTaskClass */
+export async function deleteBandingBandingTaskClass(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/banding/bandingTaskClass', data:params},{errorMessageMode:mode});}
+/** 调整班级 POST /banding/bandingTaskClass/change-class */
+export async function postBandingTaskClassChangeClass(params:API.ChangeClassDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskClass/change-class', data:params},{errorMessageMode:mode});}
+/** 分班后的学生列表 GET /banding/bandingTaskClass/class-student */
+export async function getBandingTaskClassClassStudent(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskClassPageVo[]>
+        ({url: '/banding/bandingTaskClass/class-student', params:params},{errorMessageMode:mode});}
+/** 分班确认列表 GET /banding/bandingTaskClass/class-sure */
+export async function getBandingTaskClassClassSure(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskClassPageVo[]>
+        ({url: '/banding/bandingTaskClass/class-sure', params:params},{errorMessageMode:mode});}
+/** 导入 POST /banding/bandingTaskClass/import */
+export async function postBandingTaskClassImport(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskClass/import',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
+/** 根据id查询新生分班任务信息 GET /banding/bandingTaskClass/info */
+export async function getBandingTaskClassInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskClassVo>
+        ({url: '/banding/bandingTaskClass/info', params:params},{errorMessageMode:mode});}
+/** 移入学生 POST /banding/bandingTaskClass/insert-student */
+export async function postBandingTaskClassInsertStudent(params:API.ChangeClassDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskClass/insert-student', data:params},{errorMessageMode:mode});}
+/** 新生分班任务班级配置列表 GET /banding/bandingTaskClass/list */
+export async function getBandingTaskClassList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskClassPageVo[]>
+        ({url: '/banding/bandingTaskClass/list', params:params},{errorMessageMode:mode});}
+/** 移出学生 POST /banding/bandingTaskClass/remove-student */
+export async function postBandingTaskClassRemoveStudent(params:API.ChangeClassDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskClass/remove-student', data:params},{errorMessageMode:mode});}
+/** 重置功能 POST /banding/bandingTaskClass/reset */
+export async function postBandingTaskClassReset(params:string,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskClass/reset', data:params},{errorMessageMode:mode});}
+/** 满足学生 GET /banding/bandingTaskClass/satisfy-student */
+export async function getBandingTaskClassSatisfyStudent(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageInput[]>
+        ({url: '/banding/bandingTaskClass/satisfy-student', params:params},{errorMessageMode:mode});}
+/** 剩余学生 GET /banding/bandingTaskClass/surplus-student */
+export async function getBandingTaskClassSurplusStudent(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageInput[]>
+        ({url: '/banding/bandingTaskClass/surplus-student', params:params},{errorMessageMode:mode});}
+            

+ 46 - 0
src/services/apis/BandingTaskController.ts

@@ -0,0 +1,46 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Banding Task Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增新生分班任务 POST /banding/bandingTask */
+export async function postBandingBandingTask(params:API.AddBandingTaskDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTask', data:params},{errorMessageMode:mode});}
+/** 修改新生分班任务 PUT /banding/bandingTask */
+export async function putBandingBandingTask(params:API.UpdateBandingTaskDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/banding/bandingTask', data:params},{errorMessageMode:mode});}
+/** 删除新生分班任务 DELETE /banding/bandingTask */
+export async function deleteBandingBandingTask(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/banding/bandingTask', data:params},{errorMessageMode:mode});}
+/** 自动分班 POST /banding/bandingTask/automatic-banding */
+export async function postBandingTaskAutomaticBanding(params:API.AutomaticBandingTaskDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTask/automatic-banding', data:params},{errorMessageMode:mode});}
+/** 根据id查询新生分班任务信息 GET /banding/bandingTask/info */
+export async function getBandingTaskInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskVo>
+        ({url: '/banding/bandingTask/info', params:params},{errorMessageMode:mode});}
+/** 新生分班任务列表(分页) GET /banding/bandingTask/page */
+export async function getBandingTaskPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.BandingTaskPageVo>>
+        ({url: '/banding/bandingTask/page', params:params},{errorMessageMode:mode});}
+/** 查询所有规则 GET /banding/bandingTask/rule-list */
+export async function getBandingTaskRuleList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskRuleVo[]>
+        ({url: '/banding/bandingTask/rule-list', params:params},{errorMessageMode:mode});}
+/** 设置规则 POST /banding/bandingTask/set-rule */
+export async function postBandingTaskSetRule(params:API.AddBandingTaskRuleDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTask/set-rule', data:params},{errorMessageMode:mode});}
+/** 确认分班 POST /banding/bandingTask/sure */
+export async function postBandingTaskSure(params:API.SureBandingTaskDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTask/sure', data:params},{errorMessageMode:mode});}
+            

+ 21 - 0
src/services/apis/BandingTaskMajorConditionController.ts

@@ -0,0 +1,21 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Banding Task Major Condition Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 专业限制条件列表 GET /banding/bandingTaskMajorCondition/list */
+export async function getBandingTaskMajorConditionList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskMajorConditionListVo[]>
+        ({url: '/banding/bandingTaskMajorCondition/list', params:params},{errorMessageMode:mode});}
+/** 保存 POST /banding/bandingTaskMajorCondition/save */
+export async function postBandingTaskMajorConditionSave(params:API.SaveMajorConditionDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskMajorCondition/save', data:params},{errorMessageMode:mode});}
+            

+ 2 - 2
src/services/apis/ConsumptionController.ts

@@ -12,7 +12,7 @@ import { ErrorMessageMode } from '/#/axios';
 
 
             /** 班级欠费排序-导出 POST /student/consumption/class-qf-export-query */
-export async function postConsumptionClassQfExportQuery(params:API.PageInput
+export async function postConsumptionClassQfExportQuery(params:API.PageInput_1
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/student/consumption/class-qf-export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 班级欠费排序 GET /student/consumption/class-qf-page */
@@ -25,7 +25,7 @@ export async function getConsumptionCostInformation(params:any,mode: ErrorMessag
 export async function getConsumptionDetailPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.PbVXssfdetailPageVo>>
         ({url: '/student/consumption/detail-page', params:params},{errorMessageMode:mode});}
 /** 有参导出 POST /student/consumption/export-query */
-export async function postConsumptionExportQuery(params:API.PageInput_1
+export async function postConsumptionExportQuery(params:API.PageInput_2
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/student/consumption/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 学生缴费的详情 GET /student/consumption/fee-detail */

+ 2 - 2
src/services/apis/FormExecuteController.ts

@@ -32,7 +32,7 @@ export async function postAppList(params:API.AppFormExecuteListDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/form/execute/app/list', data:params},{errorMessageMode:mode});}
 /** App 自定义表单根据配置获取列表数据 分页 POST /form/execute/app/page */
-export async function postAppPage(params:API.PageInput_2
+export async function postAppPage(params:API.PageInput_3
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/form/execute/app/page', data:params},{errorMessageMode:mode});}
 /** app 修改 POST /form/execute/app/update */
@@ -62,7 +62,7 @@ export async function postExecuteList(params:API.FormExecuteListDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/form/execute/list', data:params},{errorMessageMode:mode});}
 /** 自定义表单根据配置获取列表数据 分页 POST /form/execute/page */
-export async function postExecutePage(params:API.PageInput_3
+export async function postExecutePage(params:API.PageInput_4
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/form/execute/page', data:params},{errorMessageMode:mode});}
 /** 修改 POST /form/execute/update */

+ 2 - 2
src/services/apis/RoomBedAdjustController.ts

@@ -12,14 +12,14 @@ import { ErrorMessageMode } from '/#/axios';
 
 
             /** 修改学生的寝室床位 PUT /room/roomBedAdjust */
-export async function putRoomRoomBedAdjust(params:API.PageInput_4
+export async function putRoomRoomBedAdjust(params:API.PageInput_5
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
         ({url: '/room/roomBedAdjust', data:params},{errorMessageMode:mode});}
 /** 批量移出学生 DELETE /room/roomBedAdjust */
 export async function deleteRoomRoomBedAdjust(params:string,mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
         ({url: '/room/roomBedAdjust', data:params},{errorMessageMode:mode});}
 /** 批量修改学生的寝室床位 PUT /room/roomBedAdjust/adjustBedBatch */
-export async function putRoomBedAdjustAdjustBedBatch(params:API.PageInput_4[]
+export async function putRoomBedAdjustAdjustBedBatch(params:API.PageInput_5[]
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
         ({url: '/room/roomBedAdjust/adjustBedBatch', data:params},{errorMessageMode:mode});}
 /** 床位学生列表 GET /room/roomBedAdjust/bed-student */

+ 2 - 2
src/services/apis/SystemUpdateMessageController.ts

@@ -12,11 +12,11 @@ import { ErrorMessageMode } from '/#/axios';
 
 
             /** 新增系统消息 POST /system/systemUpdateMessage */
-export async function postSystemSystemUpdateMessage(params:API.PageInput_5
+export async function postSystemSystemUpdateMessage(params:API.PageInput_6
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/system/systemUpdateMessage', data:params},{errorMessageMode:mode});}
 /** 修改系统消息 PUT /system/systemUpdateMessage */
-export async function putSystemSystemUpdateMessage(params:API.PageInput_6
+export async function putSystemSystemUpdateMessage(params:API.PageInput_7
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
         ({url: '/system/systemUpdateMessage', data:params},{errorMessageMode:mode});}
 /** 删除系统消息 DELETE /system/systemUpdateMessage */

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

@@ -16,7 +16,7 @@ export async function postLedgerWfSubscription(params:API.AddWfSubscriptionDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/ledger/wfSubscription', data:params},{errorMessageMode:mode});}
 /** 导出 POST /ledger/wfSubscription/export-query */
-export async function postWfSubscriptionExportQuery(params:API.PageInput_7
+export async function postWfSubscriptionExportQuery(params:API.PageInput_8
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/ledger/wfSubscription/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 物品申购台账列表(分页) GET /ledger/wfSubscription/page */

+ 12 - 0
src/services/apis/index.ts

@@ -17,6 +17,10 @@ import * as AttendanceRuleCategoryController from './AttendanceRuleCategoryContr
 import * as StudentAttendanceRecordController from './StudentAttendanceRecordController';
 import * as TeacherAttendanceRecordController from './TeacherAttendanceRecordController';
 import * as DataAuthController from './DataAuthController';
+import * as BandingRuleController from './BandingRuleController';
+import * as BandingTaskController from './BandingTaskController';
+import * as BandingTaskClassController from './BandingTaskClassController';
+import * as BandingTaskMajorConditionController from './BandingTaskMajorConditionController';
 import * as BaseClassCourseController from './BaseClassCourseController';
 import * as WhitelistManagementController from './WhitelistManagementController';
 import * as BaseClassController from './BaseClassController';
@@ -222,6 +226,14 @@ StudentAttendanceRecordController,
 TeacherAttendanceRecordController,
 /** Data Auth Controller */
 DataAuthController,
+/** Banding Rule Controller */
+BandingRuleController,
+/** Banding Task Controller */
+BandingTaskController,
+/** Banding Task Class Controller */
+BandingTaskClassController,
+/** Banding Task Major Condition Controller */
+BandingTaskMajorConditionController,
 /** Base Class Course Controller */
 BaseClassCourseController,
 /** Whitelist Management Controller */

+ 331 - 7
src/services/typing.d.ts

@@ -353,6 +353,53 @@ name?: string;
 userId?: string;
 }
 
+type AddBandingRuleDto = {
+/** 招生类型 */
+enrollType?: string;
+/** 规则名称 */
+name?: string;
+sortCode?: number;
+}
+
+type AddBandingTaskClassDto = {
+/** 分班任务id */
+bandingTaskId?: string;
+/** 教室id */
+classroomId?: string;
+/** 身高 */
+height?: number;
+/** 是否订单班(0:否 1:是) */
+isOrderClass?: string;
+/** 专业方向id */
+majorSetId?: string;
+/** 规则名称 */
+name?: string;
+/** 班级人数 */
+number?: number;
+/** 分数 */
+score?: number;
+sortCode?: number;
+/** 班主任id */
+teacherId?: string;
+}
+
+type AddBandingTaskDto = {
+/** 招生类型 */
+enrollType?: string;
+/** 年级id */
+gradeId?: string;
+/** 分班任务名称 */
+name?: string;
+sortCode?: number;
+}
+
+type AddBandingTaskRuleDto = {
+/** 新生分班规则(banding_rule) */
+bandingRuleIds?: string[];
+/** 分班任务(banding_task) */
+bandingTaskId?: string;
+}
+
 type AddBaseAppFunctionDto = {
 /** 图标颜色 */
 color?: string;
@@ -4301,6 +4348,163 @@ authMemberConfigs?: MemberConfig[];
 authType?: number;
 }
 
+type AutomaticBandingTaskDto = {
+/** 任务id */
+bandingTaskId?: string;
+}
+
+type BandingRulePageVo = {
+createDate?: string;
+createUserId?: string;
+deleteMark?: number;
+enabledMark?: number;
+/** 招生类型 */
+enrollType?: string;
+id?: string;
+modifyDate?: string;
+modifyUserId?: string;
+/** 规则名称 */
+name?: string;
+sortCode?: number;
+}
+
+type BandingRuleVo = {
+/** 招生类型 */
+enrollType?: string;
+id?: string;
+/** 规则名称 */
+name?: string;
+sortCode?: number;
+}
+
+type BandingTaskClassPageVo = {
+/** 教室id */
+classroomId?: string;
+/** 教室名称 */
+classroomName?: string;
+/** 第一志愿人数 */
+firstAmbitionCount?: number;
+/** 身高 */
+height?: number;
+/** 主键编号 */
+id?: string;
+/** 是否订单班(0:否 1:是) */
+isOrderClass?: number;
+/** 专业方向id */
+majorSetId?: string;
+/** 专业方向 */
+majorSetName?: string;
+/** 班级名称 */
+name?: string;
+/** 班级人数 */
+number?: number;
+/** 满足人数 */
+satisfyCount?: number;
+/** 分数 */
+score?: number;
+/** 第二志愿人数 */
+secondAmbitionCount?: number;
+/** 班级排序 */
+sortCode?: number;
+/** 剩余人数 */
+surplusCount?: number;
+/** 班主任id */
+teacherId?: string;
+/** 班主任名称 */
+teacherName?: string;
+}
+
+type BandingTaskClassVo = {
+/** 教室id */
+classroomId?: string;
+/** 身高 */
+height?: number;
+id?: string;
+/** 是否订单班(0:否 1:是) */
+isOrderClass?: string;
+/** 专业方向id */
+majorSetId?: string;
+/** 规则名称 */
+name?: string;
+/** 班级人数 */
+number?: number;
+sortCode?: number;
+/** 班主任id */
+teacherId?: string;
+/** 体重 */
+weight?: number;
+}
+
+type BandingTaskMajorConditionDto = {
+/** 身高限制 */
+height?: number;
+/** 专业方向id */
+majorSetId?: string;
+/** 分数限制 */
+score?: number;
+}
+
+type BandingTaskMajorConditionListVo = {
+/** 任务id */
+bandingTaskId?: string;
+/** 身高 */
+height?: number;
+/** 主键编号 */
+id?: string;
+/** 专业方向id */
+majorSetId?: string;
+/** 专业方向 */
+majorSetName?: string;
+/** 成绩 */
+score?: number;
+/** 班级排序 */
+sortCode?: number;
+}
+
+type BandingTaskPageVo = {
+/** 招生类型 */
+enrollType?: string;
+/** 招生类型-中文 */
+enrollTypeCn?: string;
+/** 年级id */
+gradeId?: string;
+/** 年级名称 */
+gradeName?: string;
+id?: string;
+/** 分班任务名称 */
+name?: string;
+sortCode?: number;
+}
+
+type BandingTaskRuleVo = {
+bandingTaskRuleId?: string;
+/** 选择方式(radtio:单选, multi:多选) */
+chooseType?: string;
+/** 规则code */
+code?: string;
+id?: string;
+/** 是否被选上(1:是 0:否) */
+isSelected?: number;
+/** 规则名称 */
+name?: string;
+sortCode?: number;
+}
+
+type BandingTaskVo = {
+/** bandingTaskClass子表 */
+bandingTaskClassList?: BandingTaskClassVo[];
+/** bandingTaskRule子表 */
+bandingTaskRuleList?: BandingTaskRuleVo[];
+/** 招生类型 */
+enrollType?: string;
+/** 年级id */
+gradeId?: string;
+id?: string;
+/** 分班任务名称 */
+name?: string;
+sortCode?: number;
+}
+
 type BaseAppFunctionListVo = {
 /** 图标颜色 */
 color?: string;
@@ -6695,6 +6899,13 @@ remark?: string;
 status?: number;
 }
 
+type ChangeClassDto = {
+/** 班级id */
+bandingTaskClassId?: string;
+/** 学生ids */
+newStudentIds?: string[];
+}
+
 type ChangeNewsDto = {
 id?: string;
 /** 状态 1=未发布 2=已发布 3=下架 */
@@ -9747,6 +9958,48 @@ type?: number;
 
 /** 分页入参 */
 type PageInput = {
+/** 身份证 */
+credentialNumber?: string;
+/** 添加时间-结束 */
+endDate?: string;
+/** 招生计划id(enrollment_plan) */
+enrollmentPlanId?: string;
+/** 排序字段 */
+field?: string;
+/** 第一志愿 */
+firstAmbition?: string;
+/** 性别 */
+gender?: string;
+/** 毕业学校 */
+graduateSchool?: string;
+/** 是否可调配(0:否,1:是) */
+isAdjust?: number;
+/** 是否导入成绩(0:否,1:是) */
+isImportScore?: number;
+/** 关键词 */
+keyword?: string;
+/** 当前页标 */
+limit?: number;
+/** 姓名 */
+name?: string;
+/** 排序方式 asc  desc */
+order?: string;
+/** 第二志愿 */
+secondAmbition?: string;
+/** 每页大小 */
+size?: number;
+/** 添加时间-开始 */
+startDate?: string;
+/** 班级状态(0:未分配, 1:已分配) */
+status?: number;
+/** 树id */
+treeId?: string;
+/** 树类型(1:年级,2:春秋季) */
+treeType?: number;
+}
+
+/** 分页入参 */
+type PageInput_1 = {
 /** 排序字段 */
 field?: string;
 /** 年级id */
@@ -9762,7 +10015,7 @@ size?: number;
 }
 
 /** 分页入参 */
-type PageInput_1 = {
+type PageInput_2 = {
 /** 缴费类型(-1:退费 1:缴费) */
 category?: number;
 /** 班级Id */
@@ -9798,7 +10051,7 @@ studentId?: string;
 }
 
 /** 分页入参 */
-type PageInput_2 = {
+type PageInput_3 = {
 /** 排序字段 */
 field?: string;
 funcId?: string;
@@ -9816,7 +10069,7 @@ size?: number;
 }
 
 /** 分页入参 */
-type PageInput_3 = {
+type PageInput_4 = {
 /** 排序字段 */
 field?: string;
 isTemplate?: boolean;
@@ -9834,7 +10087,7 @@ size?: number;
 }
 
 /** 分页入参 */
-type PageInput_4 = {
+type PageInput_5 = {
 /** 床位id */
 bedId?: string;
 /** 排序字段 */
@@ -9852,7 +10105,7 @@ studentUserId?: string;
 }
 
 /** 分页入参 */
-type PageInput_5 = {
+type PageInput_6 = {
 /** 消息内容 */
 content?: string;
 /** 排序字段 */
@@ -9876,7 +10129,7 @@ titleColor?: string;
 }
 
 /** 分页入参 */
-type PageInput_6 = {
+type PageInput_7 = {
 /** 消息内容 */
 content?: string;
 /** 排序字段 */
@@ -9901,7 +10154,7 @@ titleColor?: string;
 }
 
 /** 分页入参 */
-type PageInput_7 = {
+type PageInput_8 = {
 /** 结束时间 */
 endDate?: string;
 /** 排序字段 */
@@ -9994,6 +10247,22 @@ total?: number;
 totalPage?: number;
 }
 
+type PageOutput<BandingRulePageVo> = {
+currentPage?: number;
+list?: BandingRulePageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
+type PageOutput<BandingTaskPageVo> = {
+currentPage?: number;
+list?: BandingTaskPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
 type PageOutput<BaseAppFunctionPageVo> = {
 currentPage?: number;
 list?: BaseAppFunctionPageVo[];
@@ -12491,6 +12760,13 @@ evaluateManageId?: string;
 objectList?: AddEvaluateObjectDto[];
 }
 
+type SaveMajorConditionDto = {
+/** 任务id */
+bandingTaskId?: string;
+/** 身高限制 */
+conditionList?: BandingTaskMajorConditionDto[];
+}
+
 type SaveRoleXjrMenuQuickDto = {
 menus?: AddXjrMenuQuickDto[];
 roleId?: string;
@@ -13480,6 +13756,11 @@ sortCode?: number;
 subjectGroupCourseList?: SubjectGroupCoursePageVo[];
 }
 
+type SureBandingTaskDto = {
+/** id */
+id?: string;
+}
+
 type SwitchPostDto = {
 postId?: string;
 }
@@ -14799,6 +15080,49 @@ status?: number;
 stduyStatus?: string;
 }
 
+type UpdateBandingClassDto = {
+/** 分班任务id */
+bandingTaskId?: string;
+/** 教室id */
+classroomId?: string;
+/** 身高 */
+height?: number;
+id?: string;
+/** 是否订单班(0:否 1:是) */
+isOrderClass?: string;
+/** 专业方向id */
+majorSetId?: string;
+/** 规则名称 */
+name?: string;
+/** 班级人数 */
+number?: number;
+/** 分数 */
+score?: number;
+sortCode?: number;
+/** 班主任id */
+teacherId?: string;
+}
+
+type UpdateBandingRuleDto = {
+/** 招生类型 */
+enrollType?: string;
+id?: string;
+/** 规则名称 */
+name?: string;
+sortCode?: number;
+}
+
+type UpdateBandingTaskDto = {
+/** 招生类型 */
+enrollType?: string;
+/** 年级id */
+gradeId?: string;
+id?: string;
+/** 分班任务名称 */
+name?: string;
+sortCode?: number;
+}
+
 type UpdateBaseAppFunctionDto = {
 /** 图标颜色 */
 color?: string;

+ 83 - 0
src/views/educational/banding/task/data.config.ts

@@ -0,0 +1,83 @@
+import { BasicColumn, FormSchema } from '/@/components/Table';
+import { getDataOption } from '/@/api/system/dic';
+
+import { requestMagicApi } from '/@/api/magicApi';
+
+export const tableColumns: BasicColumn[] = [
+  // {
+  //   title: '招生名称',
+  //   dataIndex: 'name',
+  //   align: 'left',
+  // },
+  {
+    title: '年级',
+    dataIndex: 'gradeName',
+    align: 'left',
+    // width: 100,
+  },
+  {
+    title: '招生类型',
+    dataIndex: 'enrollTypeCn',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '已录取人数',
+    dataIndex: 'ab',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '已分班人数',
+    dataIndex: 'abc',
+    align: 'left',
+    width: 100,
+  },
+];
+
+export const searchFormSchema: FormSchema[] = [
+  // {
+  //   field: 'name',
+  //   label: '招生名称',
+  //   component: 'Input',
+  //   colProps: { span: 8 },
+  // },
+  {
+    field: 'enrollType',
+    label: '招生类型',
+    component: 'ApiSelect',
+    colProps: { span: 8 },
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: getDataOption,
+      params: { code: 'enroll_type' },
+    },
+  },
+];
+
+export const formSchema: FormSchema[] = [
+  {
+    label: '所属年级',
+    field: 'gradeId',
+    component: 'ApiSelect',
+    required: true,
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: requestMagicApi,
+      params: { url: 'baseData/grade/option' },
+    },
+    colProps: { span: 24 },
+  },
+  {
+    label: '招生类型',
+    field: 'enrollType',
+    component: 'ApiSelect',
+    required: true,
+    componentProps: {
+      getPopupContainer: () => document.body,
+      api: getDataOption,
+      params: { code: 'enroll_type' },
+    },
+    colProps: { span: 24 },
+  },
+];

+ 46 - 0
src/views/educational/banding/task/division.vue

@@ -0,0 +1,46 @@
+<template>
+  <BasicDrawer
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    width="85%"
+    :showFooter="false"
+    @close="handelClose"
+  >
+    <FormDivision :taskId="modelRef?.id" />
+  </BasicDrawer>
+</template>
+<script setup lang="ts">
+  import { ref, computed, unref } from 'vue';
+  import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
+  import FormDivision from '../../division/index.vue';
+  import { Recordable } from 'vite-plugin-mock';
+  const isUpdate = ref(true);
+  const modelRef = ref<Recordable>();
+  const emit = defineEmits(['success', 'register']);
+
+  const [registerModal, { closeDrawer, setDrawerProps }] = useDrawerInner(async (data) => {
+    setDrawerProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+  });
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '新生分配' : '新生分配'));
+  const handleSubmit = async () => {
+    try {
+      closeDrawer();
+      emit('success');
+    } finally {
+      setDrawerProps({ confirmLoading: false });
+    }
+  };
+
+  const handelClose = () => {
+    modelRef.value = {};
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 76 - 0
src/views/educational/banding/task/edit.vue

@@ -0,0 +1,76 @@
+<template>
+  <BasicModal
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+    showFooter
+  >
+    <BasicForm @register="registerForm" />
+  </BasicModal>
+</template>
+<script setup lang="ts">
+  import { ref, computed, unref } from 'vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, useForm } from '/@/components/Form/index';
+  import { formSchema } from './data.config';
+  import {
+    getBandingTaskInfo,
+    postBandingBandingTask,
+    putBandingBandingTask,
+  } from '/@/services/apis/BandingTaskController';
+
+  const isUpdate = ref(true);
+  const modelRef = ref({});
+  const emit = defineEmits(['success', 'register']);
+  const { createMessage } = useMessage();
+  const [registerForm, { validate, setFieldsValue, resetFields }] = useForm({
+    labelWidth: 100,
+    schemas: formSchema,
+    showActionButtonGroup: false,
+  });
+
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
+    resetFields();
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+
+    if (unref(isUpdate)) {
+      const resData = await getBandingTaskInfo({ id: data.baseData.id });
+
+      modelRef.value = { ...resData };
+      setFieldsValue({
+        ...resData,
+      });
+    }
+  });
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '新增招生计划' : '编辑招生计划'));
+  const handleSubmit = async () => {
+    try {
+      const values = await validate();
+      setModalProps({ confirmLoading: true });
+      const postParams = unref(modelRef);
+      Object.assign(postParams, values);
+
+      if (unref(isUpdate)) {
+        await putBandingBandingTask(postParams as API.UpdateBandingTaskDto);
+      } else {
+        await postBandingBandingTask(postParams as API.AddBandingTaskDto);
+      }
+
+      createMessage.success('操作成功');
+      closeModal();
+      emit('success');
+    } finally {
+      setModalProps({ confirmLoading: false });
+    }
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 118 - 0
src/views/educational/banding/task/index.vue

@@ -0,0 +1,118 @@
+<template>
+  <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
+    <BasicTable @register="registerTable">
+      <template #toolbar>
+        <a-button type="primary" @click="handleEdit({}, false)">新增</a-button>
+      </template>
+      <template #action="{ record }">
+        <TableAction
+          :actions="[
+            // {
+            //   label: '编辑',
+            //   onClick: handleEdit.bind(null, record, true),
+            // },
+            // {
+            //   label: '删除',
+            //   color: 'error',
+            //   onClick: handleDelete.bind(null, record),
+            // },
+            {
+              label: '开始分班',
+              onClick: handleDivision.bind(null, record),
+            },
+          ]"
+        />
+      </template>
+    </BasicTable>
+    <FormEdit @register="registerModal" @success="handleSuccess" />
+    <FormDivision @register="registerDrawer" @success="handleSuccess" />
+  </PageWrapper>
+</template>
+
+<script setup lang="ts">
+  import { onMounted } from 'vue';
+  import { PageWrapper } from '/@/components/Page';
+  import { BasicTable, useTable, TableAction } from '/@/components/Table';
+  import { tableColumns, searchFormSchema } from './data.config';
+  import {
+    deleteBandingBandingTask,
+    getBandingTaskPage,
+  } from '/@/services/apis/BandingTaskController';
+  import { useModal } from '/@/components/Modal';
+  import { useDrawer } from '/@/components/Drawer';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import FormEdit from './edit.vue';
+  import FormDivision from './division.vue';
+
+  const [registerModal, { openModal }] = useModal();
+  const [registerDrawer, { openDrawer }] = useDrawer();
+
+  const [registerTable, { reload }] = useTable({
+    api: getBandingTaskPage,
+    title: '招生计划列表',
+    rowKey: 'id',
+    columns: tableColumns,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+    },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    actionColumn: {
+      width: 120,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
+  });
+  const { createConfirm, createMessage } = useMessage();
+
+  const handleDelete = (record: any) => {
+    createConfirm({
+      iconType: 'warning',
+      title: '温馨提醒',
+      content: '是否删除该记录?',
+      onOk: async () => {
+        try {
+          await deleteBandingBandingTask([record.id]);
+          createMessage.success('删除成功');
+          await reload();
+        } catch (e) {
+          createMessage.error('删除失败');
+        }
+      },
+      okText: '确认',
+      cancelText: '取消',
+    });
+  };
+
+  const handleDivision = (record: any) => {
+    openDrawer(true, {
+      isUpdate: true,
+      baseData: {
+        ...record,
+      },
+    });
+  };
+
+  const handleEdit = (record: any, isUpdate: boolean) => {
+    openModal(true, {
+      isUpdate: isUpdate,
+      baseData: {
+        ...record,
+      },
+    });
+  };
+
+  const handleSuccess = async () => {
+    await reload();
+  };
+
+  onMounted(async () => {});
+</script>
+
+<style scoped lang="less"></style>

+ 84 - 50
src/views/educational/division/components/DsionStep1.vue

@@ -1,33 +1,7 @@
 <template>
   <div class="dsion-step1">
     <div style="padding: 24px" class="flex">
-      <div class="w-1/2">
-        <div class="text-[20px] text-bold">分班学生范围</div>
-        <div class="flex mt-8 items-center">
-          <div class="w-[100px]">
-            <span class="text-[#ff0000]">*</span>
-            年级:
-          </div>
-          <Select style="width: 100%" v-model:value="state.gradeId" :options="state.gradeOptions" />
-        </div>
-        <div class="flex mt-4 items-center">
-          <div class="w-[100px]">
-            <span class="text-[#ff0000]">*</span>
-            招生类型:
-          </div>
-          <Select
-            style="width: 100%"
-            v-model:value="state.enrollType"
-            :options="state.enrollTypeOptions"
-          />
-        </div>
-        <div class="flex mt-8">
-          <div class="w-[100px]"> </div>
-          <div> 已录取学生人数“xxx”人;已分班学生人数“xxx”人 </div>
-        </div>
-      </div>
-      <div class="w-1/2 ml-4">
-        <div class="text-[20px] text-bold">分班基本规则</div>
+      <div class="ml-4">
         <div class="flex mt-8">
           <Checkbox.Group v-model:value="state.checkboxItem" :options="state.checkedOptions" />
         </div>
@@ -40,37 +14,87 @@
 </template>
 
 <script setup lang="ts">
-  import { Select, Checkbox, Radio } from 'ant-design-vue';
-  import { onMounted, reactive } from 'vue';
-  import { requestMagicApi } from '/@/api/magicApi';
-  import { getDataOption } from '/@/api/system/dic';
+  import { Checkbox, Radio, CheckboxOptionType } from 'ant-design-vue';
+  import { CheckboxValueType } from 'ant-design-vue/lib/checkbox/interface';
+  import { onMounted, reactive, watch } from 'vue';
 
-  const state = reactive({
+  import {
+    getBandingTaskRuleList,
+    postBandingTaskSetRule,
+  } from '/@/services/apis/BandingTaskController';
+
+  const props = defineProps({
+    taskId: { type: String, default: '' },
+  });
+
+  const state = reactive<{
+    gradeId: String;
+    enrollType: String;
+    checkboxItem: CheckboxValueType[];
+    radioItem: CheckboxValueType;
+    checkedOptions: CheckboxOptionType[];
+    radioOptions: CheckboxOptionType[];
+  }>({
     gradeId: '',
     enrollType: '',
     checkboxItem: [],
-    gradeOptions: [],
-    enrollTypeOptions: [],
     radioItem: '',
-    checkedOptions: [
-      { label: '使每班的男女生性别比例比较均衡', value: '0' },
-      { label: '使每班的学生成绩/年龄比例比较均衡', value: '1' },
-      { label: '使每班的学生来源比例比较均衡', value: '2' },
-      { label: '使每班的住宿类型比例比较均衡', value: '3' },
-      { label: '使姓名相同的学生分到不同的班级', value: '4' },
-      { label: '专业分班有限制条件时按高值分配', value: '5' },
-    ],
-    radioOptions: [
-      { label: '使同专业班级人数比例比较均衡', value: '0' },
-      { label: '使同专业班级一个班级排满在排下一个班级', value: '1' },
-    ],
+    checkedOptions: [],
+    radioOptions: [],
   });
 
-  onMounted(async () => {
-    state.gradeOptions = await requestMagicApi({ url: 'baseData/grade/option' });
+  watch(
+    () => props.taskId,
+    async (newVal) => {
+      if (newVal) {
+        await getRule(newVal);
+      }
+    },
+  );
 
-    state.enrollTypeOptions = await getDataOption({ code: 'enroll_type' });
-  });
+  const getRule = async (taskId) => {
+    const data = await getBandingTaskRuleList({ id: taskId });
+    const checkboxItem: CheckboxValueType[] = [];
+    let radioItem = '';
+
+    state.checkedOptions = data
+      .filter((item: any) => item.chooseType === 'multi')
+      .map((item: any) => {
+        if (item.isSelected === 1) {
+          checkboxItem.push(item.id);
+        }
+        return { value: item.id, label: item.name };
+      });
+
+    state.radioOptions = data
+      .filter((item: any) => item.chooseType === 'radio')
+      .map((item: any) => {
+        if (item.isSelected === 1) {
+          radioItem = item.id;
+        }
+        return { value: item.id, label: item.name };
+      });
+
+    state.checkboxItem = checkboxItem;
+    state.radioItem = radioItem;
+  };
+
+  const validateStep = async () => {
+    try {
+      const bandingRuleIds = [...state.checkboxItem];
+      if (state.radioItem) {
+        bandingRuleIds.push(state.radioItem);
+      }
+      await postBandingTaskSetRule({ bandingRuleIds: bandingRuleIds, bandingTaskid: props.taskId });
+      return true;
+    } catch {
+      return false;
+    }
+  };
+
+  onMounted(async () => {});
+
+  defineExpose({ validateStep });
 </script>
 
 <style lang="less" scoped>
@@ -80,4 +104,14 @@
     border-radius: 16px;
     width: 1000px;
   }
+
+  :deep(.ant-checkbox-wrapper) {
+    display: flex !important;
+    margin-bottom: 4px;
+  }
+
+  :deep(.ant-radio-wrapper) {
+    display: flex !important;
+    margin-bottom: 4px;
+  }
 </style>

+ 96 - 33
src/views/educational/division/components/DsionStep2.vue

@@ -1,60 +1,88 @@
 <template>
   <div class="dsion-step2">
-    <BasicTable @register="registerTable">
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
       <template #toolbar>
-        <a-button type="primary">导入</a-button>
+        <a-button type="primary" @click="handelImport">导入</a-button>
         <a-button type="primary" @click="handelAdd">添加</a-button>
       </template>
-      <template #action="{ record, column }">
-        <TableAction :actions="createActions(record, column)" />
+      <template #action="{ record }">
+        <TableAction :actions="createActions(record)" />
       </template>
     </BasicTable>
+
+    <FormImport @register="registerImportModal" @success="handleSuccess" />
   </div>
 </template>
 
 <script setup lang="ts">
-  import { ref } from 'vue';
+  import { reactive, ref, watch } from 'vue';
   import {
     BasicTable,
     useTable,
     TableAction,
     EditRecordRow,
     ActionItem,
-    BasicColumn,
   } from '/@/components/Table';
   import { table2Columns } from '../data.config';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { buildUUID } from '/@/utils/uuid';
+  import FormImport from './import.vue';
+  import { useModal } from '/@/components/Modal';
+  import {
+    deleteBandingBandingTaskClass,
+    getBandingTaskClassList,
+    postBandingBandingTaskClass,
+    putBandingBandingTaskClass,
+  } from '/@/services/apis/BandingTaskClassController';
+  import { cloneDeep } from 'lodash-es';
 
-  const [registerTable, { insertTableDataRecord, deleteTableDataRecord }] = useTable({
-    // api: getEvaluateTemplatePage,
-    title: '班级列表',
-    rowKey: 'uid',
-    columns: table2Columns,
-    useSearchForm: false,
-    showTableSetting: true,
-    bordered: true,
-    immediate: true,
-    canResize: true,
-    pagination: false,
-    actionColumn: {
-      width: 120,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-      fixed: 'right',
-    },
+  const [registerImportModal, { openModal: openImportModal }] = useModal();
+
+  const [registerTable, { reload, insertTableDataRecord, deleteTableDataRecord, getDataSource }] =
+    useTable({
+      api: getBandingTaskClassList,
+      title: '班级列表',
+      rowKey: 'id',
+      columns: table2Columns,
+      useSearchForm: false,
+      showTableSetting: true,
+      bordered: true,
+      immediate: false,
+      canResize: true,
+      pagination: false,
+      actionColumn: {
+        width: 120,
+        title: '操作',
+        dataIndex: 'action',
+        slots: { customRender: 'action' },
+        fixed: 'right',
+      },
+    });
+
+  const searchInfo = reactive<Recordable>({});
+
+  const props = defineProps({
+    taskId: { type: String, default: '' },
   });
 
+  watch(
+    () => props.taskId,
+    async (newVal) => {
+      if (newVal) {
+        searchInfo.bandingTaskId = newVal;
+      }
+    },
+  );
+
   const currentEditKeyRef = ref('');
   const { createMessage } = useMessage();
 
   const handelAdd = () => {
-    insertTableDataRecord({ uid: buildUUID() });
+    insertTableDataRecord({ id: buildUUID(), _newRow: true });
   };
 
   const handleEdit = (record: EditRecordRow) => {
-    currentEditKeyRef.value = record.uid;
+    currentEditKeyRef.value = record.id;
     record.onEdit?.(true);
   };
 
@@ -63,33 +91,51 @@
     record.onEdit?.(false, false);
   };
 
-  const handleDelete = (record: EditRecordRow) => {
-    deleteTableDataRecord(record.uid);
+  const handleDelete = async (record: EditRecordRow) => {
+    if (record._newRow) {
+      deleteTableDataRecord(record.id);
+    } else {
+      await deleteBandingBandingTaskClass([record.id]);
+    }
   };
 
   const handleSave = async (record: EditRecordRow) => {
     const valid = await record.onValid?.();
     if (valid) {
+      const data = cloneDeep(record.editValueRefs);
+      data['isOrderClass'] = data['isOrderClass'] ? 1 : 0;
+      if (record._newRow) {
+        await postBandingBandingTaskClass({
+          ...data,
+          bandingTaskId: props.taskId,
+        } as API.AddBandingTaskClassDto);
+      } else {
+        const _dataSource = getDataSource();
+        const editData = _dataSource.filter((row) => row.id === record.id)[0];
+        Object.assign(editData, data);
+        await putBandingBandingTaskClass(editData as API.UpdateBandingTaskClassDto);
+      }
       await record.onEdit?.(false, true);
       currentEditKeyRef.value = '';
+      reload();
     } else {
       createMessage.error({ content: '请填写正确的数据', key: 'saving' });
     }
   };
 
-  const createActions = (record: EditRecordRow, column: BasicColumn): ActionItem[] => {
+  const createActions = (record: EditRecordRow): ActionItem[] => {
     if (!record.editable) {
       return [
         {
           label: '编辑',
-          disabled: currentEditKeyRef.value ? currentEditKeyRef.value !== record.uid : false,
+          disabled: currentEditKeyRef.value ? currentEditKeyRef.value !== record.id : false,
           onClick: handleEdit.bind(null, record),
         },
         {
           label: '删除',
           popConfirm: {
             title: '是否删除',
-            confirm: handleDelete.bind(null, record, column),
+            confirm: handleDelete.bind(null, record),
           },
         },
       ];
@@ -97,17 +143,34 @@
     return [
       {
         label: '确定',
-        onClick: handleSave.bind(null, record, column),
+        onClick: handleSave.bind(null, record),
       },
       {
         label: '取消',
         popConfirm: {
           title: '是否取消编辑',
-          confirm: handleCancel.bind(null, record, column),
+          confirm: handleCancel.bind(null, record),
         },
       },
     ];
   };
+
+  const handelImport = () => {
+    openImportModal(true, { baseData: { taskId: props.taskId } });
+  };
+
+  const handleSuccess = () => {
+    reload();
+  };
+
+  const validateStep = () => {
+    return true;
+  };
+  const reloadStep = () => {
+    reload();
+  };
+
+  defineExpose({ validateStep, reloadStep });
 </script>
 
 <style lang="less" scoped>

+ 74 - 7
src/views/educational/division/components/DsionStep3.vue

@@ -1,32 +1,99 @@
 <template>
   <div class="dsion-step3">
-    <BasicTable @register="registerTable">
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
       <template #toolbar>
-        <a-button type="primary">开始分班</a-button>
-        <a-button type="warning">撤回</a-button>
-        <a-button type="error">重置</a-button>
+        <a-button type="primary" @click="handelConfirm">开始分班</a-button>
+        <!-- <a-button type="warning">撤回</a-button> -->
+        <a-button type="error" @click="handelReset">重置</a-button>
+      </template>
+      <template #satisfyCount="{ record, text }">
+        <a-button type="link" @click="handelSatisfy(record)">{{ text }}</a-button>
+      </template>
+      <template #surplusCount="{ record, text }">
+        <a-button type="link" @click="handelSurplus(record)">{{ text }}</a-button>
       </template>
     </BasicTable>
+    <FormSatisfy @register="registerSatisfyModal" @success="handleSuccess" />
+    <FormSurplus @register="registerSurplusModal" @success="handleSuccess" />
   </div>
 </template>
 
 <script setup lang="ts">
-  import { ref } from 'vue';
+  import { reactive, watch } from 'vue';
   import { BasicTable, useTable } from '/@/components/Table';
   import { table3Columns } from '../data.config';
+  import {
+    getBandingTaskClassList,
+    postBandingTaskClassReset,
+  } from '/@/services/apis/BandingTaskClassController';
+  import FormSatisfy from './satisfy.vue';
+  import FormSurplus from './surplus.vue';
+  import { useModal } from '/@/components/Modal';
+  import { postBandingTaskAutomaticBanding } from '/@/services/apis/BandingTaskController';
 
   const [registerTable, { reload }] = useTable({
-    // api: getEvaluateTemplatePage,
+    api: getBandingTaskClassList,
     title: '班级列表',
     rowKey: 'id',
     columns: table3Columns,
     useSearchForm: false,
     showTableSetting: true,
     bordered: true,
-    immediate: true,
+    immediate: false,
     canResize: true,
     pagination: false,
   });
+
+  const [registerSatisfyModal, { openModal: openSatisfyModal }] = useModal();
+  const [registerSurplusModal, { openModal: openSurplusModal }] = useModal();
+
+  const searchInfo = reactive<Recordable>({});
+
+  const props = defineProps({
+    taskId: { type: String, default: '' },
+  });
+
+  watch(
+    () => props.taskId,
+    async (newVal) => {
+      if (newVal) {
+        searchInfo.bandingTaskId = newVal;
+      }
+    },
+  );
+
+  const validateStep = () => {
+    return true;
+  };
+
+  const handelReset = async () => {
+    await postBandingTaskClassReset({ bandingTaskId: props.taskId });
+    reload();
+  };
+
+  const handleSuccess = () => {
+    reload();
+  };
+
+  const handelSatisfy = (record: Recordable) => {
+    openSatisfyModal(true, { baseData: { ...record } });
+  };
+  const handelSurplus = (record: Recordable) => {
+    openSurplusModal(true, { baseData: { ...record } });
+  };
+
+  const handelConfirm = async () => {
+    // const data = getDataSource();
+    // console.log('handelConfirm', data);
+    await postBandingTaskAutomaticBanding({ bandingTaskId: props.taskId });
+    reload();
+  };
+
+  const reloadStep = () => {
+    reload();
+  };
+
+  defineExpose({ validateStep, reloadStep });
 </script>
 
 <style lang="less" scoped>

+ 56 - 7
src/views/educational/division/components/DsionStep4.vue

@@ -1,21 +1,27 @@
 <template>
   <div class="dsion-step4">
-    <BasicTable @register="registerTable">
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
       <template #toolbar>
-        <a-button type="primary">开始分班</a-button>
+        <a-button type="primary" @click="handelAjd">调整班级</a-button>
         <a-button type="primary">导出</a-button>
       </template>
     </BasicTable>
+    <FormAdjust @register="registerModal" @success="handleSuccess" />
   </div>
 </template>
 
 <script setup lang="ts">
-  import { ref } from 'vue';
+  import { reactive, watch } from 'vue';
   import { BasicTable, useTable } from '/@/components/Table';
   import { table4Columns, searchForm4Schema } from '../data.config';
+  import { getBandingTaskClassClassStudent } from '/@/services/apis/BandingTaskClassController';
+  import FormAdjust from './adjust.vue';
+  import { useModal } from '/@/components/Modal';
 
-  const [registerTable, { reload }] = useTable({
-    // api: getEvaluateTemplatePage,
+  const [registerModal, { openModal }] = useModal();
+
+  const [registerTable, { reload, getSelectRows }] = useTable({
+    api: getBandingTaskClassClassStudent,
     title: '学生列表',
     rowKey: 'id',
     formConfig: {
@@ -26,10 +32,53 @@
     useSearchForm: true,
     showTableSetting: true,
     bordered: true,
-    immediate: true,
+    immediate: false,
     canResize: true,
-    pagination: false,
+    rowSelection: {
+      type: 'checkbox',
+    },
+  });
+
+  const searchInfo = reactive<Recordable>({});
+
+  const props = defineProps({
+    taskId: { type: String, default: '' },
   });
+
+  watch(
+    () => props.taskId,
+    async (newVal) => {
+      if (newVal) {
+        searchInfo.bandingTaskId = newVal;
+      }
+    },
+  );
+
+  const validateStep = () => {
+    return true;
+  };
+
+  const reloadStep = () => {
+    reload();
+  };
+
+  const handelAjd = () => {
+    const selectRows = getSelectRows();
+    if (selectRows.length > 0) {
+      openModal(true, {
+        isUpdate: false,
+        baseData: {
+          ...selectRows,
+        },
+      });
+    }
+  };
+
+  const handleSuccess = () => {
+    reload();
+  };
+
+  defineExpose({ validateStep, reloadStep });
 </script>
 
 <style lang="less" scoped>

+ 25 - 1
src/views/educational/division/components/DsionStep5.vue

@@ -9,7 +9,7 @@
 </template>
 
 <script setup lang="ts">
-  import { ref } from 'vue';
+  import { reactive, watch } from 'vue';
   import { BasicTable, useTable } from '/@/components/Table';
   import { table5Columns } from '../data.config';
 
@@ -25,6 +25,30 @@
     canResize: true,
     pagination: false,
   });
+
+  const searchInfo = reactive<Recordable>({});
+
+  const props = defineProps({
+    taskId: { type: String, default: '' },
+  });
+
+  watch(
+    () => props.taskId,
+    async (newVal) => {
+      if (newVal) {
+        searchInfo.bandingTaskId = newVal;
+      }
+    },
+  );
+
+  const validateStep = () => {
+    return true;
+  };
+
+  const reloadStep = () => {
+    reload();
+  };
+  defineExpose({ validateStep, reloadStep });
 </script>
 
 <style lang="less" scoped>

+ 93 - 0
src/views/educational/division/components/DsionStep6.vue

@@ -0,0 +1,93 @@
+<template>
+  <div class="dsion-step3">
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
+      <template #height="{ record, column }">
+        <a-input-number
+          v-model:value="record[column.dataIndex]"
+          placeholder="请设置限制条件"
+          style="margin: -5px 0; width: 100%"
+        />
+      </template>
+      <template #score="{ record, column }">
+        <a-input-number
+          v-model:value="record[column.dataIndex]"
+          placeholder="请设置限制条件"
+          style="margin: -5px 0; width: 100%"
+        />
+      </template>
+    </BasicTable>
+  </div>
+</template>
+
+<script setup lang="ts">
+  import { reactive, watch } from 'vue';
+  import { BasicTable, useTable } from '/@/components/Table';
+  import { table6Columns } from '../data.config';
+  import { Recordable } from 'vite-plugin-mock';
+  import {
+    getBandingTaskMajorConditionList,
+    postBandingTaskMajorConditionSave,
+  } from '/@/services/apis/BandingTaskMajorConditionController';
+
+  const [registerTable, { reload, getDataSource }] = useTable({
+    api: getBandingTaskMajorConditionList,
+    title: '专业限制条件设置',
+    rowKey: 'id',
+    columns: table6Columns,
+    useSearchForm: false,
+    showTableSetting: true,
+    bordered: true,
+    immediate: false,
+    canResize: true,
+    pagination: false,
+  });
+
+  const searchInfo = reactive<Recordable>({});
+
+  const props = defineProps({
+    taskId: { type: String, default: '' },
+  });
+
+  watch(
+    () => props.taskId,
+    async (newVal) => {
+      if (newVal) {
+        searchInfo.bandingTaskId = newVal;
+        reload();
+      }
+    },
+  );
+
+  const validateStep = async () => {
+    try {
+      const dataSource = getDataSource();
+
+      const list: Recordable[] = [];
+      dataSource.forEach((item) => {
+        list.push({
+          majorSetId: item.majorSetId,
+          height: item.height,
+          score: item.score,
+        });
+      });
+
+      await postBandingTaskMajorConditionSave({ bandingTaskId: props.taskId, conditionList: list });
+
+      return true;
+    } catch {
+      return false;
+    }
+  };
+
+  const reloadStep = () => {
+    reload();
+  };
+
+  defineExpose({ validateStep, reloadStep });
+</script>
+
+<style lang="less" scoped>
+  .dsion-step3 {
+    margin: 16px 0;
+  }
+</style>

+ 59 - 0
src/views/educational/division/components/adjust.vue

@@ -0,0 +1,59 @@
+<template>
+  <BasicModal
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+  >
+    <BasicForm @register="registerForm" />
+  </BasicModal>
+</template>
+<script setup lang="ts">
+  import { ref, computed, unref } from 'vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, useForm } from '/@/components/Form/index';
+
+  import { form4Schema } from '../data.config';
+  import { postBandingTaskClassChangeClass } from '/@/services/apis/BandingTaskClassController';
+
+  const isUpdate = ref(true);
+  const modelRef = ref({});
+  const emit = defineEmits(['success', 'register']);
+  const { createMessage } = useMessage();
+  const [registerForm, { validate, resetFields }] = useForm({
+    labelWidth: 100,
+    schemas: form4Schema,
+    showActionButtonGroup: false,
+  });
+
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
+    resetFields();
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+  });
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '调整班级' : '调整班级'));
+  const handleSubmit = async () => {
+    try {
+      const values = await validate();
+      setModalProps({ confirmLoading: true });
+      const postParams = unref(modelRef);
+      Object.assign(postParams, values);
+
+      await postBandingTaskClassChangeClass(postParams as API.ChangeClassDto);
+
+      createMessage.success('操作成功');
+      closeModal();
+      emit('success');
+    } finally {
+      setModalProps({ confirmLoading: false });
+    }
+  };
+</script>
+
+<style scoped lang="less"></style>

+ 94 - 0
src/views/educational/division/components/import.vue

@@ -0,0 +1,94 @@
+<script setup lang="ts">
+  import BasicModal from '/@/components/Modal/src/BasicModal.vue';
+  import { useModalInner } from '/@/components/Modal';
+  import { Upload } from 'ant-design-vue';
+  import { ref } from 'vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { baseDownloadFileUrl } from '/@/utils/file/download';
+  import { useLoading } from '/@/components/Loading';
+  import { jsonToSheetXlsx } from '/@/components/Excel';
+  import { Recordable } from 'vite-plugin-mock';
+  import { postBandingTaskClassImport } from '/@/services/apis/BandingTaskClassController';
+
+  const errMsg = ref('');
+  const { createMessage } = useMessage();
+  const modelRef = ref<Recordable>({});
+
+  const emit = defineEmits(['success', 'register']);
+
+  const [openFullLoading, closeFullLoading] = useLoading({
+    tip: '处理中...',
+  });
+
+  const [registerModal, { setModalProps }] = useModalInner((data) => {
+    setModalProps({ confirmLoading: false });
+    modelRef.value = { ...data.baseData };
+  });
+
+  const beforeUpload = async (e) => {
+    try {
+      openFullLoading();
+      const data = await postBandingTaskClassImport({
+        file: e,
+        treeId: modelRef.value.taskId,
+      });
+      createMessage.success('导入成功');
+      if (data && data.length > 0) {
+        jsonToSheetXlsx({
+          data,
+          filename: '班级出错记录.xlsx',
+        });
+        errMsg.value = '导入数据有误,请查看附件';
+      }
+    } catch (err: any) {
+      errMsg.value = err;
+    } finally {
+      closeFullLoading();
+    }
+  };
+
+  const handleCancel = () => {
+    emit('success');
+  };
+
+  const handleDonwmLoad = async () => {
+    await baseDownloadFileUrl(
+      'https://zhxy.cqtlzjzx.com/minio/static/resources/%E5%88%86%E7%8F%AD%E7%8F%AD%E7%BA%A7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx',
+      '班级导入模板.xlsx',
+    );
+  };
+</script>
+
+<template>
+  <BasicModal
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :width="1002"
+    title="班级导入"
+    :footer="null"
+    @cancel="handleCancel"
+  >
+    <div class="flex flex-col">
+      <div class="flex items-center">
+        <div class="text-[16px] text-[1000]">1、 下载导入模板</div>
+        <a-button type="primary" class="w-[110px] ml-[12px]" @click="handleDonwmLoad">
+          下载模板
+        </a-button>
+      </div>
+      <div class="mt-[12px]">
+        <div class="text-[16px] text-[1000] mb-2">2、 上传文件</div>
+        <Upload.Dragger :showUploadList="false" :before-upload="beforeUpload" accept=".xlsx,.xls">
+          <p class="ant-upload-text">单击或拖动文件到此区域进行上传 </p>
+        </Upload.Dragger>
+      </div>
+      <span class="mt-[24px]">导入反馈:</span>
+      <div style="border: 1px solid #ccc; width: 100%; height: 300px; overflow: auto; color: red">
+        {{ errMsg }}
+      </div>
+    </div>
+  </BasicModal>
+</template>
+
+<style scoped lang="less"></style>

+ 85 - 0
src/views/educational/division/components/satisfy.vue

@@ -0,0 +1,85 @@
+<script setup lang="ts">
+  import { useModalInner, BasicModal } from '/@/components/Modal';
+  import { PageWrapper } from '/@/components/Page';
+  import { useTable, BasicTable, TableAction } from '/@/components/Table';
+  import { reactive, ref } from 'vue';
+  import { Recordable } from 'vite-plugin-mock';
+  import {
+    getBandingTaskClassSatisfyStudent,
+    postBandingTaskClassRemoveStudent,
+  } from '/@/services/apis/BandingTaskClassController';
+  import { tableSatisfyColumns } from '../data.config';
+
+  const modelRef = ref<Recordable>({});
+
+  const emit = defineEmits(['success', 'register']);
+  const searchInfo = reactive<Recordable>({});
+
+  const [registerTable, { reload }] = useTable({
+    api: getBandingTaskClassSatisfyStudent,
+    title: '满足学生列表',
+    rowKey: 'id',
+    columns: tableSatisfyColumns,
+    useSearchForm: false,
+    showTableSetting: true,
+    bordered: true,
+    immediate: false,
+    canResize: true,
+    actionColumn: {
+      width: 100,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
+  });
+
+  const [registerModal, { setModalProps }] = useModalInner((data) => {
+    setModalProps({ confirmLoading: false });
+    modelRef.value = { ...data.baseData };
+    searchInfo.bandingTaskClassId = data.baseData.id;
+    reload();
+  });
+
+  const handleDelete = async (record: Recordable) => {
+    await postBandingTaskClassRemoveStudent({
+      bandingTaskClassId: modelRef.value.id,
+      newStudentIds: [record.id],
+    });
+    reload();
+  };
+
+  const handleCancel = () => {
+    emit('success');
+  };
+</script>
+
+<template>
+  <BasicModal
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :width="1002"
+    title="满足学生"
+    :footer="null"
+    @cancel="handleCancel"
+  >
+    <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
+      <BasicTable @register="registerTable" :searchInfo="searchInfo">
+        <template #action="{ record }">
+          <TableAction
+            :actions="[
+              {
+                label: '移出',
+                onClick: handleDelete.bind(null, record),
+              },
+            ]"
+          />
+        </template>
+      </BasicTable>
+    </PageWrapper>
+  </BasicModal>
+</template>
+
+<style scoped lang="less"></style>

+ 85 - 0
src/views/educational/division/components/surplus.vue

@@ -0,0 +1,85 @@
+<script setup lang="ts">
+  import { useModalInner, BasicModal } from '/@/components/Modal';
+  import { PageWrapper } from '/@/components/Page';
+  import { useTable, BasicTable, TableAction } from '/@/components/Table';
+  import { reactive, ref } from 'vue';
+  import { Recordable } from 'vite-plugin-mock';
+  import {
+    getBandingTaskClassSurplusStudent,
+    postBandingTaskClassInsertStudent,
+  } from '/@/services/apis/BandingTaskClassController';
+  import { tableSatisfyColumns } from '../data.config';
+
+  const modelRef = ref<Recordable>({});
+
+  const emit = defineEmits(['success', 'register']);
+  const searchInfo = reactive<Recordable>({});
+
+  const [registerTable, { reload }] = useTable({
+    api: getBandingTaskClassSurplusStudent,
+    title: '剩余学生列表',
+    rowKey: 'id',
+    columns: tableSatisfyColumns,
+    useSearchForm: false,
+    showTableSetting: true,
+    bordered: true,
+    immediate: false,
+    canResize: true,
+    actionColumn: {
+      width: 100,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
+  });
+
+  const [registerModal, { setModalProps }] = useModalInner((data) => {
+    setModalProps({ confirmLoading: false });
+    modelRef.value = { ...data.baseData };
+    searchInfo.bandingTaskClassId = data.baseData.id;
+    reload();
+  });
+
+  const handleDelete = async (record: Recordable) => {
+    await postBandingTaskClassInsertStudent({
+      bandingTaskClassId: modelRef.value.id,
+      newStudentIds: [record.id],
+    });
+    reload();
+  };
+
+  const handleCancel = () => {
+    emit('success');
+  };
+</script>
+
+<template>
+  <BasicModal
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :width="1002"
+    title="剩余学生"
+    :footer="null"
+    @cancel="handleCancel"
+  >
+    <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
+      <BasicTable @register="registerTable" :searchInfo="searchInfo">
+        <template #action="{ record }">
+          <TableAction
+            :actions="[
+              {
+                label: '移出',
+                onClick: handleDelete.bind(null, record),
+              },
+            ]"
+          />
+        </template>
+      </BasicTable>
+    </PageWrapper>
+  </BasicModal>
+</template>
+
+<style scoped lang="less"></style>

+ 169 - 28
src/views/educational/division/data.config.ts

@@ -1,3 +1,4 @@
+
 import { requestMagicApi } from '/@/api/magicApi';
 import { getDataOption } from '/@/api/system/dic';
 import { getClassOption, getMajorSetOption } from '/@/api/userMagic';
@@ -27,7 +28,7 @@ export const table2Columns: BasicColumn[] = [
   },
   {
     title: '班级人数',
-    dataIndex: 'count',
+    dataIndex: 'number',
     align: 'left',
     width: 80,
     editRow: true,
@@ -67,7 +68,7 @@ export const table2Columns: BasicColumn[] = [
   },
   {
     title: '是否订单班',
-    dataIndex: 'isOrder',
+    dataIndex: 'isOrderClass',
     align: 'left',
     width: 100,
     editRow: true,
@@ -76,74 +77,84 @@ export const table2Columns: BasicColumn[] = [
       return value ? '是' : '否';
     },
   },
+  {
+    title: '分班排序',
+    dataIndex: 'sortCode',
+    align: 'left',
+    width: 80,
+    editRow: true,
+    editRule: true,
+    editComponent: 'InputNumber',
+    editComponentProps: {
+      min: 0,
+    },
+  },
 ];
 
 export const table3Columns: BasicColumn[] = [
   {
     title: '专业方向',
-    dataIndex: 'majorSetId',
+    dataIndex: 'majorSetName',
     align: 'left',
     width: 250,
   },
   {
     title: '第一志愿报名数',
-    dataIndex: 'fc',
+    dataIndex: 'firstAmbitionCount',
     align: 'left',
     width: 150,
   },
   {
     title: '第二志愿报名数',
-    dataIndex: 'fd',
+    dataIndex: 'secondAmbitionCount',
     align: 'left',
     width: 150,
   },
   {
     title: '分班班级',
-    dataIndex: 'className',
+    dataIndex: 'name',
     align: 'left',
   },
   {
     title: '班级人数',
-    dataIndex: 'count',
+    dataIndex: 'number',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '分班排序',
+    dataIndex: 'sortCode',
     align: 'left',
     width: 80,
   },
   {
     title: '限制身高大于(cm)',
-    dataIndex: 'he',
+    dataIndex: 'height',
     align: 'left',
-    width: 120,
+    width: 150,
   },
   {
     title: '限制成绩高于(分)',
-    dataIndex: 'sc',
+    dataIndex: 'score',
     align: 'left',
-    width: 120,
+    width: 150,
   },
   {
     title: '满足人数',
-    dataIndex: 'cc',
-    align: 'left',
+    dataIndex: 'satisfyCount',
     width: 80,
   },
   {
     title: '剩余人数',
-    dataIndex: 'ss',
-    align: 'left',
-    width: 250,
-  },
-  {
-    title: '剩余调剂专业',
-    dataIndex: 'dd',
-    align: 'left',
-    width: 200,
+    dataIndex: 'surplusCount',
+    width: 80,
   },
 ];
 
 export const table4Columns: BasicColumn[] = [
   {
     title: '学号',
-    dataIndex: 'studentId',
+    dataIndex: 'credentialNumber',
     align: 'left',
   },
   {
@@ -210,7 +221,7 @@ export const table4Columns: BasicColumn[] = [
 
 export const searchForm4Schema: FormSchema[] = [
   {
-    field: 'studentId',
+    field: 'credentialNumber',
     label: '学号',
     component: 'Input',
     colProps: { span: 8 },
@@ -222,13 +233,13 @@ export const searchForm4Schema: FormSchema[] = [
     colProps: { span: 8 },
   },
   {
-    field: 'schoolId',
+    field: 'graduateSchool',
     label: '毕业学校',
     component: 'Input',
     colProps: { span: 8 },
   },
   {
-    field: 'className',
+    field: 'graduateClass',
     label: '毕业班级',
     component: 'Input',
     colProps: { span: 8 },
@@ -245,9 +256,22 @@ export const searchForm4Schema: FormSchema[] = [
     colProps: { span: 8 },
   },
   {
-    field: 'classId',
+    field: 'status',
+    label: '班级状态',
+    component: 'Select',
+    componentProps: {
+      getPopupContainer: () => document.body,
+      options: [
+        { label: '未分班', value: '0' },
+        { label: '已分班', value: '' },
+      ],
+    },
+    colProps: { span: 8 },
+  },
+  {
+    field: 'className',
     label: '班级',
-    component: 'ApiSelect',
+    component: 'Input',
     componentProps: {
       getPopupContainer: () => document.body,
       api: getClassOption,
@@ -256,6 +280,22 @@ export const searchForm4Schema: FormSchema[] = [
   },
 ];
 
+
+export const form4Schema: FormSchema[] = [
+  {
+    field: 'studentIds',
+    label: '调整学生',
+    component: 'Input',
+    colProps: { span: 24 },
+  },
+  {
+    field: 'bandingTaskClassId',
+    label: '调到班级',
+    component: 'Input',
+    colProps: { span: 24 },
+  },
+];
+
 export const table5Columns: BasicColumn[] = [
   {
     title: '专业方向',
@@ -317,3 +357,104 @@ export const table5Columns: BasicColumn[] = [
     width: 120,
   },
 ];
+
+export const tableSatisfyColumns: BasicColumn[] = [
+  {
+    title: '毕业学校',
+    dataIndex: 'graduateSchool',
+    align: 'left',
+    width: 180,
+  },
+  {
+    title: '学生姓名',
+    dataIndex: 'name',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '性别',
+    dataIndex: 'gender',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '身份证号',
+    dataIndex: 'credentialNumber',
+    align: 'left',
+  },
+  {
+    title: '身高(cm)',
+    dataIndex: 'height',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '体重(kg)',
+    dataIndex: 'wg',
+    align: 'left',
+    width: 80,
+  },
+  {
+    title: '成绩',
+    dataIndex: 'score',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '毕业班级',
+    dataIndex: 'graduateClass',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '学生来源',
+    dataIndex: 'source',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '住宿类型',
+    dataIndex: 'stateType',
+    align: 'left',
+    width: 100,
+  },
+  {
+    title: '手机号',
+    dataIndex: 'cName',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '第一志愿',
+    dataIndex: 'firstAmbition',
+    align: 'left',
+    width: 120,
+  },
+  {
+    title: '第二志愿',
+    dataIndex: 'secondAmbition',
+    align: 'left',
+    width: 120,
+  },
+];
+
+export const table6Columns: BasicColumn[] = [
+  {
+    title: '专业方向',
+    dataIndex: 'majorSetName',
+    align: 'left',
+    width: 250,
+  },
+  {
+    title: '限制身高大于(cm)',
+    dataIndex: 'height',
+    align: 'left',
+    width: 150,
+  },
+  {
+    title: '限制成绩高于(分)',
+    dataIndex: 'score',
+    align: 'left',
+    width: 150,
+  },
+];

+ 43 - 9
src/views/educational/division/index.vue

@@ -9,18 +9,19 @@
         </Steps>
       </div>
       <div class="page-dsion-body">
-        <DsionStep1 v-show="state.stepIndex === 0" />
-        <DsionStep2 v-show="state.stepIndex === 1" />
-        <DsionStep3 v-show="state.stepIndex === 2" />
-        <DsionStep4 v-show="state.stepIndex === 3" />
-        <DsionStep5 v-show="state.stepIndex === 4" />
+        <DsionStep1 ref="dsionStep1Ref" :taskId="taskId" v-show="state.stepIndex === 0" />
+        <DsionStep6 ref="dsionStep6Ref" :taskId="taskId" v-show="state.stepIndex === 1" />
+        <DsionStep2 ref="dsionStep2Ref" :taskId="taskId" v-show="state.stepIndex === 2" />
+        <DsionStep3 ref="dsionStep3Ref" :taskId="taskId" v-show="state.stepIndex === 3" />
+        <DsionStep4 ref="dsionStep4Ref" :taskId="taskId" v-show="state.stepIndex === 4" />
+        <DsionStep5 v-show="state.stepIndex === 5" />
       </div>
       <div class="page-dsion-floor">
         <a-button v-show="state.stepIndex !== 0" @click="handleStep(0)" class="ml-[24px]">
           上一步
         </a-button>
         <a-button
-          v-show="state.stepIndex !== 4"
+          v-show="state.stepIndex !== 5"
           type="primary"
           @click="handleStep(1)"
           class="ml-[24px]"
@@ -28,7 +29,7 @@
           下一步
         </a-button>
         <a-button
-          v-show="state.stepIndex === 4"
+          v-show="state.stepIndex === 5"
           type="primary"
           class="ml-[24px]"
           @click="handleSubmit"
@@ -43,17 +44,29 @@
 <script setup lang="ts">
   import { PageWrapper } from '/@/components/Page';
   import { Steps } from 'ant-design-vue';
-  import { reactive, onMounted } from 'vue';
+  import { reactive, onMounted, ref } from 'vue';
   import DsionStep1 from './components/DsionStep1.vue';
   import DsionStep2 from './components/DsionStep2.vue';
   import DsionStep3 from './components/DsionStep3.vue';
   import DsionStep4 from './components/DsionStep4.vue';
   import DsionStep5 from './components/DsionStep5.vue';
+  import DsionStep6 from './components/DsionStep6.vue';
+
+  defineProps({
+    taskId: { type: String, default: '' },
+  });
+
+  const dsionStep1Ref = ref<ElRef>(null);
+  const dsionStep2Ref = ref<ElRef>(null);
+  const dsionStep3Ref = ref<ElRef>(null);
+  const dsionStep4Ref = ref<ElRef>(null);
+  const dsionStep6Ref = ref<ElRef>(null);
 
   const state = reactive({
     stepIndex: 0,
     stepItems: [
       { title: '分班规则' },
+      { title: '专业条件' },
       { title: '班级配置' },
       { title: '自动分班' },
       { title: '班级调整' },
@@ -63,14 +76,35 @@
 
   const handleSubmit = () => {};
 
-  const handleStep = (type) => {
+  const handleStep = async (type) => {
     if (type == 1) {
+      const isOk = await stepValidate[state.stepIndex]();
+      if (!isOk) {
+        return;
+      }
       state.stepIndex += 1;
+      await stepReload[state.stepIndex]();
     } else {
       state.stepIndex -= 1;
     }
   };
 
+  const stepValidate = {
+    0: () => dsionStep1Ref.value.validateStep(),
+    1: () => dsionStep6Ref.value.validateStep(),
+    2: () => dsionStep2Ref.value.validateStep(),
+    3: () => dsionStep3Ref.value.validateStep(),
+    4: () => dsionStep4Ref.value.validateStep(),
+  };
+
+  const stepReload = {
+    0: () => dsionStep1Ref.value.reloadStep(),
+    1: () => dsionStep6Ref.value.reloadStep(),
+    2: () => dsionStep2Ref.value.reloadStep(),
+    3: () => dsionStep3Ref.value.reloadStep(),
+    4: () => dsionStep4Ref.value.reloadStep(),
+  };
+
   onMounted(async () => {});
 </script>
 

+ 52 - 96
src/views/educational/enrollment/components/data.config.ts

@@ -7,66 +7,62 @@ const statusMap = {
   2: '已过期',
 };
 export const tableColumns: BasicColumn[] = [
-  {
-    title: '计划名称',
-    dataIndex: 'name',
-    width: 150,
-  },
   {
     title: '招生类型',
     dataIndex: 'enrollTypeCn',
+    align: 'left',
     width: 130,
   },
   {
     title: '招生年级',
     dataIndex: 'gradeIdCn',
-    width: 120,
-  },
-  {
-    title: '招生工作起始日期',
-    dataIndex: 'startDate',
-    customRender({ text, record }) {
-      return text + ' 至 ' + record.endDate;
-    },
-    width: 300,
     align: 'left',
   },
-  {
-    title: '总的招生专业方向个数',
-    dataIndex: 'baseMajorSetSum',
-    width: 150,
-  },
-  {
-    title: '总计划招生人数',
-    dataIndex: 'enrollmentStuNum',
-    width: 150,
-  },
-  {
-    title: '状态',
-    dataIndex: 'status',
-    customRender({ text }) {
-      return statusMap[text];
-    },
-    width: 150,
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    width: 150,
-    slots: {
-      customRender: 'action',
-    },
-    fixed: 'right',
-  },
+  // {
+  //   title: '招生工作起始日期',
+  //   dataIndex: 'startDate',
+  //   customRender({ text, record }) {
+  //     return text + ' 至 ' + record.endDate;
+  //   },
+  //   width: 300,
+  //   align: 'left',
+  // },
+  // {
+  //   title: '总的招生专业方向个数',
+  //   dataIndex: 'baseMajorSetSum',
+  //   width: 150,
+  // },
+  // {
+  //   title: '总计划招生人数',
+  //   dataIndex: 'enrollmentStuNum',
+  //   width: 150,
+  // },
+  // {
+  //   title: '状态',
+  //   dataIndex: 'status',
+  //   customRender({ text }) {
+  //     return statusMap[text];
+  //   },
+  //   width: 150,
+  // },
+  // {
+  //   title: '操作',
+  //   dataIndex: 'action',
+  //   width: 150,
+  //   slots: {
+  //     customRender: 'action',
+  //   },
+  //   fixed: 'right',
+  // },
 ];
 
 export const searchForm: FormSchema[] = [
-  {
-    field: 'name',
-    label: '招生计划名称',
-    component: 'Input',
-    colProps: { span: 8 },
-  },
+  // {
+  //   field: 'name',
+  //   label: '招生计划名称',
+  //   component: 'Input',
+  //   colProps: { span: 8 },
+  // },
   {
     field: 'gradeId',
     label: '年级',
@@ -91,68 +87,28 @@ export const searchForm: FormSchema[] = [
 
 export const formSchema: FormSchema[] = [
   {
-    field: 'name',
-    label: '招生计划名称',
-    component: 'Input',
-    colProps: { span: 24 },
-    required: true,
-  },
-  {
-    field: 'type',
-    label: '招生类型',
-    component: 'ApiSelect',
-    componentProps: {
-      getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: { code: 'enroll_type' },
-    },
-    colProps: { span: 24 },
-    required: true,
-  },
-  {
+    label: '所属年级',
     field: 'gradeId',
-    label: '招生年级',
     component: 'ApiSelect',
     required: true,
-    componentProps: ({}) => {
-      return {
-        getPopupContainer: () => document.body,
-        api: requestMagicApi,
-        params: { url: 'baseData/grade/option' },
-        showSearch: true,
-        filterOption: (input: string, option: any) => {
-          return (
-            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
-            option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
-          );
-        },
-      };
-    },
-    colProps: { span: 24 },
-  },
-  {
-    field: 'startDate',
-    label: '招生工作开始时间',
-    component: 'DatePicker',
     componentProps: {
       getPopupContainer: () => document.body,
-      format: 'YYYY-MM-DD',
-      valueFormat: 'YYYY-MM-DD',
+      api: requestMagicApi,
+      params: { url: 'baseData/grade/option' },
     },
     colProps: { span: 24 },
-    required: true,
   },
   {
-    field: 'endDate',
-    label: '招生工作结束时间',
-    component: 'DatePicker',
+    label: '招生类型',
+    field: 'enrollType',
+    component: 'ApiSelect',
+    required: true,
     componentProps: {
       getPopupContainer: () => document.body,
-      format: 'YYYY-MM-DD',
-      valueFormat: 'YYYY-MM-DD',
+      api: getDataOption,
+      params: { code: 'enroll_type' },
     },
     colProps: { span: 24 },
-    required: true,
   },
 ];
 

+ 61 - 39
src/views/educational/enrollment/components/edit.vue

@@ -1,54 +1,76 @@
+<template>
+  <BasicModal
+    @ok="handleSubmit"
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :title="getTitle"
+    :width="1002"
+    showFooter
+  >
+    <BasicForm @register="registerForm" />
+  </BasicModal>
+</template>
 <script setup lang="ts">
-  import BasicModal from '/@/components/Modal/src/BasicModal.vue';
-  import { useModalInner } from '/@/components/Modal';
-  import { ref } from 'vue';
-  import BasicForm from '/@/components/Form/src/BasicForm.vue';
-  import { useForm } from '/@/components/Form';
-  import { formSchema } from './data.config';
+  import { ref, computed, unref } from 'vue';
   import { useMessage } from '/@/hooks/web/useMessage';
-  const emits = defineEmits(['success', 'register']);
-  const title = ref('');
-  const [modalReg, { setModalProps, closeModal }] = useModalInner((data) => {
-    title.value = data.isEdit ? '编辑招生计划' : '新增招生计划';
-  });
-  const [formReg, { validate, resetFields }] = useForm({
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, useForm } from '/@/components/Form/index';
+  import { formSchema } from './data.config';
+  import {
+    getEnrollmentPlanInfo,
+    putStudentEnrollmentPlan,
+    postStudentEnrollmentPlan,
+  } from '/@/services/apis/EnrollmentPlanController';
+
+  const isUpdate = ref(true);
+  const modelRef = ref({});
+  const emit = defineEmits(['success', 'register']);
+  const { createMessage } = useMessage();
+  const [registerForm, { validate, setFieldsValue, resetFields }] = useForm({
+    labelWidth: 100,
     schemas: formSchema,
-    layout: 'vertical',
     showActionButtonGroup: false,
   });
-  const handleCancel = () => {
+
+  const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
     resetFields();
-    closeModal();
-  };
-  const { createMessage } = useMessage();
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+
+    if (unref(isUpdate)) {
+      const resData = await getEnrollmentPlanInfo({ id: data.baseData.id });
+
+      modelRef.value = { ...resData };
+      setFieldsValue({
+        ...resData,
+      });
+    }
+  });
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '新增招生计划' : '编辑招生计划'));
   const handleSubmit = async () => {
-    const values = await validate();
-    setModalProps({
-      confirmLoading: true,
-    });
-    createMessage.success('新增成功');
-    await resetFields();
-    closeModal();
     try {
-    } catch {
-      createMessage.warning('新增失败');
+      const values = await validate();
+      setModalProps({ confirmLoading: true });
+      const postParams = unref(modelRef);
+      Object.assign(postParams, values);
+
+      if (unref(isUpdate)) {
+        await putStudentEnrollmentPlan(postParams as API.UpdateEnrollmentPlanDto);
+      } else {
+        await postStudentEnrollmentPlan(postParams as API.AddEnrollmentPlanDto);
+      }
+
+      createMessage.success('操作成功');
+      closeModal();
+      emit('success');
     } finally {
       setModalProps({ confirmLoading: false });
     }
   };
 </script>
 
-<template>
-  <BasicModal
-    @ok="handleSubmit"
-    @cancel="handleCancel"
-    width="600px"
-    @register="modalReg"
-    v-bind="$attrs"
-    :title="title"
-  >
-    <BasicForm @register="formReg" />
-  </BasicModal>
-</template>
-
 <style scoped lang="less"></style>

+ 25 - 26
src/views/educational/enrollment/index.vue

@@ -21,17 +21,33 @@
     title: '招生计划列表',
     columns: tableColumns,
     api: getEnrollmentPlanPage,
-    useSearchForm: true,
-    bordered: true,
-    showTableSetting: true,
+    rowKey: 'id',
     formConfig: {
       labelWidth: 120,
       schemas: searchForm,
     },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: true,
+    canResize: true,
+    actionColumn: {
+      width: 120,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
   });
   const { createMessage } = useMessage();
-  const handleEdit = (record: any, isEdit: boolean) => {
-    openModal(true, { ...record, isEdit: isEdit });
+
+  const handleEdit = (record: any, isUpdate: boolean) => {
+    openModal(true, {
+      isUpdate: isUpdate,
+      baseData: {
+        ...record,
+      },
+    });
   };
   const handleMaintenance = (record) => {
     openMaintenanceReg(true, { ...record });
@@ -66,36 +82,19 @@
   <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
     <BasicTable @register="tableReg">
       <template #toolbar>
-        <a-button @click="handleMaintenance">维护</a-button>
         <a-button type="primary" @click="handleEdit(null, false)">新增</a-button>
-        <a-button @click="handleCopy">复制</a-button>
       </template>
       <template #action="{ record }">
         <TableAction
           :actions="[
             {
-              ifShow: () => record.status === 0,
-              label: '发布',
-              popConfirm: {
-                title: '是否确认发布',
-                confirm: changeStatus.bind(null, record),
-              },
-            },
-            {
-              label: '维护',
-              onClick: openMaintenanceReg.bind(null, record, true),
-            },
-            {
-              label: '复制',
-              onClick: openCopyPlanModal.bind(null, record, true),
+              label: '编辑',
+              onClick: handleEdit.bind(null, record, true),
             },
             {
-              ifShow: () => record.status === 0,
               label: '删除',
-              popConfirm: {
-                title: '是否确认删除',
-                confirm: handleDelete.bind(null, record),
-              },
+              color: 'error',
+              onClick: handleDelete.bind(null, record),
             },
           ]"
         />

+ 64 - 59
src/views/educational/teacherbasemanager/components/TeacherbaseManagerDrawer.vue

@@ -43,14 +43,14 @@
             <a-select
               :options="genderOption"
               placeholder="请选择"
-              style="width: 100%;"
+              style="width: 100%"
               v-model:value="record.gender"
             />
           </template>
           <template #is_guardian="{ record }">
             <a-select
               placeholder="请选择"
-              style="width: 100%;"
+              style="width: 100%"
               v-model:value="record.isGuardian"
               :options="[
                 { label: '是', value: 1 },
@@ -64,14 +64,14 @@
               format="YYYY-MM-DD"
               valueFormat="YYYY-MM-DD"
               placeholder="请选择"
-              style="width: 100%;"
+              style="width: 100%"
               v-model:value="record.dayOfBirth"
             />
           </template>
           <template #political_state="{ record }">
             <a-select
               placeholder="请选择"
-              style="width: 100%;"
+              style="width: 100%"
               v-model:value="record.politicalState"
               :options="politicalState"
             />
@@ -86,12 +86,12 @@
             <a-input placeholder="请输入" v-model:value="record.mobile" />
           </template>
           <template #action="{ index, record }">
-            <div style="display: flex;">
+            <div style="display: flex">
               <a-button type="link" @click="handleAdd">
                 <PlusOutlined />
               </a-button>
               <a-button type="link" @click="handleDelete(index)" v-if="dataSource.length > 1">
-                <MinusOutlined style="color: red;" />
+                <MinusOutlined style="color: red" />
               </a-button>
             </div>
           </template>
@@ -274,59 +274,64 @@
       validateEducation(),
       validateContact(),
       validateRegular(),
-    ]).then(async (values) => {
-      const formValues = {
-        baseTeacherContactList: [values[3]],
-        baseTeacherEducationList: [values[2]],
-        baseTeacherFamilyList: [values[1]],
-        baseTeacherFamilyMemberList: dataSource.value,
-        baseTeacherList: [values[0]],
-        baseTeacherEmployList: [],
-        baseTeacherRegularList: [values[4]],
-        userName: values[0].userName,
-        name: values[0].name,
-        mobile: values[0].mobile,
-        email: values[0]?.email,
-        gender: values[0]?.gender,
-        credentialNumber: values[0].credentialNumber,
-        credentialType: values[0].credentialType,
-        departmentIds: values[0].departmentIds?.join(),
-      };
-      if (state.isUpdate) {
-        formValues['id'] = state.rowId;
-        await updateXjrUser(formValues);
-        notification.success({
-          message: '提示',
-          description: t('修改成功!'),
-        }); //提示消息
-        Promise.all([
-          clearEducation(),
-          clearFamily(),
-          clearContact(),
-          clearRegular(),
-          clearValidate(),
-        ]).then(() => {
-          emit('success');
-          closeDrawer();
-        });
-      } else {
-        await addXjrUser(formValues);
-        notification.success({
-          message: '提示',
-          description: t('新增成功!'),
-        }); //提示消息
-        Promise.all([
-          clearEducation(),
-          clearFamily(),
-          clearContact(),
-          clearRegular(),
-          clearValidate(),
-        ]).then(() => {
-          emit('success');
-          closeDrawer();
-        });
-      }
-    });
+    ])
+      .then(async (values) => {
+        setDrawerProps({ confirmLoading: true });
+        const formValues = {
+          baseTeacherContactList: [values[3]],
+          baseTeacherEducationList: [values[2]],
+          baseTeacherFamilyList: [values[1]],
+          baseTeacherFamilyMemberList: dataSource.value,
+          baseTeacherList: [values[0]],
+          baseTeacherEmployList: [],
+          baseTeacherRegularList: [values[4]],
+          userName: values[0].userName,
+          name: values[0].name,
+          mobile: values[0].mobile,
+          email: values[0]?.email,
+          gender: values[0]?.gender,
+          credentialNumber: values[0].credentialNumber,
+          credentialType: values[0].credentialType,
+          departmentIds: values[0].departmentIds?.join(),
+        };
+        if (state.isUpdate) {
+          formValues['id'] = state.rowId;
+          await updateXjrUser(formValues);
+          notification.success({
+            message: '提示',
+            description: t('修改成功!'),
+          }); //提示消息
+          Promise.all([
+            clearEducation(),
+            clearFamily(),
+            clearContact(),
+            clearRegular(),
+            clearValidate(),
+          ]).then(() => {
+            emit('success');
+            closeDrawer();
+          });
+        } else {
+          await addXjrUser(formValues);
+          notification.success({
+            message: '提示',
+            description: t('新增成功!'),
+          }); //提示消息
+          Promise.all([
+            clearEducation(),
+            clearFamily(),
+            clearContact(),
+            clearRegular(),
+            clearValidate(),
+          ]).then(() => {
+            emit('success');
+            closeDrawer();
+          });
+        }
+      })
+      .finally(() => {
+        setDrawerProps({ confirmLoading: false });
+      });
   }
 
   function handleClose() {