diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinMineController.java b/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinMineController.java index 76a53a7e..feeb5544 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinMineController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserJoinMineController.java @@ -57,8 +57,14 @@ public class ClubUserJoinMineController { @At @SaCheckPermission(value = {"club.join.mine", "h5.club.join.mine"}, mode = SaMode.OR) + /** + * 我的申请分页查询。 + * pageForm 为分页参数,year 为申请年度,clubName 为可选的社团名称关键字; + * 返回分页后的当前用户社团申请记录。 + */ public Result pageData(@Valid PageForm pageForm, - @Param("year") Integer year){ + @Param("year") Integer year, + @Param("clubName") String clubName){ Sql sql = Sqls.create(""" SELECT info.*, @@ -94,6 +100,9 @@ public class ClubUserJoinMineController { Cnd cnd = Cnd.NEW(); cnd.and("info.userId", "=", SecurityUtil.getUserId()); cnd.andEX("year(info.applyDate)", "=", year); + if (clubName != null && !clubName.trim().isEmpty()) { + cnd.and("club.clubName", "like", "%" + clubName.trim() + "%"); + } cnd.groupBy("info.id"); cnd.desc("info.applyDate"); sql.setCondition(cnd); diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserMineClubController.java b/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserMineClubController.java index 9e0ca82e..804d512f 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserMineClubController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/apply/ClubUserMineClubController.java @@ -18,6 +18,7 @@ import org.nutz.dao.sql.Sql; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.lang.Lang; +import org.nutz.lang.Strings; import org.nutz.lang.util.NutMap; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; @@ -49,6 +50,11 @@ public class ClubUserMineClubController { @At @SaCheckPermission(value = {"club.join.mine.club", "h5.club.join.mine.club"}, mode = SaMode.OR) + /** + * 我的社团分页查询。 + * pageForm 传入分页参数及可选社团名称;返回当前登录人已完成入会流程的社团列表, + * 每条记录同时包含当前成员姓名、工号和最近一次入会申请 ID,供 H5 卡片及详情页展示。 + */ public Result pageData(@Valid ClubUserPageForm pageForm) { List query = dao.query(ClubUser.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).groupBy("clubId")); if (Lang.isEmpty(query)) { @@ -64,20 +70,37 @@ public class ClubUserMineClubController { SELECT club.*, club.id as clubId, + currentUser.username AS userName, + currentUser.loginname AS loginName, + currentApply.id AS applyId, COUNT(DISTINCT ( uc.userId )) AS currentPeopleNum, presidentUser.username AS clubLeader, secretaryUser.username AS clubSecretary FROM sys_club club LEFT JOIN club_user uc ON club.id = uc.clubId + -- 查询当前登录人的成员资料及最近一次入会申请,避免卡片标题错误显示为社团名称。 + LEFT JOIN club_user currentClubUser ON currentClubUser.clubId = club.id AND currentClubUser.userId = @currentUserId + LEFT JOIN sys_user currentUser ON currentUser.id = currentClubUser.userId + LEFT JOIN ( + SELECT clubId, MAX(applyDate) AS applyDate + FROM club_user_apply + WHERE userId = @currentUserId AND mode = 1 + GROUP BY clubId + ) lastApply ON lastApply.clubId = club.id + LEFT JOIN club_user_apply currentApply ON currentApply.clubId = lastApply.clubId AND currentApply.userId = @currentUserId AND currentApply.applyDate = lastApply.applyDate AND currentApply.mode = 1 LEFT JOIN club_user presidentCu ON presidentCu.clubId = club.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_PRESIDENT"') LEFT JOIN sys_user presidentUser ON presidentUser.id = presidentCu.userId LEFT JOIN club_user secretaryCu ON secretaryCu.clubId = club.id AND JSON_CONTAINS(secretaryCu.roleCode, '"CLUB_SECRETARY"') LEFT JOIN sys_user secretaryUser ON secretaryUser.id = secretaryCu.userId $condition """); + sql.setParam("currentUserId", SecurityUtil.getUserId()); Cnd cnd = Cnd.NEW(); - cnd.andEX("club.clubName", "=", pageForm.getClubName()); + // 社团名称为可选搜索参数,输入关键字时按名称模糊匹配。 + if (Strings.isNotBlank(pageForm.getClubName())) { + cnd.and("club.clubName", "like", "%" + pageForm.getClubName().trim() + "%"); + } cnd.and("club.id", "in", list); cnd.groupBy("club.id"); cnd.asc("club.clubCode"); diff --git a/src/main/resources/static/assets/mobile/img/club/club-approval-empty.png b/src/main/resources/static/assets/mobile/img/club/club-approval-empty.png new file mode 100644 index 00000000..e1552405 Binary files /dev/null and b/src/main/resources/static/assets/mobile/img/club/club-approval-empty.png differ diff --git a/src/main/resources/static/components/plugins/h5/TableList.vue b/src/main/resources/static/components/plugins/h5/TableList.vue index cc20e4a5..364e5e81 100644 --- a/src/main/resources/static/components/plugins/h5/TableList.vue +++ b/src/main/resources/static/components/plugins/h5/TableList.vue @@ -155,7 +155,9 @@ module.exports = { {h5SkeletonLoading: !this.show_loading_overlay} ).then((res) => { if (res.code === 0) { - this.tableData = this.tableData.concat(res.data.list) + // 接口异常返回 null 行时不渲染该行,避免业务插槽读取行字段产生渲染异常。 + const responseList = Array.isArray(res.data.list) ? res.data.list.filter((item) => item) : [] + this.tableData = this.tableData.concat(responseList) this.localPageForm.totalCount = res.data.totalCount if (this.tableData.length >= this.localPageForm.totalCount) { this.tableFinished = true diff --git a/src/main/resources/static/components/plugins/sysUpload/h5Index.vue b/src/main/resources/static/components/plugins/sysUpload/h5Index.vue index 1155afbc..6eb5dff9 100644 --- a/src/main/resources/static/components/plugins/sysUpload/h5Index.vue +++ b/src/main/resources/static/components/plugins/sysUpload/h5Index.vue @@ -139,6 +139,14 @@ module.exports = { methods: { beforeDelete(file) { this.fileList = this.fileList.filter((f) => f.url !== file.url) + if (this.upload_result_category === "interval") { + const resultIntervalValue = this.fileList + .map((item) => item.response && item.response.data ? item.response.data : item.url) + .filter((item) => item) + .join(",") + this.$emit("update:value", resultIntervalValue) + return + } this.$emit("update:value", this.fileList) }, beforeRead(file) { @@ -174,6 +182,13 @@ module.exports = { Promise.all(uploadPromises) .then(() => { if (this.upload_result_category === "interval") { + // interval 模式用于后端 String 字段,上传完成后回传逗号分隔的文件 URL。 + const resultIntervalValue = this.fileList + .filter((data) => data.status !== "fail") + .map((data) => data.response && data.response.data ? data.response.data : data.url) + .filter((data) => data) + .join(",") + this.$emit("update:value", resultIntervalValue) } else if (this.upload_result_category === "array") { if (this.complete_result) { this.$emit("update:value", this.fileList) diff --git a/src/main/resources/views/platform/zhghh5/club/apply/index.html b/src/main/resources/views/platform/zhghh5/club/apply/index.html index b77e3757..035c4d30 100644 --- a/src/main/resources/views/platform/zhghh5/club/apply/index.html +++ b/src/main/resources/views/platform/zhghh5/club/apply/index.html @@ -3,140 +3,106 @@ layout("/layouts/platform_h5.html"){ #--> -
- - +
+ - - - - - - - - - + +
+

基本信息

+ + + + + + + + + + + + + + + +
- - - - - - - - - +
+

其他信息

+ + + + +
- - - - - - - - - +
+

照片

+ + + + + +
- - - - - +
+

电子签名

+ + + + + +
- - - - - - - - - - - - - - - - - - 注:本人已仔细阅读并愿意遵守所参加本校教职工文体社团的章程和规定,自愿加入所报名社团。 - - - - -
- 保存申请 - 提交申请 - 提交申请 -
+ +
+
注:本人已仔细阅读并愿意遵守所参加本校教职工文体社团的章程和规定,自愿加入所报名社团。
+
+ 保存申请 + 提交申请 + 提交申请 +
+
+ + + + + +
diff --git a/src/main/resources/views/platform/zhghh5/club/clubApproval/index.html b/src/main/resources/views/platform/zhghh5/club/clubApproval/index.html index 52467cff..e6ac0557 100644 --- a/src/main/resources/views/platform/zhghh5/club/clubApproval/index.html +++ b/src/main/resources/views/platform/zhghh5/club/clubApproval/index.html @@ -2,108 +2,136 @@ layout("/layouts/platform_h5.html"){ #--> - -
- + +
+ - - +
+ + - - + + + - - - - +
- -