Compare commits

...
13 Commits
Author SHA1 Message Date
c-duxc1 c0cd7f1819 Merge remote-tracking branch 'origin/main' 2026-10-22 13:36:16 +08:00
c-duxc1 3beb3cf77b 校工会文化活动-体育比赛活动:在系统首页最新活动列表展示体育活动;(仅可见报名方式为‘基层工会报名’,个人报名没有对应pc报名入口暂时屏蔽); 2026-10-22 13:35:22 +08:00
c-duxc1 dbd76108eb 校工会文化活动-体育比赛活动:在系统首页最新活动列表展示体育活动; 2026-10-22 12:02:03 +08:00
c-duxc1 e9044fb0b5 Merge remote-tracking branch 'origin/main' 2026-10-22 10:15:40 +08:00
c-zhangr1 9a97ded0d9 体育活动添加领队/教练弹窗手机号必填控制 2026-10-22 10:14:53 +08:00
c-zhouhf1 f5fb765bc2 commit 2026-10-22 10:14:52 +08:00
zhengziru 364a6d0c4f server_commit 2026-10-22 10:14:52 +08:00
c-zhouhf1 ca2635b60f commit 2026-10-22 10:14:52 +08:00
zhengziru e4c4e538dd 银行支付对接 2026-10-22 10:14:52 +08:00
周现广 58bcec892f 支付对接 2026-10-22 10:14:52 +08:00
zhengziru 62be1ba55e server_commit 2026-10-22 10:14:51 +08:00
zhengziru a529473ba3 server_commit 2026-10-22 10:14:51 +08:00
c-duxc1 70ac623830 校工会文化活动-体育比赛活动:修复编辑活动信息页面组件异步加载时执行顺序异常导致的初始化异常(此异常触发后,修改页面不会回显活动信息);页面内容未加载完毕时禁止点击保存、提交相关按钮;浏览器强制刷新会导致修改页空白一小段时间才恢复,线上测试时须注意; 2026-10-22 10:14:48 +08:00
4 changed files with 96 additions and 15 deletions
@@ -11,6 +11,7 @@ import io.v.nutz.sys.services.SysMenuService;
import io.v.nutz.sys.services.SysUserService;
import io.v.nutz.web.commons.base.Globals;
import io.v.nutz.web.commons.utils.ShiroUtil;
import io.v.nutz.zhgh.activity.models.ActivitySchool;
import io.v.nutz.zhgh.activity.models.ActivityUserScope;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.jsoup.Jsoup;
@@ -211,6 +212,35 @@ public class SysHomeController {
public Result listHomeActivity() {
FieldFilter fieldFilter = FieldFilter.locked(Sys_home_activity.class, "classPath");
List<Sys_home_activity> list = Daos.ext(dao,fieldFilter) .query(Sys_home_activity.class, Cnd.where("enable", "=", 1).desc("top"));
boolean sportsApplyRole = ShiroUtil.hasAnyRoles("H04,sysadmin,SCHOOL_UNION_SPORTS_ADMIN,gh08,gh01");
// 体育活动未写入首页活动表,在此转换以兼容已有数据
List<ActivitySchool> sportsActivities = dao.query(ActivitySchool.class, Cnd.where("isDisabled", "=", true)
.and("close", "!=", true)
.and("isSave", "!=", true)
.desc("applyStartTime"));
for (ActivitySchool sportsActivity : sportsActivities) {
if (StrUtil.isBlank(sportsActivity.getApplyStartTime()) || StrUtil.isBlank(sportsActivity.getApplyEndTime())) {
continue;
}
// 首页为PC入口,普通会员没有体育活动个人报名页面
if (!sportsApplyRole) {
continue;
}
Sys_home_activity homeActivity = new Sys_home_activity();
homeActivity.setId(sportsActivity.getId());
homeActivity.setName(sportsActivity.getName());
if (Lang.isNotEmpty(sportsActivity.getImage())) {
homeActivity.setCover(sportsActivity.getImage().get(0).getId());
}
homeActivity.setUrl("/platform/activity/apply");
homeActivity.setH5Url("/mobile/activity/Sports/list/activityList?id=" + sportsActivity.getId() + "&signUpMethod=2");
homeActivity.setAllowUserGroupId(sportsActivity.getActivityGroupId());
homeActivity.setStartDate(DateUtil.parse(sportsActivity.getApplyStartTime()));
homeActivity.setEndDate(DateUtil.parse(sportsActivity.getApplyEndTime()));
homeActivity.setEnable(true);
homeActivity.setType("Activity");
list.add(homeActivity);
}
String userId = ShiroUtil.getUserId();
List<Sys_home_activity> allowActivityList = new ArrayList<>();
// 今天的时间
@@ -226,6 +256,11 @@ public class SysHomeController {
Integer allowUserGroupId = activity.getAllowUserGroupId();
String allowUserSql = activity.getAllowUserSql();
activity.setAllowUserSql(null);
// 体育活动管理员与报名页保持一致,不受活动分组限制
if ("Activity".equals(activity.getType()) && sportsApplyRole) {
allowActivityList.add(activity);
continue;
}
if (allowUserGroupId == null && StrUtil.isBlank(allowUserSql)) {
allowActivityList.add(activity);
continue;
@@ -80,4 +80,9 @@ public class Sys_home_activity extends BaseModel {
@ColDefine(type = ColType.DATETIME)
private Date endDate;
/**
* 业务类型,不保存到数据库
*/
private String type;
}
@@ -159,12 +159,13 @@ layout("/layouts/platform.html"){
</template>
<template #edit_func>
<el-button @click="doSave" type="primary">保 存</el-button>
<el-button @click="doOperate" type="primary">提 交</el-button>
<el-button :disabled="!activityReady" @click="doSave" type="primary">保 存</el-button>
<el-button :disabled="!activityReady" @click="doOperate" type="primary">提 交</el-button>
</template>
<template #edit>
<add-activity
v-if="showActivity"
:form="formData"
:is_a06="is_A06"
:is_club="is_club"
@@ -174,12 +175,13 @@ layout("/layouts/platform.html"){
:unionid="'${@shiro.getPrincipalProperty('unit').getUnionid()}'"
@flip="flip"
@flush="flush"
@hook:mounted="activityMounted"
ref="activity"
></add-activity>
</template>
<template #view>
<info ref="info"></info>
<info v-if="showInfo" @hook:mounted="infoMounted" ref="info"></info>
</template>
<send-msg :url="url" ref="sendMsg"></send-msg>
@@ -203,6 +205,11 @@ layout("/layouts/platform.html"){
is_A06: false,
is_h10: false,
activities: [],
showActivity: false,
activityReady: false,
activityAction: null,
showInfo: false,
infoId: null,
unitOptions: [],
activityTypeList: [],
planList: [],
@@ -317,27 +324,57 @@ layout("/layouts/platform.html"){
this.url = `<a href="` + (APP_DOMAIN + "/mobile/activity/Sports/list/activityList") + `">点击参与</a>`
this.$refs.sendMsg.openDialog(row.activityGroupId)
},
infoMounted() {
this.loadInfo()
},
loadInfo(id) {
if (id) {
this.infoId = id
}
if (this.$refs.info && this.infoId) {
const infoId = this.infoId
this.infoId = null
this.$refs.info.getInfo(infoId)
}
},
openView(row) {
const { id } = row
this.infoId = id
this.showInfo = true
this.$refs.guava.view()
setTimeout(() => {
this.$refs.info.getInfo(id)
}, 500)
this.$nextTick(() => this.loadInfo())
},
activityMounted() {
this.activityReady = true
this.handleActivityAction()
},
handleActivityAction(action) {
if (action) {
this.activityAction = action
}
if (!this.$refs.activity || !this.activityAction) {
return
}
const { type, row } = this.activityAction
this.activityAction = null
if (type === "add") {
this.$refs.activity.openAdd()
} else if (type === "edit") {
this.$refs.activity.openEdit(row, true)
}
},
async openAdd() {
this.showActivity = true
this.$refs.guava.edit()
setTimeout(() => {
this.$refs.activity.openAdd()
}, 500)
this.handleActivityAction({ type: "add" })
},
async openEdit(row) {
const { id, applyStartTime, isSave } = row
this.formData.id = id
const now = moment().valueOf()
this.showActivity = true
this.$refs.guava.edit()
setTimeout(() => {
this.$refs.activity.openEdit(row, true)
}, 500)
this.handleActivityAction({ type: "edit", row })
},
doDelete(row) {
const { id } = row
@@ -51,14 +51,18 @@ const activity = {
})
},
enterActivity(item) {
if (item.type === "Activity" && "${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')}||${@shiro.hasRole('gh01')||@shiro.hasRole('gh08')}" === 'false') {
if (item.type === "Activity" && "${@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('SCHOOL_UNION_SPORTS_ADMIN')||@shiro.hasRole('gh01')||@shiro.hasRole('gh08')}" === "false") {
this.$message.warning("该活动只支持基层工会主席报名,个人报名请前往移动端")
return
}
if (item.type === "Activity" && "${@shiro.hasPermission('activity.apply')}" === "false") {
this.$message.warning("您没有体育活动报名权限")
return
}
if (item.url) {
sublime.jumpPagePjax(item.url)
} else if (item.url) {
this.$refs.openQRCode.openCode(item.url, "该活动只支持手机端报名,请使用手机扫描二维码报名!")
} else if (item.h5Url) {
this.$refs.openQRCode.openCode(item.h5Url, "该活动只支持手机端报名,请使用手机扫描二维码报名!")
} else {
this.$message.warning("该活动不支持,请在手机上选择!")
}