فهرست منبع

Merge remote-tracking branch 'origin/dev' into dev

zcuishan 4 ماه پیش
والد
کامیت
96676af022

+ 39 - 0
src/services/apis/ActivityEnrollController.ts

@@ -0,0 +1,39 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Activity Enroll Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增活动信息 POST /activity/activityEnroll */
+export async function postActivityActivityEnroll(params:API.AddActivityEnrollDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/activity/activityEnroll', data:params},{errorMessageMode:mode});}
+/** 修改活动信息 PUT /activity/activityEnroll */
+export async function putActivityActivityEnroll(params:API.UpdateActivityInfoDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/activity/activityEnroll', data:params},{errorMessageMode:mode});}
+/** 删除活动信息 DELETE /activity/activityEnroll */
+export async function deleteActivityActivityEnroll(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/activity/activityEnroll', data:params},{errorMessageMode:mode});}
+/** 修改状态 POST /activity/activityEnroll/change-status */
+export async function postActivityEnrollChangeStatus(params:API.ChangeStatusDto[]
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/activity/activityEnroll/change-status', data:params},{errorMessageMode:mode});}
+/** 报名 POST /activity/activityEnroll/enroll */
+export async function postActivityEnrollEnroll(mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/activity/activityEnroll/enroll', data:{}},{errorMessageMode:mode});}
+/** 导出列表 POST /activity/activityEnroll/export-query */
+export async function postActivityEnrollExportQuery(params:API.PageInput
+,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
+        ({url: '/activity/activityEnroll/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
+/** 活动信息列表(分页) GET /activity/activityEnroll/page */
+export async function getActivityEnrollPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ActivityEnrollPageVo>>
+        ({url: '/activity/activityEnroll/page', params:params},{errorMessageMode:mode});}
+            

+ 41 - 0
src/services/apis/ActivityInfoController.ts

@@ -0,0 +1,41 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Activity Info Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增活动信息 POST /activity/activityInfo */
+export async function postActivityActivityInfo(params:API.AddActivityInfoDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/activity/activityInfo', data:params},{errorMessageMode:mode});}
+/** 修改活动信息 PUT /activity/activityInfo */
+export async function putActivityActivityInfo(params:API.UpdateActivityInfoDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/activity/activityInfo', data:params},{errorMessageMode:mode});}
+/** 删除活动信息 DELETE /activity/activityInfo */
+export async function deleteActivityActivityInfo(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/activity/activityInfo', data:params},{errorMessageMode:mode});}
+/** 修改状态 POST /activity/activityInfo/change-status */
+export async function postActivityInfoChangeStatus(params:API.ChangeStatusDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/activity/activityInfo/change-status', data:params},{errorMessageMode:mode});}
+/** 移动端活动信息列表(分页) GET /activity/activityInfo/effective-list */
+export async function getActivityInfoEffectiveList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ActivityInfoPageVo>>
+        ({url: '/activity/activityInfo/effective-list', params:params},{errorMessageMode:mode});}
+/** 根据id查询活动信息信息 GET /activity/activityInfo/info */
+export async function getActivityInfoInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ActivityInfoVo>
+        ({url: '/activity/activityInfo/info', params:params},{errorMessageMode:mode});}
+/** 我的报名记录(分页) GET /activity/activityInfo/my-enroll-list */
+export async function getActivityInfoMyEnrollList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ActivityInfoPageVo>>
+        ({url: '/activity/activityInfo/my-enroll-list', params:params},{errorMessageMode:mode});}
+/** 活动信息列表(分页) GET /activity/activityInfo/page */
+export async function getActivityInfoPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ActivityInfoPageVo>>
+        ({url: '/activity/activityInfo/page', params:params},{errorMessageMode:mode});}
+            

+ 5 - 1
src/services/apis/BandingTaskClassController.ts

@@ -26,6 +26,10 @@ export async function deleteBandingBandingTaskClass(params:string[],mode: ErrorM
 export async function postBandingTaskClassChangeClass(params:API.ChangeClassDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/banding/bandingTaskClass/change-class', data:params},{errorMessageMode:mode});}
+/** 修改状态 POST /banding/bandingTaskClass/change-status */
+export async function postBandingTaskClassChangeStatus(params:API.ChangeClassStatusDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/banding/bandingTaskClass/change-status', data:params},{errorMessageMode:mode});}
 /** 分班后的学生列表 GET /banding/bandingTaskClass/class-student */
 export async function getBandingTaskClassClassStudent(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskClassStudentListVo[]>
         ({url: '/banding/bandingTaskClass/class-student', params:params},{errorMessageMode:mode});}
@@ -36,7 +40,7 @@ export async function getBandingTaskClassClassSure(params:any,mode: ErrorMessage
 export async function getBandingTaskClassClassListParam(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.BandingTaskClassVo[]>
         ({url: '/banding/bandingTaskClass/classListParam', params:params},{errorMessageMode:mode});}
 /** 导出学生列表 POST /banding/bandingTaskClass/export-query */
-export async function postBandingTaskClassExportQuery(params:API.PageInput_1
+export async function postBandingTaskClassExportQuery(params:API.PageInput_2
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/banding/bandingTaskClass/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 导入 POST /banding/bandingTaskClass/import */

+ 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_2
+export async function postConsumptionClassQfExportQuery(params:API.PageInput_3
 ,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_3
+export async function postConsumptionExportQuery(params:API.PageInput_4
 ,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_4
+export async function postAppPage(params:API.PageInput_5
 ,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_5
+export async function postExecutePage(params:API.PageInput_6
 ,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_6
+export async function putRoomRoomBedAdjust(params:API.PageInput_7
 ,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_6[]
+export async function putRoomBedAdjustAdjustBedBatch(params:API.PageInput_7[]
 ,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_7
+export async function postSystemSystemUpdateMessage(params:API.PageInput_8
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
         ({url: '/system/systemUpdateMessage', data:params},{errorMessageMode:mode});}
 /** 修改系统消息 PUT /system/systemUpdateMessage */
-export async function putSystemSystemUpdateMessage(params:API.PageInput_8
+export async function putSystemSystemUpdateMessage(params:API.PageInput_9
 ,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_9
+export async function postWfSubscriptionExportQuery(params:API.PageInput_10
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/ledger/wfSubscription/export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
 /** 物品申购台账列表(分页) GET /ledger/wfSubscription/page */

+ 8 - 2
src/services/apis/index.ts

@@ -3,7 +3,9 @@
 
 // 该文件自动生成,请勿手动修改!
 
-        import * as BaseAppFunctionController from './BaseAppFunctionController';
+        import * as ActivityEnrollController from './ActivityEnrollController';
+import * as ActivityInfoController from './ActivityInfoController';
+import * as BaseAppFunctionController from './BaseAppFunctionController';
 import * as AppFuncDesignController from './AppFuncDesignController';
 import * as AppMenuController from './AppMenuController';
 import * as AppPageDesignController from './AppPageDesignController';
@@ -200,7 +202,11 @@ import * as ExamPlanController from './ExamPlanController';
 
 
         export default {
-            /** Base App Function Controller */
+            /** Activity Enroll Controller */
+ActivityEnrollController,
+/** Activity Info Controller */
+ActivityInfoController,
+/** Base App Function Controller */
 BaseAppFunctionController,
 /** App Func Design Controller */
 AppFuncDesignController,

+ 297 - 28
src/services/typing.d.ts

@@ -73,6 +73,187 @@ parentMobile?: string;
 parentName?: string;
 }
 
+type ActivityEnrollPageVo = {
+/** 活动id */
+activityInfoId?: string;
+/** 报名时间 */
+createDate?: string;
+/** 活动结束时间 */
+endDate?: string;
+id?: string;
+/** 手机号 */
+mobile?: string;
+/** 参与人员名称 */
+name?: string;
+/** 角色id */
+roleId?: string;
+/** 状态(0:待确认 1:未参与 2:已参与) */
+status?: number;
+/** 用户名 */
+userName?: string;
+}
+
+type ActivityEnrollRangeVo = {
+/** 活动(activity) */
+activityInfoId?: string;
+/** 所属班级id */
+classId?: string;
+/** 所属部门id */
+deptId?: string;
+id?: string;
+/** 名称 */
+name?: string;
+/** 用id */
+userId?: string;
+}
+
+type ActivityInfoPageVo = {
+/** 1:校企合作活动 2:赛事活动 */
+category?: number;
+/** 活动内容 */
+content?: string;
+/** 封面图片 */
+coverFileId?: string;
+/** 封面图片地址 */
+coverFileUrl?: string;
+/** 活动负责人 */
+dutyPerson?: string;
+/** 活动负责人电话 */
+dutyPersonMobile?: string;
+/** 活动结束时间 */
+endDate?: string;
+/** 报名人数 */
+enrollCount?: number;
+/** 报名结束时间 */
+enrollEndTime?: string;
+/** 报名范围 */
+enrollRange?: string;
+/** 参与状态(0:待确认 1:未参与 2:已参与) */
+enrollStatus?: number;
+/** 合作企业 */
+enterpriseId?: string;
+/** 合作企业名称 */
+enterpriseName?: string;
+id?: string;
+/** 是否已报名(1:是 0:否) */
+isEnroll?: number;
+/** 活动名称 */
+name?: string;
+/** 组织部门(xjr_department) */
+orgId?: string;
+/** 活动地点 */
+place?: string;
+/** 活动开始时间 */
+startDate?: string;
+/** 状态(0:未发布 1:报名中 2:报名结束 3:活动结束) */
+status?: number;
+/** 活动类型(xjr_dictionary_detail[match_activity_type]) */
+type?: string;
+/** 活动类型-中文 */
+typeCn?: string;
+}
+
+type ActivityInfoVo = {
+/** activityEnrollRange子表 */
+activityEnrollRangeList?: ActivityEnrollRangeVo[];
+/** 1:校企合作活动 2:赛事活动 */
+category?: number;
+/** 活动内容 */
+content?: string;
+/** 封面图片 */
+coverFileId?: string;
+/** 活动负责人 */
+dutyPerson?: string;
+/** 活动负责人电话 */
+dutyPersonMobile?: string;
+/** 活动结束时间 */
+endDate?: string;
+/** 报名人数 */
+enrollCount?: number;
+/** 报名结束时间 */
+enrollEndTime?: string;
+/** 报名范围 */
+enrollRange?: string;
+/** 合作企业 */
+enterpriseId?: string;
+/** 合作企业名称 */
+enterpriseName?: string;
+id?: string;
+/** 赛事名称 */
+name?: string;
+/** 未确认参与人数 */
+notSureCount?: number;
+/** 组织部门(xjr_department) */
+orgId?: string;
+/** 组织部门名称 */
+orgName?: string;
+/** 活动地点 */
+place?: string;
+/** 活动开始时间 */
+startDate?: string;
+/** 状态(0:未发布 1:报名中 2:报名结束 3:活动结束) */
+status?: number;
+/** 学生人数 */
+studentCount?: number;
+/** 确认参与人数 */
+sureCount?: number;
+/** 教师人数 */
+teacherCount?: number;
+/** 活动类型(xjr_dictionary_detail[match_activity_type]) */
+type?: string;
+}
+
+type AddActivityEnrollDto = {
+/** 活动(activity_info) */
+activityInfoId?: string;
+/** 参与人 */
+enrollRangeList?: AddActivityEnrollRangeDto[];
+}
+
+type AddActivityEnrollRangeDto = {
+/** 活动(activity) */
+activityInfoId?: string;
+/** 所属班级id */
+classId?: string;
+/** 所属部门id */
+deptId?: string;
+/** 用id */
+userId?: string;
+}
+
+type AddActivityInfoDto = {
+/** activityEnrollRange子表 */
+activityEnrollRangeList?: AddActivityEnrollRangeDto[];
+/** 1:校企合作活动 2:赛事活动 */
+category?: number;
+/** 活动内容 */
+content?: string;
+/** 封面图片 */
+coverFileId?: string;
+/** 活动负责人 */
+dutyPerson?: string;
+/** 活动负责人电话 */
+dutyPersonMobile?: string;
+/** 活动结束时间 */
+endDate?: string;
+/** 报名结束时间 */
+enrollEndTime?: string;
+/** 合作企业(校企活动时填写) */
+enterpriseId?: string;
+/** 赛事名称 */
+name?: string;
+/** 组织部门(xjr_department) */
+orgId?: string;
+/** 活动地点 */
+place?: string;
+/** 活动开始时间 */
+startDate?: string;
+/** 状态(0:未发布 1:报名中 2:报名结束 3:活动结束) */
+status?: number;
+/** 活动类型(xjr_dictionary_detail[match_activity_type]) */
+type?: string;
+}
+
 type AddAppMenuDto = {
 /** 分类id */
 categoryId?: string;
@@ -6520,6 +6701,8 @@ bankType?: string;
 bankTypeCn?: string;
 /** 奖学金类别ID(base_student_scholarship_category) */
 baseStudentScholarshipCategoryId?: string;
+/** 奖助学金类型-中文 */
+categoryCn?: string;
 /** 班级名称 */
 className?: string;
 /** 创建时间 */
@@ -7054,12 +7237,26 @@ isHandle?: number;
 newStudentIds?: string[];
 }
 
+type ChangeClassStatusDto = {
+/** 主键编号 */
+id?: string;
+/** 是否锁定(0:否 1:是) */
+status?: number;
+}
+
 type ChangeNewsDto = {
 id?: string;
 /** 状态 1=未发布 2=已发布 3=下架 */
 status?: number;
 }
 
+type ChangeStatusDto = {
+/** 主键编号 */
+id?: string;
+/** 状态 */
+status?: number;
+}
+
 type ChargingSituationVo = {
 /** 收费类型 */
 feeitemname?: string;
@@ -8364,6 +8561,8 @@ modifyUserId?: string;
 name?: string;
 /** 学期id */
 semesterId?: string;
+/** 学期名称 */
+semesterName?: string;
 }
 
 type ExamPlanVo = {
@@ -10177,6 +10376,26 @@ type?: number;
 
 /** 分页入参 */
 type PageInput = {
+/** 活动id */
+activityInfoId?: string;
+/** 排序字段 */
+field?: string;
+/** 关键词 */
+keyword?: string;
+/** 当前页标 */
+limit?: number;
+/** 登录人id */
+loginUserId?: string;
+/** 排序方式 asc  desc */
+order?: string;
+/** 每页大小 */
+size?: number;
+/** 状态(0:待确认 1:未参与 2:已参与) */
+status?: number;
+}
+
+/** 分页入参 */
+type PageInput_1 = {
 /** 身份证 */
 credentialNumber?: string;
 /** 添加时间-结束 */
@@ -10218,7 +10437,29 @@ treeType?: number;
 }
 
 /** 分页入参 */
-type PageInput_1 = {
+type PageInput_10 = {
+/** 结束时间 */
+endDate?: string;
+/** 排序字段 */
+field?: string;
+/** 关键词 */
+keyword?: string;
+/** 当前页标 */
+limit?: number;
+/** 排序方式 asc  desc */
+order?: string;
+/** 部门id */
+orgId?: string;
+/** 每页大小 */
+size?: number;
+/** 开始时间 */
+startDate?: string;
+/** 申请人 */
+userName?: string;
+}
+
+/** 分页入参 */
+type PageInput_2 = {
 /** 分班任务(banding_task) */
 bandingTaskId?: string;
 /** 班级名称 */
@@ -10256,7 +10497,7 @@ stduyStatus?: string;
 }
 
 /** 分页入参 */
-type PageInput_2 = {
+type PageInput_3 = {
 /** 排序字段 */
 field?: string;
 /** 年级id */
@@ -10272,7 +10513,7 @@ size?: number;
 }
 
 /** 分页入参 */
-type PageInput_3 = {
+type PageInput_4 = {
 /** 缴费类型(-1:退费 1:缴费) */
 category?: number;
 /** 班级Id */
@@ -10308,7 +10549,7 @@ studentId?: string;
 }
 
 /** 分页入参 */
-type PageInput_4 = {
+type PageInput_5 = {
 /** 排序字段 */
 field?: string;
 funcId?: string;
@@ -10326,7 +10567,7 @@ size?: number;
 }
 
 /** 分页入参 */
-type PageInput_5 = {
+type PageInput_6 = {
 /** 排序字段 */
 field?: string;
 isTemplate?: boolean;
@@ -10344,7 +10585,7 @@ size?: number;
 }
 
 /** 分页入参 */
-type PageInput_6 = {
+type PageInput_7 = {
 /** 床位id */
 bedId?: string;
 /** 排序字段 */
@@ -10362,7 +10603,7 @@ studentUserId?: string;
 }
 
 /** 分页入参 */
-type PageInput_7 = {
+type PageInput_8 = {
 /** 消息内容 */
 content?: string;
 /** 排序字段 */
@@ -10386,7 +10627,7 @@ titleColor?: string;
 }
 
 /** 分页入参 */
-type PageInput_8 = {
+type PageInput_9 = {
 /** 消息内容 */
 content?: string;
 /** 排序字段 */
@@ -10410,26 +10651,20 @@ title?: string;
 titleColor?: string;
 }
 
-/** 分页入参 */
-type PageInput_9 = {
-/** 结束时间 */
-endDate?: string;
-/** 排序字段 */
-field?: string;
-/** 关键词 */
-keyword?: string;
-/** 当前页标 */
-limit?: number;
-/** 排序方式 asc  desc */
-order?: string;
-/** 部门id */
-orgId?: string;
-/** 每页大小 */
-size?: number;
-/** 开始时间 */
-startDate?: string;
-/** 申请人 */
-userName?: string;
+type PageOutput<ActivityEnrollPageVo> = {
+currentPage?: number;
+list?: ActivityEnrollPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
+type PageOutput<ActivityInfoPageVo> = {
+currentPage?: number;
+list?: ActivityInfoPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
 }
 
 type PageOutput<AssessmentPlanAnswerStudentPageVo> = {
@@ -15136,6 +15371,40 @@ score?: string;
 type?: string;
 }
 
+type UpdateActivityInfoDto = {
+/** activityEnrollRange子表 */
+activityEnrollRangeList?: AddActivityEnrollRangeDto[];
+/** 1:校企合作活动 2:赛事活动 */
+category?: number;
+/** 活动内容 */
+content?: string;
+/** 封面图片 */
+coverFileId?: string;
+/** 活动负责人 */
+dutyPerson?: string;
+/** 活动负责人电话 */
+dutyPersonMobile?: string;
+/** 活动结束时间 */
+endDate?: string;
+/** 报名结束时间 */
+enrollEndTime?: string;
+/** 合作企业(校企活动时填写) */
+enterpriseId?: string;
+id?: string;
+/** 赛事名称 */
+name?: string;
+/** 组织部门(xjr_department) */
+orgId?: string;
+/** 活动地点 */
+place?: string;
+/** 活动开始时间 */
+startDate?: string;
+/** 状态(0:未发布 1:报名中 2:报名结束 3:活动结束) */
+status?: number;
+/** 活动类型(xjr_dictionary_detail[match_activity_type]) */
+type?: string;
+}
+
 type UpdateAppFuncDesignDto = {
 /** app菜单id */
 appMenuId?: string;

+ 24 - 24
src/views/activity/contest/data.config.ts

@@ -7,10 +7,10 @@ import { Tinymce } from '/@/components/Tinymce';
 import { h } from 'vue';
 
 export const contestStatusOptions: BasicOptionModel[] = [
-  { label: '未发布', value: 1 },
-  { label: '报名中', value: 2 },
-  { label: '报名结束', value: 3 },
-  { label: '活动结束', value: 4 },
+  { label: '未发布', value: 0 },
+  { label: '报名中', value: 1 },
+  { label: '报名结束', value: 2 },
+  { label: '活动结束', value: 3 },
 ];
 
 export const tableColumns: BasicColumn[] = [
@@ -22,7 +22,7 @@ export const tableColumns: BasicColumn[] = [
   },
   {
     title: '开始时间',
-    dataIndex: 'stateDate',
+    dataIndex: 'startDate',
     align: 'left',
     width: 150,
   },
@@ -34,18 +34,18 @@ export const tableColumns: BasicColumn[] = [
   },
   {
     title: '活动地点',
-    dataIndex: 'address',
+    dataIndex: 'place',
     align: 'left',
   },
   {
     title: '活动类型',
-    dataIndex: 'type',
+    dataIndex: 'typeCn',
     align: 'left',
     width: 120,
   },
   {
     title: '组织部门',
-    dataIndex: 'deptCn',
+    dataIndex: 'orgCn',
     align: 'left',
     width: 120,
   },
@@ -60,7 +60,7 @@ export const tableColumns: BasicColumn[] = [
   },
   {
     title: '报名人数',
-    dataIndex: 'count',
+    dataIndex: 'enrollCount',
     align: 'left',
     width: 80,
   },
@@ -74,18 +74,18 @@ export const searchFormSchema: FormSchema[] = [
     colProps: { span: 8 },
   },
   {
-    field: 'enrollType',
+    field: 'type',
     label: '活动类型',
     component: 'ApiSelect',
     colProps: { span: 8 },
     componentProps: {
       getPopupContainer: () => document.body,
       api: getDataOption,
-      params: { code: 'enroll_type' },
+      params: { code: 'match_activity_type' },
     },
   },
   {
-    field: 'deptId',
+    field: 'orgId',
     label: '组织部门',
     component: 'ApiSelect',
     colProps: { span: 8 },
@@ -131,14 +131,14 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'address',
+    field: 'place',
     label: '活动地点',
     component: 'Input',
     required: true,
     colProps: { span: 12 },
   },
   {
-    field: 'enrollType',
+    field: 'type',
     label: '活动类型',
     component: 'ApiSelect',
     colProps: { span: 12 },
@@ -146,22 +146,22 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       getPopupContainer: () => document.body,
       api: getDataOption,
-      params: { code: 'enroll_type' },
+      params: { code: 'match_activity_type' },
     },
   },
   {
-    field: 'endDate',
+    field: 'enrollEndTime',
     label: '截止时间',
     component: 'DatePicker',
     required: true,
     colProps: { span: 12 },
     componentProps: {
-      format: 'YYYY-MM-DD',
+      format: 'YYYY-MM-DD HH:mm:ss',
       getPopupContainer: () => document.body,
     },
   },
   {
-    field: 'deptId',
+    field: 'orgId',
     label: '组织部门',
     component: 'ApiSelect',
     colProps: { span: 12 },
@@ -175,14 +175,14 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'name',
+    field: 'dutyPerson',
     label: '负责人',
     component: 'Input',
     required: true,
     colProps: { span: 12 },
   },
   {
-    field: 'tel',
+    field: 'dutyPersonMobile',
     label: '联系电话',
     component: 'Input',
     required: true,
@@ -190,20 +190,20 @@ export const formSchema: FormSchema[] = [
   },
   {
     label: '活动封面',
-    field: 'img',
+    field: 'coverFileId',
     component: 'Input',
     colProps: { span: 24 },
+    slot: 'coverFileId',
   },
   {
     label: '报名范围',
-    field: 'pople',
+    field: 'rangeUser',
     component: 'Input',
-    required: true,
     colProps: { span: 24 },
     slot: 'selectUser',
   },
   {
-    field: 'newsContent',
+    field: 'content',
     component: 'Input',
     label: '活动详情',
     rules: [{ required: true }],

+ 235 - 0
src/views/activity/contest/detail.vue

@@ -0,0 +1,235 @@
+<script setup lang="ts">
+  import { useModalInner, BasicModal, useModal } from '/@/components/Modal';
+  import { useTable, BasicTable, TableAction } from '/@/components/Table';
+  import { reactive, ref } from 'vue';
+  import { Recordable } from 'vite-plugin-mock';
+  import { BasicOptionModel } from '/@/api/model/baseModel';
+  import { Descriptions } from 'ant-design-vue';
+  import { contestStatusOptions } from './data.config';
+  import SelectModal from '/@/views/notice/components/selectModal.vue';
+  import {
+    getActivityEnrollPage,
+    postActivityActivityEnroll,
+    postActivityEnrollChangeStatus,
+    postActivityEnrollExportQuery,
+  } from '/@/services/apis/ActivityEnrollController';
+  import { formatToDateTime } from '/@/utils/dateUtil';
+  import { downloadByData } from '/@/utils/file/download';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { getActivityInfoInfo } from '/@/services/apis/ActivityInfoController';
+
+  const [registerSelectForm, { openModal }] = useModal();
+  const { createMessage } = useMessage();
+
+  const modelRef = ref<Recordable>({});
+
+  const statusOptions: BasicOptionModel[] = [
+    { label: '待确认', value: 0 },
+    { label: '未参与', value: 1 },
+    { label: '已参与', value: 2 },
+  ];
+
+  const emit = defineEmits(['success', 'register']);
+  const searchInfo = reactive<Recordable>({});
+
+  const [registerTable, { reload, getForm, getSelectRowKeys }] = useTable({
+    api: getActivityEnrollPage,
+    title: '活动报名列表',
+    rowKey: 'id',
+    columns: [
+      {
+        title: '用户类型',
+        dataIndex: 'roleId',
+        align: 'left',
+        width: 100,
+      },
+      {
+        title: '姓名',
+        dataIndex: 'name',
+        align: 'left',
+      },
+      {
+        title: '用户名',
+        dataIndex: 'userName',
+        align: 'left',
+        width: 120,
+      },
+      {
+        title: '手机号',
+        dataIndex: 'mobile',
+        align: 'left',
+        width: 150,
+      },
+      {
+        title: '参与状态',
+        dataIndex: 'status',
+        align: 'left',
+        width: 80,
+        customRender: ({ text }) => {
+          return statusOptions.filter((row) => row.value === text)[0]?.label;
+        },
+      },
+    ],
+    formConfig: {
+      labelWidth: 120,
+      schemas: [
+        {
+          field: 'status',
+          label: '参与状态',
+          component: 'Select',
+          colProps: { span: 12 },
+          componentProps: {
+            getPopupContainer: () => document.body,
+            options: statusOptions,
+          },
+        },
+      ],
+    },
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    immediate: false,
+    canResize: true,
+    rowSelection: {
+      type: 'checkbox',
+    },
+    actionColumn: {
+      width: 100,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
+  });
+
+  const [registerModal, { setModalProps }] = useModalInner(async (data) => {
+    setModalProps({ confirmLoading: false });
+    const resData = await getActivityInfoInfo({ id: data.baseData.id });
+    modelRef.value = { ...resData };
+    searchInfo.activityInfoId = data.baseData.id;
+    reload();
+  });
+
+  const handelEdit = () => {
+    openModal(true, {
+      isUpdate: false,
+      data: { drepList: [], classList: [], userList: [] },
+      disabledUser: false,
+      disabledDept: false,
+      disabledClass: false,
+    });
+  };
+
+  const handleSuccess = async (data) => {
+    const enrollRangeList: Recordable[] = [];
+
+    Object.keys(data).forEach((item, index) => {
+      data[item].forEach((row) => {
+        if (index === 0) {
+          enrollRangeList.push({ deptId: row.id });
+        }
+        if (index === 1) {
+          enrollRangeList.push({ classId: row.id });
+        }
+        if (index === 2) {
+          enrollRangeList.push({ userId: row.id });
+        }
+      });
+    });
+
+    await postActivityActivityEnroll({
+      activityInfoId: modelRef.value.id,
+      enrollRangeList: enrollRangeList,
+    } as API.AddActivityEnrollDto);
+
+    reload();
+  };
+
+  const handelExport = async () => {
+    const postDate = getForm().getFieldsValue();
+    Object.assign(postDate, { ...searchInfo });
+    const data = await postActivityEnrollExportQuery(postDate);
+    downloadByData(data.data, `活动报名列表${formatToDateTime(new Date(), 'YYYYMMDDHHmmss')}.xlsx`);
+    createMessage.success('导出成功');
+  };
+
+  const handleStatus = async (status: number) => {
+    const keys = getSelectRowKeys();
+    if (keys.length === 0) {
+      return createMessage.warning('请选择要操作的数据');
+    }
+    const postData = keys.map((item) => {
+      return { id: item, status: status };
+    });
+    await postActivityEnrollChangeStatus(postData);
+    await reload();
+  };
+
+  const handleRowStatus = async (record: any, status: number) => {
+    await postActivityEnrollChangeStatus([{ id: record.id, status: status }]);
+    await reload();
+  };
+
+  const handleCancel = () => {
+    emit('success');
+  };
+</script>
+
+<template>
+  <BasicModal
+    :destroyOnClose="true"
+    :maskClosable="false"
+    v-bind="$attrs"
+    @register="registerModal"
+    :width="1002"
+    title="报名表"
+    :footer="null"
+    @cancel="handleCancel"
+    :defaultFullscreen="true"
+  >
+    <div style="height: 600px; position: relative">
+      <div style="height: 112px">
+        <Descriptions bordered>
+          <Descriptions.Item label="活动名称">{{ modelRef.name }}</Descriptions.Item>
+          <Descriptions.Item label="活动地点">{{ modelRef.place }}</Descriptions.Item>
+          <Descriptions.Item label="状态">
+            {{ contestStatusOptions.filter((row) => row.value === modelRef.status)[0]?.label }}
+          </Descriptions.Item>
+          <Descriptions.Item label="报名人数">{{ modelRef.enrollCount }}</Descriptions.Item>
+          <Descriptions.Item label="确认参与人数">{{ modelRef.sureCount }}</Descriptions.Item>
+          <Descriptions.Item label="未参与人数">{{ modelRef.notSureCount }}</Descriptions.Item>
+        </Descriptions>
+      </div>
+      <div style="height: calc(100% - 112px)">
+        <BasicTable @register="registerTable" :searchInfo="searchInfo">
+          <template #toolbar>
+            <a-button type="primary" @click="handleStatus(1)">未参与</a-button>
+            <a-button type="primary" @click="handleStatus(2)">已参与</a-button>
+            <a-button type="primary" @click="handelEdit">添加报名人</a-button>
+            <a-button type="primary" @click="handelExport">导出</a-button>
+          </template>
+          <template #action="{ record }">
+            <TableAction
+              :actions="[
+                {
+                  label: '未参与',
+                  ifShow: record.status === 2,
+                  onClick: handleRowStatus.bind(null, record, 1),
+                },
+                {
+                  label: '已参与',
+                  ifShow: record.status === 0 || record.status === 1,
+                  onClick: handleRowStatus.bind(null, record, 2),
+                },
+              ]"
+            />
+          </template>
+        </BasicTable>
+      </div>
+    </div>
+
+    <SelectModal @register="registerSelectForm" @success="handleSuccess" />
+  </BasicModal>
+</template>
+
+<style scoped lang="less"></style>

+ 93 - 11
src/views/activity/contest/edit.vue

@@ -13,6 +13,15 @@
       <template #selectUser>
         <SelectUser v-model:value="selectUserValue" @change="handleUserChange" />
       </template>
+      <template #coverFileId="{ model, field }">
+        <Upload
+          v-model:value="model[field]"
+          list-type="picture"
+          accept="image/*"
+          :show-upload-list="false"
+          :maxNumber="1"
+        />
+      </template>
     </BasicForm>
   </BasicDrawer>
 </template>
@@ -22,22 +31,24 @@
   import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
   import { BasicForm, useForm } from '/@/components/Form/index';
   import { formSchema } from './data.config';
-  import {
-    getBandingTaskInfo,
-    postBandingBandingTask,
-    putBandingBandingTask,
-  } from '/@/services/apis/BandingTaskController';
   import SelectUser from '/@/views/notice/components/SelectUser.vue';
   import { Recordable } from 'vite-plugin-mock';
+  import {
+    getActivityInfoInfo,
+    postActivityActivityInfo,
+    putActivityActivityInfo,
+  } from '/@/services/apis/ActivityInfoController';
+  import Upload from '/@/components/Form/src/components/Upload.vue';
 
   const isUpdate = ref(true);
+  const isView = ref(false);
   const modelRef = ref({});
   const emit = defineEmits(['success', 'register']);
   const { createMessage } = useMessage();
 
   const selectUserValue = ref<Recordable[]>([]);
 
-  const [registerForm, { validate, setFieldsValue, resetFields }] = useForm({
+  const [registerForm, { validate, setFieldsValue, resetFields, setProps }] = useForm({
     labelWidth: 100,
     schemas: formSchema,
     showActionButtonGroup: false,
@@ -47,11 +58,51 @@
     resetFields();
     setDrawerProps({ confirmLoading: false });
     isUpdate.value = !!data?.isUpdate;
+    isView.value = !!data?.isView;
+    if (unref(isView)) {
+      setProps({
+        disabled: true,
+      });
+      setDrawerProps({
+        showFooter: false,
+      });
+    } else {
+      setProps({
+        disabled: false,
+      });
+      setDrawerProps({
+        showFooter: true,
+      });
+    }
     modelRef.value = { ...data.baseData };
-
+    selectUserValue.value = [];
     if (unref(isUpdate)) {
-      const resData = await getBandingTaskInfo({ id: data.baseData.id });
-
+      const resData = await getActivityInfoInfo({ id: data.baseData.id });
+      resData['date'] = [resData['startDate'], resData['endDate']];
+      resData['activityEnrollRangeList'] &&
+        resData['activityEnrollRangeList'].forEach((item) => {
+          if (item.deptId) {
+            selectUserValue.value.push({
+              relationId: item.deptId,
+              relationName: item.name || '',
+              relationType: 1,
+            });
+          }
+          if (item.classId) {
+            selectUserValue.value.push({
+              relationId: item.classId,
+              relationName: item.name || '',
+              relationType: 2,
+            });
+          }
+          if (item.userId) {
+            selectUserValue.value.push({
+              relationId: item.userId,
+              relationName: item.name || '',
+              relationType: 3,
+            });
+          }
+        });
       modelRef.value = { ...resData };
       setFieldsValue({
         ...resData,
@@ -67,10 +118,41 @@
       const postParams = unref(modelRef);
       Object.assign(postParams, values);
 
+      postParams['startDate'] = postParams['date'][0];
+      postParams['endDate'] = postParams['date'][1];
+      delete postParams['date'];
+
+      const activityEnrollRangeList: Recordable[] = [];
+
+      selectUserValue.value.forEach((item: Recordable) => {
+        if (item.relationType === 1) {
+          activityEnrollRangeList.push({
+            deptId: item.relationId,
+          });
+        }
+        if (item.relationType === 2) {
+          activityEnrollRangeList.push({
+            classId: item.relationId,
+          });
+        }
+        if (item.relationType === 3) {
+          activityEnrollRangeList.push({
+            userId: item.relationId,
+          });
+        }
+      });
+
+      if (activityEnrollRangeList.length > 0) {
+        postParams['activityEnrollRangeList'] = activityEnrollRangeList;
+      } else {
+        createMessage.warning('请选择报名范围');
+        return;
+      }
+
       if (unref(isUpdate)) {
-        await putBandingBandingTask(postParams as API.UpdateBandingTaskDto);
+        await putActivityActivityInfo(postParams as API.UpdateActivityInfoDto);
       } else {
-        await postBandingBandingTask(postParams as API.AddBandingTaskDto);
+        await postActivityActivityInfo(postParams as API.AddActivityInfoDto);
       }
 
       createMessage.success('操作成功');

+ 60 - 9
src/views/activity/contest/index.vue

@@ -1,6 +1,6 @@
 <template>
   <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
-    <BasicTable @register="registerTable">
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
       <template #toolbar>
         <a-button type="primary" @click="handleEdit({}, false)">新增</a-button>
       </template>
@@ -9,17 +9,33 @@
           :actions="[
             {
               label: '编辑',
+              ifShow: record.status === 0,
               onClick: handleEdit.bind(null, record, true),
             },
+            {
+              label: '查看',
+              ifShow: record.status !== 0,
+              onClick: handleView.bind(null, record, true),
+            },
             {
               label: '发布',
+              ifShow: record.status === 0,
+              onClick: handleStatus.bind(null, record, 1),
+            },
+            {
+              label: '取消发布',
+              ifShow: record.status === 1,
+              onClick: handleStatus.bind(null, record, 0),
             },
             {
               label: '报名表',
+              ifShow: record.status !== 0,
+              onClick: handleDetail.bind(null, record),
             },
             {
               label: '删除',
               color: 'error',
+              ifShow: record.status === 0,
               onClick: handleDelete.bind(null, record),
             },
           ]"
@@ -27,26 +43,33 @@
       </template>
     </BasicTable>
     <FormEdit @register="registerModal" @success="handleSuccess" />
+    <FormDetail @register="registerDetailModal" @success="handleSuccess" />
   </PageWrapper>
 </template>
 
 <script setup lang="ts">
-  import { onMounted } from 'vue';
+  import { onMounted, reactive } 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 { useDrawer } from '/@/components/Drawer';
   import { useMessage } from '/@/hooks/web/useMessage';
   import FormEdit from './edit.vue';
+  import FormDetail from './detail.vue';
+  import {
+    deleteActivityActivityInfo,
+    getActivityInfoPage,
+    postActivityInfoChangeStatus,
+  } from '/@/services/apis/ActivityInfoController';
+  import { useModal } from '/@/components/Modal';
 
   const [registerModal, { openDrawer }] = useDrawer();
+  const [registerDetailModal, { openModal }] = useModal();
+
+  const searchInfo = reactive<Recordable>({});
 
   const [registerTable, { reload }] = useTable({
-    api: getBandingTaskPage,
+    api: getActivityInfoPage,
     title: '赛事活动列表',
     rowKey: 'id',
     columns: tableColumns,
@@ -76,7 +99,7 @@
       content: '是否删除该记录?',
       onOk: async () => {
         try {
-          await deleteBandingBandingTask([record.id]);
+          await deleteActivityActivityInfo([record.id]);
           createMessage.success('删除成功');
           await reload();
         } catch (e) {
@@ -91,6 +114,27 @@
   const handleEdit = (record: any, isUpdate: boolean) => {
     openDrawer(true, {
       isUpdate: isUpdate,
+      isView: false,
+      baseData: {
+        ...record,
+        category: searchInfo.category,
+      },
+    });
+  };
+
+  const handleView = (record: any, isUpdate: boolean) => {
+    openDrawer(true, {
+      isUpdate: isUpdate,
+      isView: true,
+      baseData: {
+        ...record,
+        category: searchInfo.category,
+      },
+    });
+  };
+
+  const handleDetail = (record: any) => {
+    openModal(true, {
       baseData: {
         ...record,
       },
@@ -101,7 +145,14 @@
     await reload();
   };
 
-  onMounted(async () => {});
+  const handleStatus = async (record: any, status: number) => {
+    await postActivityInfoChangeStatus({ id: record.id, status: status });
+    await reload();
+  };
+
+  onMounted(async () => {
+    searchInfo.category = 2;
+  });
 </script>
 
 <style scoped lang="less"></style>

+ 40 - 26
src/views/activity/cooperate/data.config.ts

@@ -7,10 +7,10 @@ import { Tinymce } from '/@/components/Tinymce';
 import { h } from 'vue';
 
 export const contestStatusOptions: BasicOptionModel[] = [
-  { label: '未发布', value: 1 },
-  { label: '报名中', value: 2 },
-  { label: '报名结束', value: 3 },
-  { label: '活动结束', value: 4 },
+  { label: '未发布', value: 0 },
+  { label: '报名中', value: 1 },
+  { label: '报名结束', value: 2 },
+  { label: '活动结束', value: 3 },
 ];
 
 export const tableColumns: BasicColumn[] = [
@@ -22,7 +22,7 @@ export const tableColumns: BasicColumn[] = [
   },
   {
     title: '开始时间',
-    dataIndex: 'stateDate',
+    dataIndex: 'startDate',
     align: 'left',
     width: 150,
   },
@@ -34,18 +34,18 @@ export const tableColumns: BasicColumn[] = [
   },
   {
     title: '活动地点',
-    dataIndex: 'address',
+    dataIndex: 'place',
     align: 'left',
   },
   {
     title: '合作企业',
-    dataIndex: 'type',
+    dataIndex: 'enterpriseName',
     align: 'left',
     width: 120,
   },
   {
     title: '组织部门',
-    dataIndex: 'deptCn',
+    dataIndex: 'orgCn',
     align: 'left',
     width: 120,
   },
@@ -60,7 +60,7 @@ export const tableColumns: BasicColumn[] = [
   },
   {
     title: '报名人数',
-    dataIndex: 'count',
+    dataIndex: 'enrollCount',
     align: 'left',
     width: 80,
   },
@@ -74,18 +74,25 @@ export const searchFormSchema: FormSchema[] = [
     colProps: { span: 8 },
   },
   {
-    field: 'enrollType',
+    field: 'enterpriseId',
     label: '合作企业',
     component: 'ApiSelect',
     colProps: { span: 8 },
     componentProps: {
       getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: { code: 'enroll_type' },
+      api: requestMagicApi,
+      params: { url: 'Benchmark/companycoop' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
   },
   {
-    field: 'deptId',
+    field: 'orgId',
     label: '组织部门',
     component: 'ApiSelect',
     colProps: { span: 8 },
@@ -131,37 +138,44 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'address',
+    field: 'place',
     label: '活动地点',
     component: 'Input',
     required: true,
     colProps: { span: 12 },
   },
   {
-    field: 'enrollType',
+    field: 'enterpriseId',
     label: '合作企业',
     component: 'ApiSelect',
     colProps: { span: 12 },
     required: true,
     componentProps: {
       getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: { code: 'enroll_type' },
+      api: requestMagicApi,
+      params: { url: 'Benchmark/companycoop' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
   },
   {
-    field: 'endDate',
+    field: 'enrollEndTime',
     label: '截止时间',
     component: 'DatePicker',
     required: true,
     colProps: { span: 12 },
     componentProps: {
-      format: 'YYYY-MM-DD',
+      format: 'YYYY-MM-DD HH:mm:ss',
       getPopupContainer: () => document.body,
     },
   },
   {
-    field: 'deptId',
+    field: 'orgId',
     label: '组织部门',
     component: 'ApiSelect',
     colProps: { span: 12 },
@@ -175,14 +189,14 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
-    field: 'name',
+    field: 'dutyPerson',
     label: '负责人',
     component: 'Input',
     required: true,
     colProps: { span: 12 },
   },
   {
-    field: 'tel',
+    field: 'dutyPersonMobile',
     label: '联系电话',
     component: 'Input',
     required: true,
@@ -190,20 +204,20 @@ export const formSchema: FormSchema[] = [
   },
   {
     label: '活动封面',
-    field: 'img',
+    field: 'coverFileId',
     component: 'Input',
     colProps: { span: 24 },
+    slot: 'coverFileId',
   },
   {
     label: '报名范围',
-    field: 'pople',
+    field: 'rangeUser',
     component: 'Input',
-    required: true,
     colProps: { span: 24 },
     slot: 'selectUser',
   },
   {
-    field: 'newsContent',
+    field: 'content',
     component: 'Input',
     label: '活动详情',
     rules: [{ required: true }],

+ 93 - 12
src/views/activity/cooperate/edit.vue

@@ -7,12 +7,20 @@
     @register="registerModal"
     :title="getTitle"
     :width="1002"
-    showFooter
   >
     <BasicForm @register="registerForm">
       <template #selectUser>
         <SelectUser v-model:value="selectUserValue" @change="handleUserChange" />
       </template>
+      <template #coverFileId="{ model, field }">
+        <Upload
+          v-model:value="model[field]"
+          list-type="picture"
+          accept="image/*"
+          :show-upload-list="false"
+          :maxNumber="1"
+        />
+      </template>
     </BasicForm>
   </BasicDrawer>
 </template>
@@ -22,22 +30,24 @@
   import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
   import { BasicForm, useForm } from '/@/components/Form/index';
   import { formSchema } from './data.config';
-  import {
-    getBandingTaskInfo,
-    postBandingBandingTask,
-    putBandingBandingTask,
-  } from '/@/services/apis/BandingTaskController';
   import SelectUser from '/@/views/notice/components/SelectUser.vue';
   import { Recordable } from 'vite-plugin-mock';
+  import {
+    getActivityInfoInfo,
+    postActivityActivityInfo,
+    putActivityActivityInfo,
+  } from '/@/services/apis/ActivityInfoController';
+  import Upload from '/@/components/Form/src/components/Upload.vue';
 
   const isUpdate = ref(true);
+  const isView = ref(false);
   const modelRef = ref({});
   const emit = defineEmits(['success', 'register']);
   const { createMessage } = useMessage();
 
   const selectUserValue = ref<Recordable[]>([]);
 
-  const [registerForm, { validate, setFieldsValue, resetFields }] = useForm({
+  const [registerForm, { validate, setFieldsValue, resetFields, setProps }] = useForm({
     labelWidth: 100,
     schemas: formSchema,
     showActionButtonGroup: false,
@@ -47,11 +57,51 @@
     resetFields();
     setDrawerProps({ confirmLoading: false });
     isUpdate.value = !!data?.isUpdate;
+    isView.value = !!data?.isView;
+    if (unref(isView)) {
+      setProps({
+        disabled: true,
+      });
+      setDrawerProps({
+        showFooter: false,
+      });
+    } else {
+      setProps({
+        disabled: false,
+      });
+      setDrawerProps({
+        showFooter: true,
+      });
+    }
     modelRef.value = { ...data.baseData };
-
+    selectUserValue.value = [];
     if (unref(isUpdate)) {
-      const resData = await getBandingTaskInfo({ id: data.baseData.id });
-
+      const resData = await getActivityInfoInfo({ id: data.baseData.id });
+      resData['date'] = [resData['startDate'], resData['endDate']];
+      resData['activityEnrollRangeList'] &&
+        resData['activityEnrollRangeList'].forEach((item) => {
+          if (item.deptId) {
+            selectUserValue.value.push({
+              relationId: item.deptId,
+              relationName: item.name || '',
+              relationType: 1,
+            });
+          }
+          if (item.classId) {
+            selectUserValue.value.push({
+              relationId: item.classId,
+              relationName: item.name || '',
+              relationType: 2,
+            });
+          }
+          if (item.userId) {
+            selectUserValue.value.push({
+              relationId: item.userId,
+              relationName: item.name || '',
+              relationType: 3,
+            });
+          }
+        });
       modelRef.value = { ...resData };
       setFieldsValue({
         ...resData,
@@ -67,10 +117,41 @@
       const postParams = unref(modelRef);
       Object.assign(postParams, values);
 
+      postParams['startDate'] = postParams['date'][0];
+      postParams['endDate'] = postParams['date'][1];
+      delete postParams['date'];
+
+      const activityEnrollRangeList: Recordable[] = [];
+
+      selectUserValue.value.forEach((item: Recordable) => {
+        if (item.relationType === 1) {
+          activityEnrollRangeList.push({
+            deptId: item.relationId,
+          });
+        }
+        if (item.relationType === 2) {
+          activityEnrollRangeList.push({
+            classId: item.relationId,
+          });
+        }
+        if (item.relationType === 3) {
+          activityEnrollRangeList.push({
+            userId: item.relationId,
+          });
+        }
+      });
+
+      if (activityEnrollRangeList.length > 0) {
+        postParams['activityEnrollRangeList'] = activityEnrollRangeList;
+      } else {
+        createMessage.warning('请选择报名范围');
+        return;
+      }
+
       if (unref(isUpdate)) {
-        await putBandingBandingTask(postParams as API.UpdateBandingTaskDto);
+        await putActivityActivityInfo(postParams as API.UpdateActivityInfoDto);
       } else {
-        await postBandingBandingTask(postParams as API.AddBandingTaskDto);
+        await postActivityActivityInfo(postParams as API.AddActivityInfoDto);
       }
 
       createMessage.success('操作成功');

+ 60 - 9
src/views/activity/cooperate/index.vue

@@ -1,6 +1,6 @@
 <template>
   <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
-    <BasicTable @register="registerTable">
+    <BasicTable @register="registerTable" :searchInfo="searchInfo">
       <template #toolbar>
         <a-button type="primary" @click="handleEdit({}, false)">新增</a-button>
       </template>
@@ -9,17 +9,33 @@
           :actions="[
             {
               label: '编辑',
+              ifShow: record.status === 0,
               onClick: handleEdit.bind(null, record, true),
             },
+            {
+              label: '查看',
+              ifShow: record.status !== 0,
+              onClick: handleView.bind(null, record, true),
+            },
             {
               label: '发布',
+              ifShow: record.status === 0,
+              onClick: handleStatus.bind(null, record, 1),
+            },
+            {
+              label: '取消发布',
+              ifShow: record.status === 1,
+              onClick: handleStatus.bind(null, record, 0),
             },
             {
               label: '报名表',
+              ifShow: record.status !== 0,
+              onClick: handleDetail.bind(null, record),
             },
             {
               label: '删除',
               color: 'error',
+              ifShow: record.status === 0,
               onClick: handleDelete.bind(null, record),
             },
           ]"
@@ -27,26 +43,33 @@
       </template>
     </BasicTable>
     <FormEdit @register="registerModal" @success="handleSuccess" />
+    <FormDetail @register="registerDetailModal" @success="handleSuccess" />
   </PageWrapper>
 </template>
 
 <script setup lang="ts">
-  import { onMounted } from 'vue';
+  import { onMounted, reactive } 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 { useDrawer } from '/@/components/Drawer';
   import { useMessage } from '/@/hooks/web/useMessage';
   import FormEdit from './edit.vue';
+  import {
+    deleteActivityActivityInfo,
+    getActivityInfoPage,
+    postActivityInfoChangeStatus,
+  } from '/@/services/apis/ActivityInfoController';
+  import FormDetail from '../contest/detail.vue';
+  import { useModal } from '/@/components/Modal';
 
   const [registerModal, { openDrawer }] = useDrawer();
+  const [registerDetailModal, { openModal }] = useModal();
+
+  const searchInfo = reactive<Recordable>({});
 
   const [registerTable, { reload }] = useTable({
-    api: getBandingTaskPage,
+    api: getActivityInfoPage,
     title: '校企合作活动列表',
     rowKey: 'id',
     columns: tableColumns,
@@ -76,7 +99,7 @@
       content: '是否删除该记录?',
       onOk: async () => {
         try {
-          await deleteBandingBandingTask([record.id]);
+          await deleteActivityActivityInfo([record.id]);
           createMessage.success('删除成功');
           await reload();
         } catch (e) {
@@ -91,8 +114,21 @@
   const handleEdit = (record: any, isUpdate: boolean) => {
     openDrawer(true, {
       isUpdate: isUpdate,
+      isView: false,
       baseData: {
         ...record,
+        category: searchInfo.category,
+      },
+    });
+  };
+
+  const handleView = (record: any, isUpdate: boolean) => {
+    openDrawer(true, {
+      isUpdate: isUpdate,
+      isView: true,
+      baseData: {
+        ...record,
+        category: searchInfo.category,
       },
     });
   };
@@ -101,7 +137,22 @@
     await reload();
   };
 
-  onMounted(async () => {});
+  const handleDetail = (record: any) => {
+    openModal(true, {
+      baseData: {
+        ...record,
+      },
+    });
+  };
+
+  const handleStatus = async (record: any, status: number) => {
+    await postActivityInfoChangeStatus({ id: record.id, status: status });
+    await reload();
+  };
+
+  onMounted(async () => {
+    searchInfo.category = 1;
+  });
 </script>
 
 <style scoped lang="less"></style>

+ 33 - 1
src/views/educational/division/components/DsionStep3.vue

@@ -12,6 +12,24 @@
       <template #surplusCount="{ record, text }">
         <a-button type="link" @click="handelSurplus(record)">{{ text }}</a-button>
       </template>
+      <template #action="{ record }">
+        <TableAction
+          :actions="[
+            {
+              label: '锁定',
+              disabled: status === 1,
+              ifShow: record.status === 0,
+              onClick: handleLock.bind(null, record, 1),
+            },
+            {
+              label: '解锁',
+              disabled: status === 1,
+              ifShow: record.status === 1,
+              onClick: handleLock.bind(null, record, 0),
+            },
+          ]"
+        />
+      </template>
     </BasicTable>
     <FormSatisfy @register="registerSatisfyModal" @success="handleSuccess" />
     <FormSurplus @register="registerSurplusModal" @success="handleSuccess" />
@@ -20,10 +38,11 @@
 
 <script setup lang="ts">
   import { reactive, watch } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
+  import { BasicTable, useTable, TableAction } from '/@/components/Table';
   import { table3Columns } from '../data.config';
   import {
     getBandingTaskClassList,
+    postBandingTaskClassChangeStatus,
     postBandingTaskClassReset,
   } from '/@/services/apis/BandingTaskClassController';
   import FormSatisfy from './satisfy.vue';
@@ -42,6 +61,14 @@
     immediate: false,
     canResize: true,
     pagination: false,
+
+    actionColumn: {
+      width: 100,
+      title: '操作',
+      dataIndex: 'action',
+      slots: { customRender: 'action' },
+      fixed: 'right',
+    },
   });
 
   const [registerSatisfyModal, { openModal: openSatisfyModal }] = useModal();
@@ -92,6 +119,11 @@
     reload();
   };
 
+  const handleLock = async (record: Recordable, status: number) => {
+    await postBandingTaskClassChangeStatus({ id: record.id, status: status });
+    reload();
+  };
+
   defineExpose({ validateStep, reloadStep });
 </script>