Merge remote-tracking branch 'origin/main'
This commit is contained in:
+93
-74
@@ -19,6 +19,7 @@ import io.v.nutz.zhgh.activity.services.ActivitySchoolTeamService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.async.Async;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
@@ -27,6 +28,7 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
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;
|
||||
@@ -81,25 +83,23 @@ public class ActivityApplyController {
|
||||
Cnd cnd = CndPlus.create();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
apply.*,team.`name`,acts.name actsname,ev.allName
|
||||
apply.*,
|
||||
team.`name`,
|
||||
acts.NAME actsname,
|
||||
ev.allName,
|
||||
us.username applyUserName
|
||||
FROM
|
||||
Activity_School_Apply apply LEFT JOIN activity_school_team team ON apply.teamId=team.id
|
||||
LEFT JOIN activity_school acts ON acts.id=apply.activityId
|
||||
LEFT JOIN activity_event ev ON ev.id = apply.eventId $condition
|
||||
Activity_School_Apply apply
|
||||
LEFT JOIN sys_user us ON us.id = apply.applyUser
|
||||
LEFT JOIN activity_school_team team ON apply.teamId = team.id
|
||||
LEFT JOIN activity_school acts ON acts.id = apply.activityId
|
||||
LEFT JOIN activity_event ev ON ev.id = apply.eventId
|
||||
$condition
|
||||
""");
|
||||
cnd.and("apply.activityUnionId", "=", getUnionId());
|
||||
/* if (!ShiroUtil.hasAnyRoles("A06,sysadmin")) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
if (ShiroUtil.hasAnyRoles("H01")) {
|
||||
group.or("applyUser", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
}
|
||||
if (ShiroUtil.hasAnyRoles("H04")) {
|
||||
group.or("unionId", "=", getUnionId());
|
||||
}
|
||||
cnd.and(group);
|
||||
}*/
|
||||
Vi.cndPlus(cnd, "apply.activityId", "=", activityId);
|
||||
Vi.cndPlus(cnd, "apply.eventId", "=", eventId);
|
||||
cnd.asc("apply.applyUser");
|
||||
cnd.asc("team.`name`");
|
||||
cnd.desc("apply.identity");
|
||||
sql.setCondition(cnd);
|
||||
@@ -130,6 +130,11 @@ public class ActivityApplyController {
|
||||
school.personType,
|
||||
school.activityLevel,
|
||||
school.applyType,
|
||||
school.athleteQualification,
|
||||
school.registrationMethod,
|
||||
school.competitionMethod,
|
||||
school.rewardMethod,
|
||||
school.precautions,
|
||||
(SELECT count( 1 ) FROM activity_school_apply app WHERE app.activityId = school.id AND app.`status` = 2 ) apply_num,
|
||||
(SELECT count( 1 ) FROM activity_school_apply app WHERE app.activityId = school.id AND ( app.applyUser = @userid OR app.userId = @userid )) > 0 applyed,
|
||||
(SELECT COUNT(1) FROM activity_school_apply app WHERE app.activityId=school.id AND app.unionId=@unionId AND app.unionLeader=TRUE) LeaderCount,
|
||||
@@ -146,9 +151,10 @@ public class ActivityApplyController {
|
||||
|
||||
cnd.and("school.isSave", "!=", true);
|
||||
|
||||
switch (isActivity){
|
||||
switch (isActivity) {
|
||||
//报名中
|
||||
case 2 -> cnd.and(new Static("now() > school.applyStartTime and now() < school.applyEndTime"));
|
||||
case 2 ->
|
||||
cnd.and(new Static("now() > school.applyStartTime and now() < school.applyEndTime"));
|
||||
//已结束
|
||||
case 3 -> cnd.and(new Static("now() > school.applyEndTime"));
|
||||
//进行中
|
||||
@@ -156,7 +162,7 @@ public class ActivityApplyController {
|
||||
//未开始
|
||||
case 5 -> cnd.and(new Static("now() < school.applyStartTime"));
|
||||
}
|
||||
cnd.and("isDisabled","=",1);
|
||||
cnd.and("isDisabled", "=", 1);
|
||||
|
||||
// //查询报名中
|
||||
// if (isActivity == 2) {
|
||||
@@ -370,43 +376,27 @@ public class ActivityApplyController {
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("activity.apply")
|
||||
public Object doApply(@Param(value = "data",required = false) ActivitySchoolApply[] applies,
|
||||
@Param(value = "appliedData3",required = false) ActivitySchoolApply[] applies2,
|
||||
@Param(value = "eventId",required = false) String eventId,
|
||||
@Param(value = "pass",required = false)boolean pass) {
|
||||
public Object doApply(@Param(value = "data", required = false) ActivitySchoolApply[] applies,
|
||||
@Param(value = "appliedData3", required = false) ActivitySchoolApply[] applies2,
|
||||
@Param(value = "projectType", required = false) Integer projectType,
|
||||
@Param(value = "eventId", required = false) String eventId,
|
||||
@Param(value = "activityId") String activityId,
|
||||
@Param(value = "pass", required = false) boolean pass) {
|
||||
Sys_user user = (Sys_user) ShiroUtil.getPrincipal();
|
||||
Sys_unit unit = user.getUnit();
|
||||
String activityId = "";
|
||||
ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", unit.getId()));
|
||||
ActivityBasicUnion basicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionid()));
|
||||
for (ActivitySchoolApply apply : applies) {
|
||||
activityId = applies[0].getActivityId();
|
||||
apply.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
apply.setStatus(pass ? 2 : 0);
|
||||
apply.setAwardsMode("2");
|
||||
apply.setAwardsMode(projectType == 1 ? "1" : "2");
|
||||
apply.setApplyDate(DateUtil.getDate());
|
||||
apply.setUnionId(unit.getUnionid());
|
||||
apply.setActivityUnionId(basicUnit.getUnionid());
|
||||
apply.setActivityUnionName(basicUnion.getUnionname());
|
||||
apply.setApplyUnitId(basicUnit.getId());
|
||||
}
|
||||
|
||||
for (ActivitySchoolApply apply2 : applies2) {
|
||||
activityId = applies2[0].getActivityId();
|
||||
apply2.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
apply2.setStatus(pass ? 2 : 0);
|
||||
apply2.setAwardsMode("1");
|
||||
apply2.setApplyDate(DateUtil.getDate());
|
||||
apply2.setUnionId(unit.getUnionid());
|
||||
apply2.setActivityUnionId(basicUnit.getUnionid());
|
||||
apply2.setActivityUnionName(basicUnion.getUnionname());
|
||||
}
|
||||
if (applies.length > 0) {
|
||||
activitySchoolApplyService.doApplies(activityId, basicUnit.getUnionid(), eventId, Arrays.asList(applies));
|
||||
}
|
||||
if (applies2.length > 0) {
|
||||
activitySchoolApplyService.doApplies(activityId, basicUnit.getUnionid(), eventId, Arrays.asList(applies2));
|
||||
}
|
||||
|
||||
activitySchoolApplyService.doApplies(activityId, basicUnit.getUnionid(), eventId, Arrays.asList(applies));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -627,7 +617,7 @@ public class ActivityApplyController {
|
||||
@Param(value = "isMenWomen", required = false) String[] isMenWomen) {
|
||||
Cnd cnd = CndPlus.create();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
SELECT
|
||||
ase.*,
|
||||
school.`name`,
|
||||
school.applyWay,
|
||||
@@ -639,15 +629,22 @@ public class ActivityApplyController {
|
||||
eve.isInterest,
|
||||
eve.projectType,
|
||||
eve.isMenWomen,
|
||||
(SELECT ast.`name` FROM activity_school_apply app LEFT JOIN activity_school_team ast ON ast.id = app.teamId WHERE app.eventId = ase.eventId AND app.activityId = ase.activityId AND app.userId = @userId) activityTeamName,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=2 and activityUnionId=@unionId) applyNum,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId = ase.eventId AND activityId = ase.activityId AND userId=@userId) userApply,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=2) totalApplyNum
|
||||
apply.`status`,
|
||||
IF (sum(apply.`status`=2) IS NULL, 0, sum(apply.`status`=2)) AS successUserApply,
|
||||
count(apply.id) userApply,
|
||||
apply.applyUser,
|
||||
(SELECT ast.`name` FROM activity_school_apply app LEFT JOIN activity_school_team ast ON ast.id = app.teamId WHERE app.eventId = ase.eventId AND app.activityId = ase.activityId AND app.userId = @userId) activityTeamName,
|
||||
(select GROUP_CONCAT(username) FROM activity_school_apply WHERE status=2 and eventId = ase.eventId
|
||||
AND activityId = ase.activityId AND applyUser AND (applyUser=@userId or userId=@userId)) userApplyNames,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=2 and activityUnionId=@unionId) totalApplyNum,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=0 and activityUnionId=@unionId) apply_num_bc,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=1 and activityUnionId=@unionId) apply_num_dsh
|
||||
FROM
|
||||
activity_school_event ase
|
||||
LEFT JOIN activity_school school ON ase.activityId = school.id
|
||||
LEFT JOIN activity_event eve ON ase.eventId=eve.id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.id=eve.competitionCategory
|
||||
LEFT JOIN activity_school_apply apply ON apply.activityId=ase.activityId AND apply.eventId=ase.eventId AND (applyUser=@userId or userId=@userId)
|
||||
$condition
|
||||
""").setParam("unionId", getUnionId()).setParam("userId", ShiroUtil.getUserId());
|
||||
|
||||
@@ -655,31 +652,17 @@ public class ActivityApplyController {
|
||||
if (!ShiroUtil.hasAnyRoles("H04,sysadmin")) {
|
||||
cnd.where().andLike("school.applyWay ", "1");
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(ShiroUtil.getUserId())));
|
||||
|
||||
}
|
||||
Vi.cndPlus(cnd, "abs.`name`", "=", groupName);
|
||||
//如果不是超级管理员就按男女查询,isMenWomen 1是男2是女projectType 2是团体
|
||||
/* if (!ShiroUtil.hasAnyRoles("sysadmin,H04,A06")) {
|
||||
if (StrUtil.isNotBlank(applyType)) {
|
||||
if (!applyType.equals("1")) {
|
||||
if (ShiroUtil.getPrincipalProperty("sex").equals("男")) {
|
||||
cnd.and(new Static("(eve.isMenWomen =1 OR eve.isMenWomen IS NULL )"));
|
||||
} else {
|
||||
cnd.and(new Static("(eve.isMenWomen =2 OR eve.isMenWomen IS NULL)"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if (Strings.isNotBlank(isAudit)) {
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_school_apply WHERE eventId = ase.eventId AND activityId = ase.activityId AND userId='%s')%s0".formatted(ShiroUtil.getUserId(), (isAudit.equals("true") ? ">" : "="))));
|
||||
}
|
||||
|
||||
Vi.cndPlus(cnd, "ase.activityId", "=", activityId);
|
||||
Vi.cndPlus(cnd, "ase.eventId", "=", eventId);
|
||||
|
||||
|
||||
Vi.cndPlus(cnd, "YEAR(school.applyStartTime)", "=", year);
|
||||
cnd.asc("eve.projectType").desc("eve.allName");
|
||||
cnd.andEX("ase.activityId", "=", activityId);
|
||||
cnd.andEX("ase.eventId", "=", eventId);
|
||||
cnd.andEX("YEAR(school.applyStartTime)", "=", year);
|
||||
cnd.groupBy("ase.id");
|
||||
cnd.asc("abs.`code`");
|
||||
sql.setCondition(cnd);
|
||||
return activitySchoolEventViService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
@@ -694,6 +677,7 @@ public class ActivityApplyController {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("activity.apply")
|
||||
public Object doLeaderCoachHead(@Param(value = "staffData", required = false) ActivitySchoolApply staffData,
|
||||
@Param(value = "LeaderData", required = false) ActivitySchoolApply LeaderData,
|
||||
@Param(value = "CoachData", required = false) ActivitySchoolApply CoachData,
|
||||
@@ -752,6 +736,7 @@ public class ActivityApplyController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("activity.apply")
|
||||
public Object getUnionCoachLeaderHead(@Param(value = "activityId", required = false) String activityId) {
|
||||
Map result = new HashMap();
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -809,6 +794,7 @@ public class ActivityApplyController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("activity.apply")
|
||||
public Object doDeleteApply(@Param(value = "activityId", required = false) String activityId,
|
||||
@Param(value = "userId", required = false) String userId,
|
||||
@Param(value = "eventId", required = false) String eventId) {
|
||||
@@ -816,19 +802,52 @@ public class ActivityApplyController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报名人员
|
||||
* 查询待审核人员
|
||||
*
|
||||
* @param activityId 活动
|
||||
* @param userId 用户
|
||||
* @return ?
|
||||
*/
|
||||
@At
|
||||
@Async
|
||||
public Object doDeleteActivityRegister(
|
||||
@ViReturn
|
||||
@RequiresPermissions("activity.apply")
|
||||
public Object dshApplyUserList(
|
||||
@Param(value = "activityId", required = false) String activityId,
|
||||
@Param(value = "userId", required = false) String userId) {
|
||||
Cnd cnd = Cnd.where("tissueId", "=", activityId).and("userId", "=", userId);
|
||||
simpleService.dao().clear(ActivityTissuePerson.class, cnd);
|
||||
@Param(value = "eventId", required = false) String eventId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
asa.id,
|
||||
asa.username,
|
||||
asa.loginname,
|
||||
asa.sex,
|
||||
asa.identity,
|
||||
asa.`status`,
|
||||
us.username applyUserName
|
||||
FROM
|
||||
`activity_school_apply` asa
|
||||
LEFT JOIN sys_user us ON asa.applyUser = us.id
|
||||
WHERE asa.activityId=@activityId and asa.eventId=@eventId and asa.activityUnionId=@activityUnionId
|
||||
ORDER BY asa.applyUser
|
||||
""").setParam("activityId",activityId).setParam("eventId", eventId).setParam("activityUnionId", getUnionId());
|
||||
return activitySchoolApplyService.listMap(sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("activity.apply")
|
||||
public Result doAuditApplyUser(
|
||||
@Param(value = "dshSelectionIds", required = false) String[] dshSelectionIds,
|
||||
Integer status, String activityId, String eventId) {
|
||||
if (Lang.isEmpty(dshSelectionIds) || Lang.isEmpty(status)) {
|
||||
return Result.error();
|
||||
}
|
||||
if (status == 2) {
|
||||
int appCount = activitySchoolApplyService.dao().count(ActivitySchoolApply.class, Cnd.where("activityId", "=", activityId).and("eventId", "=", eventId).and("status", "=", 2));
|
||||
ActivitySchoolEvent schoolEvent = activitySchoolApplyService.dao().fetch(ActivitySchoolEvent.class, Cnd.where("activityId", "=", activityId).and("eventId", "=", eventId));
|
||||
if (appCount + dshSelectionIds.length > schoolEvent.getAthletesMaxNum()) {
|
||||
return Result.error("当前项目限报【" + schoolEvent.getAthletesMaxNum() + "】人,目前已报【" + appCount + "】人,请检查报名人数!");
|
||||
}
|
||||
}
|
||||
activitySchoolApplyService.dao().update(ActivitySchoolApply.class, Chain.make("status", status), Cnd.where("id", "in", dshSelectionIds));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
+16
-1
@@ -2,6 +2,7 @@ package io.v.nutz.zhgh.activity.controller.school;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
@@ -282,6 +283,7 @@ public class ActivityCommonController {
|
||||
app.activityUnionName unionname,
|
||||
app.sex,
|
||||
app.mobile,
|
||||
app.unitname,
|
||||
u.idCard,
|
||||
u.userState,
|
||||
ev.allName,
|
||||
@@ -296,13 +298,16 @@ public class ActivityCommonController {
|
||||
activityId = @id
|
||||
$cnd
|
||||
ORDER BY
|
||||
app.applyUser DESC,
|
||||
ev.allName DESC,
|
||||
u.unionname DESC,
|
||||
app.`team` asc
|
||||
""").setParam("id", id);
|
||||
|
||||
if (Strings.isNotBlank(unionId)) {
|
||||
sql.setVar("cnd", "and u.unionid='" + unionId + "'");
|
||||
}
|
||||
|
||||
List<Record> list = activitySchoolApplyService.list(sql);
|
||||
String activityName = list.get(0).getString("activityName");
|
||||
|
||||
@@ -314,9 +319,19 @@ public class ActivityCommonController {
|
||||
schoolApply.setSf(s);
|
||||
excels.add(schoolApply);
|
||||
});
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("小队名称", "team", 20));
|
||||
exportEntities.add(new ExcelExportEntity("项目名称", "allName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||
exportEntities.add(new ExcelExportEntity("性别", "sex", 20));
|
||||
exportEntities.add(new ExcelExportEntity("手机号码", "mobile", 20));
|
||||
exportEntities.add(new ExcelExportEntity("所在单位", "unitname", 20));
|
||||
exportEntities.add(new ExcelExportEntity("身份", "sf", 20));
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + new String((activityName + "报名表.xls").getBytes("utf-8"), "ISO8859-1"));
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ActivitySchoolApply.class, excels);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), exportEntities, excels);
|
||||
workbook.write(response.getOutputStream());
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -119,9 +119,11 @@ public class ActivityReadingController {
|
||||
unit.`name` unitname,
|
||||
ev.allName,
|
||||
ev.id evid,
|
||||
ev.projectType
|
||||
ev.projectType,
|
||||
us.username applyUserName
|
||||
FROM
|
||||
activity_school_apply app
|
||||
LEFT JOIN sys_user us ON us.id = app.applyUser
|
||||
LEFT JOIN activity_school school ON school.id = app.activityId
|
||||
LEFT JOIN activity_school_team team ON app.teamId = team.id
|
||||
LEFT JOIN activity_event ev ON ev.id = app.eventId
|
||||
@@ -141,7 +143,7 @@ public class ActivityReadingController {
|
||||
cnd.and("school.belongClubId", "in", vi.getMangeClubStr());
|
||||
}
|
||||
}
|
||||
cnd.desc("ev.allName").asc("ev.projectType").asc("team.`name`");
|
||||
cnd.desc("ev.allName").asc("ev.projectType").asc("app.applyUser").asc("team.`name`");
|
||||
List<NutMap> applies = activitySchoolApplyService.listMap(sql);
|
||||
|
||||
List<NutMap> apply = new ArrayList();
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package io.v.nutz.zhgh.activity.models;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ActivityMobileSignUpParam {
|
||||
|
||||
private String activityId;
|
||||
|
||||
private String eventId;
|
||||
|
||||
private String teamId;
|
||||
|
||||
private String teamName;
|
||||
|
||||
private List<String> userIds;
|
||||
|
||||
}
|
||||
@@ -56,11 +56,22 @@ public class ActivitySchoolApply implements Serializable {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitId;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("报名所属单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String applyUnitId;
|
||||
|
||||
@Column
|
||||
@Comment("所属工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("所属工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("所属活动工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
|
||||
@@ -146,4 +146,11 @@ public class ActivitySchoolEvent {
|
||||
@Comment("报名人数限制模式")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer applyUserModel;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("是否组队报名")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("0")
|
||||
private Boolean isTeamSignUp;
|
||||
}
|
||||
|
||||
+180
-3
@@ -1,23 +1,34 @@
|
||||
package io.v.nutz.zhgh.mobile.activity.Sports;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_unit;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.activity.models.*;
|
||||
import io.v.nutz.zhgh.mobile.activity.Sports.service.MobileActivityApplyService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
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;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2022/1/6 9:22
|
||||
@@ -31,6 +42,8 @@ public class mobileActivityListController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private MobileActivityApplyService mobileActivityApplyService;
|
||||
|
||||
@At("/activityList")
|
||||
@Ok("beetl:/mobile/activity/Sports/activityList.html")
|
||||
@@ -54,8 +67,6 @@ public class mobileActivityListController {
|
||||
@Param(value = "teamName", required = false) String teamName) {
|
||||
|
||||
User user = baseService.dao().fetch(User.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
|
||||
int i = cn.hutool.core.date.DateUtil.ageOfNow(user.getBirthday());
|
||||
ActivitySchool activitySchool = baseService.dao().fetch(ActivitySchool.class, activityId);
|
||||
ActivityBasicUnit basicUnit = baseService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", user.getUnitid()));
|
||||
ActivityBasicUnion basicUnion = baseService.dao().fetch(ActivityBasicUnion.class, basicUnit.getUnionid());
|
||||
ActivityEvent event = baseService.dao().fetch(ActivityEvent.class, Cnd.where("id", "=", eventId));
|
||||
@@ -66,7 +77,7 @@ public class mobileActivityListController {
|
||||
schoolApply.setApplyDate(DateUtil.getDate());
|
||||
schoolApply.setIdentity(Lang.list("1"));
|
||||
schoolApply.setDivisionLevelLeadership(false);
|
||||
schoolApply.setStatus(2);
|
||||
schoolApply.setStatus(1);
|
||||
schoolApply.setTeamId(teamId);
|
||||
schoolApply.setTeam(teamName);
|
||||
schoolApply.setApplyUser(user.getId());
|
||||
@@ -123,5 +134,171 @@ public class mobileActivityListController {
|
||||
return baseService.dao().count(ActivityUserScope.class, Cnd.where("groupId", "=", activityGroupId).and("userId", "=", ShiroUtil.getUserId()));
|
||||
}
|
||||
|
||||
private String getUnionId() {
|
||||
Sys_user user = (Sys_user) ShiroUtil.getPrincipal();
|
||||
Sys_unit unit = user.getUnit();
|
||||
ActivityBasicUnit basicUnit = baseService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", unit.getId()));
|
||||
ActivityBasicUnion basicUnion = baseService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionid()));
|
||||
|
||||
return unit == null ? "" : basicUnion.getId();
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object pageData(@Param(value = "applyType", required = false) String applyType,
|
||||
@Param(value = "isAudit", required = false) String isAudit,
|
||||
@Param(value = "groupName", required = false) String groupName,
|
||||
@Param(value = "activityId", required = false) String activityId,
|
||||
@Param(value = "eventId", required = false) String eventId,
|
||||
@Param(value = "year", required = false) Integer year, PageForm page,
|
||||
@Param(value = "isMenWomen", required = false) String[] isMenWomen) {
|
||||
Cnd cnd = CndPlus.create();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
ase.*,
|
||||
school.`name`,
|
||||
school.applyWay,
|
||||
school.applyStartTime,
|
||||
school.applyEndTime,
|
||||
school.applyType,
|
||||
school.activityGroupId,
|
||||
eve.allName,
|
||||
eve.isInterest,
|
||||
eve.projectType,
|
||||
eve.isMenWomen,
|
||||
apply.`status`,
|
||||
IF (sum(apply.`status`=2) IS NULL, 0, sum(apply.`status`=2)) AS successUserApply,
|
||||
count(apply.id) userApply,
|
||||
apply.applyUser,
|
||||
(SELECT ast.`name` FROM activity_school_apply app LEFT JOIN activity_school_team ast ON ast.id = app.teamId WHERE app.eventId = ase.eventId AND app.activityId = ase.activityId AND app.userId = @userId) activityTeamName,
|
||||
(select GROUP_CONCAT(username) FROM activity_school_apply WHERE status=2 and eventId = ase.eventId
|
||||
AND activityId = ase.activityId AND applyUser AND (applyUser=@userId or userId=@userId)) userApplyNames,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=2 and activityUnionId=@unionId) totalApplyNum,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=0 and activityUnionId=@unionId) apply_num_bc,
|
||||
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and status=1 and activityUnionId=@unionId) apply_num_dsh
|
||||
FROM
|
||||
activity_school_event ase
|
||||
LEFT JOIN activity_school school ON ase.activityId = school.id
|
||||
LEFT JOIN activity_event eve ON ase.eventId=eve.id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.id=eve.competitionCategory
|
||||
LEFT JOIN activity_school_apply apply ON apply.activityId=ase.activityId AND apply.eventId=ase.eventId AND (applyUser=@userId or userId=@userId)
|
||||
$condition
|
||||
""").setParam("unionId", getUnionId()).setParam("userId", ShiroUtil.getUserId());
|
||||
cnd.where().andLike("school.applyWay ", "1");
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(ShiroUtil.getUserId())));
|
||||
Vi.cndPlus(cnd, "abs.`name`", "=", groupName);
|
||||
//如果不是超级管理员就按男女查询,isMenWomen 1是男2是女projectType 2是团体
|
||||
if (StrUtil.isNotBlank(applyType)) {
|
||||
if (!applyType.equals("1")) {
|
||||
if (ShiroUtil.getPrincipalProperty("sex").equals("男")) {
|
||||
cnd.and(new Static("(eve.isMenWomen =1 OR eve.isMenWomen IS NULL )"));
|
||||
} else {
|
||||
cnd.and(new Static("(eve.isMenWomen =2 OR eve.isMenWomen IS NULL)"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Strings.isNotBlank(isAudit)) {
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_school_apply WHERE eventId = ase.eventId AND activityId = ase.activityId AND userId='%s')%s0".formatted(ShiroUtil.getUserId(), (isAudit.equals("true") ? ">" : "="))));
|
||||
}
|
||||
|
||||
cnd.andEX("ase.activityId", "=", activityId);
|
||||
cnd.andEX("ase.eventId", "=", eventId);
|
||||
cnd.andEX("YEAR(school.applyStartTime)", "=", year);
|
||||
cnd.groupBy("ase.id");
|
||||
cnd.asc("abs.`code`");
|
||||
sql.setCondition(cnd);
|
||||
return baseService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object searchNoRegisterUser(String searchKey,
|
||||
String activityId,
|
||||
Boolean isTeamSignUp,
|
||||
String isMenWomen,
|
||||
String eventId) {
|
||||
|
||||
ActivitySchool activitySchool = baseService.dao().fetch(ActivitySchool.class, Cnd.where("id", "=", activityId));
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
loginname loginName,
|
||||
username userName,
|
||||
sex,
|
||||
unitname AS unitName,
|
||||
unionname AS unionName
|
||||
FROM
|
||||
`user`
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("unionId", "=", getUnionId());
|
||||
if (StrUtil.isNotBlank(isMenWomen)) {
|
||||
cnd.andEX("sex", "=", isMenWomen.equals("1") ? "男" : "女");
|
||||
}
|
||||
if (Lang.isNotEmpty(searchKey)) {
|
||||
cnd.and(Cnd.exps(Cnd.likeEX("username", searchKey.trim())).or(Cnd.likeEX("loginname", searchKey.trim())));
|
||||
}
|
||||
|
||||
cnd.and(new Static("""
|
||||
id not in (SELECT userId FROM activity_school_apply WHERE activityId = '%s' and eventId='%s')
|
||||
""".formatted(activityId, eventId)));
|
||||
if (activitySchool.getActivityGroupId() != null) {
|
||||
cnd.and(new Static("""
|
||||
id IN ( SELECT userId FROM activity_user_scope WHERE groupId IN ( SELECT activityGroupId FROM activity_school WHERE id = '%s' AND activityGroupId IS NOT NULL ) )
|
||||
""".formatted(activityId)));
|
||||
}
|
||||
|
||||
sql.setCondition(cnd);
|
||||
|
||||
return baseService.listPageMap(1, 10, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object doTeamSignUp(ActivityMobileSignUpParam param) {
|
||||
mobileActivityApplyService.doTeamSignUp(param.getActivityId(), param.getUserIds(), param.getEventId(), param.getTeamId(), param.getTeamName());
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object selectRegisterList(String activityId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
userId AS id,
|
||||
username userName,
|
||||
loginname loginName,
|
||||
unitname unitName,
|
||||
sex,
|
||||
activityUnionName unionName,
|
||||
activityUnionId unionId,
|
||||
eventId,
|
||||
applyUser
|
||||
FROM
|
||||
activity_school_apply
|
||||
$condition
|
||||
""");
|
||||
cnd.and("activityId", "=", activityId);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = mobileActivityApplyService.listMap(sql);
|
||||
return list;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object doDeleteApply(String activityId, String eventId) {
|
||||
mobileActivityApplyService.doDeleteApply(activityId, eventId);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package io.v.nutz.zhgh.mobile.activity.Sports.service;
|
||||
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.zhgh.activity.models.ActivitySchoolApply;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MobileActivityApplyService extends BaseService<ActivitySchoolApply> {
|
||||
void doDeleteApply(String activityId, String eventId);
|
||||
void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName);
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package io.v.nutz.zhgh.mobile.activity.Sports.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.v.nutz.base.service.impl.BaseServiceImpl;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.activity.models.*;
|
||||
import io.v.nutz.zhgh.mobile.activity.Sports.service.MobileActivityApplyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.web.filter.mgt.DefaultFilter;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.apache.shiro.web.filter.mgt.DefaultFilter.user;
|
||||
|
||||
/**
|
||||
* @ClassName ActivitySchoolApplyServiceImpl
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2025/4/2 下午4:46
|
||||
*/
|
||||
@IocBean(args = {"refer:dao"})
|
||||
@Slf4j
|
||||
public class MobileActivityApplyServiceImpl extends BaseServiceImpl<ActivitySchoolApply> implements MobileActivityApplyService {
|
||||
public MobileActivityApplyServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doDeleteApply(String activityId, String eventId) {
|
||||
clear(Cnd.where("activityId", "=", activityId).and("eventId", "=", eventId).and("applyUser", "=", ShiroUtil.getUserId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName) {
|
||||
List<ActivitySchoolApply> schoolApplyArrayList = new ArrayList<>();
|
||||
userIds.forEach(i -> {
|
||||
ActivitySchoolApply schoolApply = getApply(activityId, eventId, i, teamId, teamName);
|
||||
schoolApplyArrayList.add(schoolApply);
|
||||
});
|
||||
insert(schoolApplyArrayList);
|
||||
}
|
||||
|
||||
public ActivitySchoolApply getApply(String activityId, String eventId, String userId, String teamId, String teamName) {
|
||||
ActivitySchool activitySchool = dao().fetch(ActivitySchool.class, activityId);
|
||||
User user = dao().fetch(User.class, Cnd.where("id", "=", userId));
|
||||
ActivityBasicUnit basicUnit = dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", user.getUnitid()));
|
||||
ActivityBasicUnion basicUnion = dao().fetch(ActivityBasicUnion.class, basicUnit.getUnionid());
|
||||
ActivityEvent event = dao().fetch(ActivityEvent.class, Cnd.where("id", "=", eventId));
|
||||
ActivitySchoolApply schoolApply = new ActivitySchoolApply();
|
||||
schoolApply.setActivityId(activityId);
|
||||
schoolApply.setEventId(eventId);
|
||||
schoolApply.setAwardsMode(event.getProjectType());
|
||||
schoolApply.setApplyDate(DateUtil.now());
|
||||
schoolApply.setIdentity(Lang.list("1"));
|
||||
schoolApply.setDivisionLevelLeadership(false);
|
||||
if (activitySchool.getApplyWay().size() == 2) {
|
||||
schoolApply.setStatus(1);
|
||||
} else {
|
||||
schoolApply.setStatus(2);
|
||||
}
|
||||
schoolApply.setTeamId(teamId);
|
||||
schoolApply.setTeam(teamName);
|
||||
schoolApply.setApplyUser(ShiroUtil.getUserId());
|
||||
schoolApply.setUserId(userId);
|
||||
schoolApply.setMobile(user.getMobile());
|
||||
schoolApply.setSex(user.getSex());
|
||||
schoolApply.setUnitId(user.getUnitid());
|
||||
schoolApply.setUnionId(user.getUnionid());
|
||||
schoolApply.setUnionName(user.getUnionname());
|
||||
schoolApply.setActivityUnionId(basicUnion.getId());
|
||||
schoolApply.setActivityUnionName(basicUnion.getUnionname());
|
||||
schoolApply.setUnitname(user.getUnitname());
|
||||
schoolApply.setLoginname(user.getLoginname());
|
||||
schoolApply.setUsername(user.getUsername());
|
||||
schoolApply.setBirthday(user.getBirthday());
|
||||
schoolApply.setApplyUnitId(basicUnit.getId());
|
||||
return schoolApply;
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,15 @@
|
||||
</el-steps>
|
||||
|
||||
<div v-if="active === 0" style="margin-top: 20px">
|
||||
<el-form ref="activityForm" :model="form" :rules="formRules" label-position="top" label-width="120px" label-suffix=":">
|
||||
<el-form ref="activityForm" :model="form" :rules="formRules" label-position="top"
|
||||
label-width="120px" label-suffix=":">
|
||||
<vi-title title="填写活动信息"></vi-title>
|
||||
|
||||
<el-row gutter="40">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="activityLevel" label="活动级别">
|
||||
<el-radio-group v-model="form.activityLevel" @change="activityLevelChange">
|
||||
<el-radio-group v-model="form.activityLevel"
|
||||
@change="activityLevelChange">
|
||||
<template v-if="is_sysadmin">
|
||||
<el-radio :label="40001" border>校级</el-radio>
|
||||
<el-radio :label="40002" border>基层工会</el-radio>
|
||||
@@ -20,8 +22,10 @@
|
||||
</template>
|
||||
<template v-if="!is_sysadmin">
|
||||
<el-radio :label="40001" border v-if="is_a06">校级</el-radio>
|
||||
<el-radio v-if="is_union" :label="40002" border>基层工会</el-radio>
|
||||
<el-radio :label="40003" border v-if="is_club">社团或协会</el-radio>
|
||||
<el-radio v-if="is_union" :label="40002" border>基层工会
|
||||
</el-radio>
|
||||
<el-radio :label="40003" border v-if="is_club">社团或协会
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@@ -40,41 +44,51 @@
|
||||
</el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="name" label="活动名称">
|
||||
<el-input maxlength="50" placeholder="请填写活动名称" v-model="form.name" type="text"></el-input>
|
||||
<el-input maxlength="50" placeholder="请填写活动名称"
|
||||
v-model="form.name" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="activityCode" label="活动编号">
|
||||
<el-input maxlength="50" disabled v-model="form.activityCode" type="text"></el-input>
|
||||
<el-input maxlength="50" disabled v-model="form.activityCode"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row gutter="40">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="unitSponsor" label="主办单位">
|
||||
<el-select v-model="form.unitSponsor" clearable filterable multiple placeholder="请选择主办单位" style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select v-model="form.unitSponsor" clearable filterable multiple
|
||||
placeholder="请选择主办单位" style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="undertakeUnit" label="承办单位">
|
||||
<el-select v-model="form.undertakeUnit" clearable filterable multiple placeholder="请选择承办单位" style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select v-model="form.undertakeUnit" clearable filterable multiple
|
||||
placeholder="请选择承办单位" style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="unitJointly" label="协办单位">
|
||||
<el-select v-model="form.unitJointly" multiple placeholder="请选择协办单位" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select v-model="form.unitJointly" multiple
|
||||
placeholder="请选择协办单位" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id"
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="address" label="活动地址">
|
||||
<el-input maxlength="100" placeholder="请填写活动地址" v-model="form.address" type="text"></el-input>
|
||||
<el-input maxlength="100" placeholder="请填写活动地址"
|
||||
v-model="form.address" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -117,11 +131,15 @@
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option v-for="item in activityGroupList" :label="item.groupName" :value="item.groupId"></el-option>
|
||||
<el-option v-for="item in activityGroupList"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="$refs.drawerUserScope.userScopeDialog = true" type="primary">设置</el-button>
|
||||
<el-button @click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -148,10 +166,14 @@
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<el-col v-if="form.activityLevel === 40003 || (form.activityLevel === 40001 && is_club)" :span="8">
|
||||
<el-col
|
||||
v-if="form.activityLevel === 40003 || (form.activityLevel === 40001 && is_club)"
|
||||
:span="8">
|
||||
<el-form-item prop="belongClubId" label="活动所属协会">
|
||||
<el-select v-model="form.belongClubId" placeholder="请选择活动所属协会" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in clubOptions" :key="item.stid" :label="item.name" :value="item.stid"></el-option>
|
||||
<el-select v-model="form.belongClubId" placeholder="请选择活动所属协会"
|
||||
filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in clubOptions" :key="item.stid"
|
||||
:label="item.name" :value="item.stid"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -162,7 +184,9 @@
|
||||
<el-form-item prop="applyType" label="活动类型">
|
||||
<el-radio-group v-model="form.applyType" @change="applyTypeChange">
|
||||
<el-radio :label="1" border>单一团体赛</el-radio>
|
||||
<el-radio :label="2" border :disabled="form.activityLevel !== 40001">综合赛</el-radio>
|
||||
<el-radio :label="2" border
|
||||
:disabled="form.activityLevel !== 40001">综合赛
|
||||
</el-radio>
|
||||
<el-radio :label="3" border>个人赛</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@@ -170,7 +194,9 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="applyWay" label="报名方式">
|
||||
<el-checkbox-group v-model="form.applyWay" @change="applyWayChange">
|
||||
<el-checkbox :disabled="form.activityLevel !== 40001" :label="2" border>基层工会报名</el-checkbox>
|
||||
<el-checkbox :disabled="form.activityLevel !== 40001" :label="2"
|
||||
border>基层工会报名
|
||||
</el-checkbox>
|
||||
<el-checkbox :label="1" border>个人报名</el-checkbox>
|
||||
<!-- <el-checkbox :label="3" border>小程序报名</el-checkbox>-->
|
||||
</el-checkbox-group>
|
||||
@@ -197,27 +223,32 @@
|
||||
|
||||
<el-row gutter="40" v-if="form.gameStyle === 1 && !form.applyWay.includes(3)">
|
||||
<el-col :span="24">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'athleteQualification' : '-'" label="运动员资格">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'athleteQualification' : '-'"
|
||||
label="运动员资格">
|
||||
<div id="athleteQualification"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'registrationMethod' : '-'" label="报名方法">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'registrationMethod' : '-'"
|
||||
label="报名方法">
|
||||
<div id="registrationMethod"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'competitionMethod' : '-'" label="竞赛方法">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'competitionMethod' : '-'"
|
||||
label="竞赛方法">
|
||||
<div id="competitionMethod"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'rewardMethod' : '-'" label="奖励方法">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'rewardMethod' : '-'"
|
||||
label="奖励方法">
|
||||
<div id="rewardMethod"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'precautions' : '-'" label="注意事项">
|
||||
<el-form-item :prop="form.gameStyle === 1 ? 'precautions' : '-'"
|
||||
label="注意事项">
|
||||
<div id="precautions"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -225,14 +256,16 @@
|
||||
|
||||
<el-row gutter="40" v-if="form.gameStyle === 2 || form.applyWay.includes(3)">
|
||||
<el-col :span="24">
|
||||
<el-form-item :prop="form.gameStyle === 2 ? 'eventNotification' : '-'" label="活动通知">
|
||||
<el-form-item :prop="form.gameStyle === 2 ? 'eventNotification' : '-'"
|
||||
label="活动通知">
|
||||
<div id="eventNotification"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="files" label="封面图" v-if="form.applyWay.includes(1)">
|
||||
<file-upload :files.sync="form.image" :max="1" :type="['jpg', 'jpeg', 'png']" card></file-upload>
|
||||
<file-upload :files.sync="form.image" :max="1" :type="['jpg', 'jpeg', 'png']"
|
||||
card></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -295,26 +328,45 @@
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option v-for="item in checkedEvents" :key="item.id" :label="item.allName" :value="item.id"></el-option>
|
||||
<el-option v-for="item in checkedEvents" :key="item.id"
|
||||
:label="item.allName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="eventForm.checkedEventId === 'allItems' || projectType === '1'" :span="6">
|
||||
<el-col
|
||||
v-if="eventForm.checkedEventId === 'allItems' || projectType === '1'"
|
||||
:span="8">
|
||||
<el-form-item label="年龄限制功能">
|
||||
<el-button type="primary" @click="doAssignmentDate">根据比赛项目基础表统赋</el-button>
|
||||
<el-button type="primary" @click="doAssignmentDate">
|
||||
根据比赛项目基础表统赋
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.applyWay.includes(1)" :span="6">
|
||||
<el-form-item label="是否组队报名">
|
||||
<el-radio-group v-model="eventForm.isTeamSignUp">
|
||||
<el-radio-button :label="true">组队</el-radio-button>
|
||||
<el-radio-button :label="false">不组队</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="projectType === '2' && form.applyType === 2" :span="6">
|
||||
<el-col v-if="projectType === '2' && form.applyType === 2" :span="8">
|
||||
<el-form-item label="是否只需报领队" class="isLeaderColor">
|
||||
<el-checkbox v-model="eventForm.isLeader" @change="isLeaderChange">是否只需报领队</el-checkbox>
|
||||
<el-checkbox v-model="eventForm.isLeader" @change="isLeaderChange">
|
||||
是否只需报领队
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="eventForm.checkedEventId === 'allItems' || (projectType === '1' && form.activityLevel === 40001)" :span="6">
|
||||
|
||||
<el-col
|
||||
v-if="eventForm.checkedEventId === 'allItems' || (projectType === '1' && form.activityLevel === 40001)"
|
||||
:span="8">
|
||||
<el-form-item label="运动员数量限制模式">
|
||||
<el-radio-group v-model="eventForm.applyUserModel" @input="applyUserModelInput">
|
||||
<el-radio-group v-model="eventForm.applyUserModel"
|
||||
@input="applyUserModelInput">
|
||||
<el-radio-button :label="1">固定</el-radio-button>
|
||||
<el-radio-button :label="2">分配模式</el-radio-button>
|
||||
</el-radio-group>
|
||||
@@ -324,7 +376,9 @@
|
||||
|
||||
<el-row v-show="eventForm.applyUserModel !== 2" gutter="40">
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="projectType === '1' ? '每队(项)运动员最多人数' : '每队(项)运动员人数'" prop="athletesMaxNum">
|
||||
<el-form-item
|
||||
:label="projectType === '1' ? '每队(项)运动员最多人数' : '每队(项)运动员人数'"
|
||||
prop="athletesMaxNum">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
v-model="eventForm.athletesMaxNum"
|
||||
@@ -370,7 +424,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')" :span="12">
|
||||
<el-col
|
||||
v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')"
|
||||
:span="12">
|
||||
<el-form-item label="替补最多人数" prop="substituteNum">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
@@ -384,7 +440,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')" :span="8">
|
||||
<el-col
|
||||
v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')"
|
||||
:span="8">
|
||||
<el-form-item prop="restrictMaxNum" label="每队最多人数">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
@@ -404,7 +462,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')" :span="8">
|
||||
<el-col
|
||||
v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')"
|
||||
:span="8">
|
||||
<el-form-item prop="restrictMinNum" label="每队最少人数">
|
||||
<el-input-number
|
||||
:value="eventForm.athletesMaxNum"
|
||||
@@ -419,7 +479,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')">
|
||||
<el-col :span="8"
|
||||
v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2')">
|
||||
<el-form-item
|
||||
label="最多创建几队(如需修改,请先删掉项目,在重新添加项目后,再修改队数)"
|
||||
prop="restrictTotalTeam"
|
||||
@@ -437,8 +498,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2' && !eventForm.isLeader)" :span="8">
|
||||
<el-form-item label="每队男运动员最少人数(若不填值,报名数量不限;如为0,表示不允许报名)" prop="restrictBoyNum">
|
||||
<el-col
|
||||
v-if="form.applyType===1||(form.applyType===2&&!eventForm.isLeader&&eventForm.checkedEventId!=='allItems')"
|
||||
:span="8">
|
||||
<el-form-item
|
||||
:label="eventForm.isTeamSignUp?'每队男运动员最少人数(如为0,表示不允许报名)':'每队男运动员最少人数(若不填值,报名数量不限;如为0,表示不允许报名)'"
|
||||
prop="restrictBoyNum">
|
||||
<el-input
|
||||
v-model="eventForm.restrictBoyNum"
|
||||
placeholder="请填写男运动员人数"
|
||||
@@ -448,8 +513,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="form.applyType === 1 || (form.applyType === 2 && projectType === '2' && !eventForm.isLeader)" :span="8">
|
||||
<el-form-item label="每队女运动员最少人数(若不填值,报名数量不限;如为0,表示不允许报名)" prop="restrictGirlNum">
|
||||
<el-col
|
||||
v-if="form.applyType===1||(form.applyType===2&&!eventForm.isLeader&&eventForm.checkedEventId!=='allItems')"
|
||||
:span="8">
|
||||
<el-form-item
|
||||
:label="eventForm.isTeamSignUp?'每队女运动员最少人数(如为0,表示不允许报名)':'每队女运动员最少人数(若不填值,报名数量不限;如为0,表示不允许报名)'"
|
||||
prop="restrictGirlNum">
|
||||
<el-input
|
||||
v-model="eventForm.restrictGirlNum"
|
||||
placeholder="请填写女运动员人数"
|
||||
@@ -460,7 +529,8 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-if="form.applyType === 1">
|
||||
<el-form-item prop="deputyDirectorNum" label="每队副处长(级)以上最少人数">
|
||||
<el-form-item prop="deputyDirectorNum"
|
||||
label="每队副处长(级)以上最少人数">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
v-model="eventForm.deputyDirectorNum"
|
||||
@@ -478,10 +548,13 @@
|
||||
<el-card style="margin-left: 20px; margin-right: 60px">
|
||||
<vi-title2 title="分段设置">
|
||||
<template #func>
|
||||
<el-button size="small" type="primary" @click="unionLimitQuickSetting">应用分段设置</el-button>
|
||||
<el-button size="small" type="primary"
|
||||
@click="unionLimitQuickSetting">应用分段设置
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-row v-for="(item, index) in unionUserNumCalc" :gutter="20" class="mb5">
|
||||
<el-row v-for="(item, index) in unionUserNumCalc" :gutter="20"
|
||||
class="mb5">
|
||||
<el-col :span="7">
|
||||
<el-input-number
|
||||
v-model="item.startNum"
|
||||
@@ -528,7 +601,8 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="mt10">
|
||||
<div v-for="(item, index) in unionUserNumCalcTips" class="text-danger">
|
||||
<div v-for="(item, index) in unionUserNumCalcTips"
|
||||
class="text-danger">
|
||||
<span class="mr10">({{ index + 1 }}).</span>
|
||||
{{ item }}
|
||||
</div>
|
||||
@@ -546,11 +620,14 @@
|
||||
placeholder="请输入一键比例"
|
||||
size="small"
|
||||
></el-input-number>
|
||||
<el-button class="ml5" size="small" type="primary" @click="applyScaleSettings">应用比例设置</el-button>
|
||||
<el-button class="ml5" size="small" type="primary"
|
||||
@click="applyScaleSettings">应用比例设置
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="eventForm.unionLimit" max-height="500px">
|
||||
<el-table-column label="基层工会" prop="unionname"></el-table-column>
|
||||
<el-table-column label="基层工会"
|
||||
prop="unionname"></el-table-column>
|
||||
<el-table-column label="人数" prop="teacherCount"></el-table-column>
|
||||
<el-table-column label="比例(%)" prop="ratio">
|
||||
<template scope="{row}">
|
||||
@@ -580,10 +657,13 @@
|
||||
</el-table>
|
||||
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<div class="text-danger" style="width: 100%; font-size: 18px; display: flex; align-items: center; font-weight: bold">
|
||||
<div class="text-danger"
|
||||
style="width: 100%; font-size: 18px; display: flex; align-items: center; font-weight: bold">
|
||||
限制总人数:{{ summaryCount }}人
|
||||
</div>
|
||||
<el-button type="danger" @click="clearUnionLimit">清空基层工会人数限制</el-button>
|
||||
<el-button type="danger" @click="clearUnionLimit">
|
||||
清空基层工会人数限制
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-row>
|
||||
@@ -597,7 +677,8 @@
|
||||
<el-button type="primary" @click="saveEvent" v-else>保存项目信息</el-button>
|
||||
</el-row>
|
||||
|
||||
<drawer-user-scope @group_change="getActivityGroup" ref="drawerUserScope" :group_id.sync="form.activityGroupId"></drawer-user-scope>
|
||||
<drawer-user-scope @group_change="getActivityGroup" ref="drawerUserScope"
|
||||
:group_id.sync="form.activityGroupId"></drawer-user-scope>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -666,8 +747,16 @@ module.exports = {
|
||||
activityGroupId: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
gameStyle: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
applyWay: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
restrictTotalPeople: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
restrictTotalTeam: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
restrictTotalPeople: [{
|
||||
required: true,
|
||||
message: "必填",
|
||||
trigger: ["blur", "change"]
|
||||
}],
|
||||
restrictTotalTeam: [{
|
||||
required: true,
|
||||
message: "必填",
|
||||
trigger: ["blur", "change"]
|
||||
}],
|
||||
// registrationMethod: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// competitionMethod: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// rewardMethod: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
@@ -679,7 +768,11 @@ module.exports = {
|
||||
// belongClubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
applyType: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
athletesMaxNum: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
restrictRegNumber: [{ required: true, message: "必填", trigger: ["blur", "change"] }]
|
||||
restrictRegNumber: [{
|
||||
required: true,
|
||||
message: "必填",
|
||||
trigger: ["blur", "change"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -761,8 +854,6 @@ module.exports = {
|
||||
},
|
||||
async doAssignmentDate() {
|
||||
await this.saveEvent()
|
||||
const form = clone(this.form)
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: "正在提交...",
|
||||
@@ -783,7 +874,8 @@ module.exports = {
|
||||
filterMethod(query, item) {
|
||||
return item.allName.indexOf(query) > -1
|
||||
},
|
||||
rightChange(v) {},
|
||||
rightChange(v) {
|
||||
},
|
||||
rightCheckChange(v, v2) {
|
||||
this.rightChecked = v
|
||||
},
|
||||
@@ -815,6 +907,8 @@ module.exports = {
|
||||
initCheckedEventInfo() {
|
||||
this.checkedEventInfo = this.checkedEvents.map((v) => {
|
||||
v.eventId = v.id
|
||||
v.isTeamSignUp = false
|
||||
|
||||
if (v.projectType === "1") {
|
||||
v.athletesMaxNum = 3
|
||||
v.restrictRegNumber = 2
|
||||
@@ -847,12 +941,13 @@ module.exports = {
|
||||
projectType: resp.data.projectType,
|
||||
leanderNum: 0,
|
||||
coachNum: 0,
|
||||
athletesMaxNum: resp.data.projectType == 1 ? 3 : null,
|
||||
athletesMaxNum: resp.data.projectType === 1 ? 3 : null,
|
||||
restrictTotalTeam: 1,
|
||||
substituteNum: 0,
|
||||
restrictRegNumber: resp.data.projectType == 1 ? 2 : null,
|
||||
restrictRegNumber: resp.data.projectType === 1 ? 2 : null,
|
||||
isLeader: false,
|
||||
applyUserModel: 1
|
||||
applyUserModel: 1,
|
||||
isTeamSignUp: false
|
||||
}
|
||||
|
||||
this.projectType = resp.data.projectType
|
||||
@@ -868,6 +963,10 @@ module.exports = {
|
||||
v.athletesMaxNum = data.athletesMaxNum
|
||||
v.restrictRegNumber = data.restrictRegNumber
|
||||
v.unionLimit = data.unionLimit
|
||||
v.isTeamSignUp = data.isTeamSignUp
|
||||
}
|
||||
if (this.formData.applyWay.includes(1)) {
|
||||
v.isTeamSignUp = data.isTeamSignUp
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -879,6 +978,9 @@ module.exports = {
|
||||
this.$set(this.eventForm, "athletesMaxNum", data.athletesMaxNum)
|
||||
this.$set(this.eventForm, "restrictRegNumber", data.restrictRegNumber)
|
||||
}
|
||||
if (this.form.applyWay.includes(1)) {
|
||||
this.$set(this.eventForm, 'isTeamSignUp', data.isTeamSignUp)
|
||||
}
|
||||
this.$set(this.eventForm, "checkedEventId", info.eventId)
|
||||
}
|
||||
data.eventId = data.checkedEventId
|
||||
@@ -893,7 +995,7 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
getArrDifference(arr1, arr2) {
|
||||
return arr1.concat(arr2).filter(function (v, i, arr) {
|
||||
return arr1.concat(arr2).filter(function(v, i, arr) {
|
||||
return arr.indexOf(v) === arr.lastIndexOf(v)
|
||||
})
|
||||
},
|
||||
@@ -934,6 +1036,7 @@ module.exports = {
|
||||
allName: "所有单项",
|
||||
projectType: "1",
|
||||
applyUserModel: 1,
|
||||
isTeamSignUp: false,
|
||||
athletesMaxNum: data ? data.athletesMaxNum : 3,
|
||||
restrictRegNumber: data ? data.restrictRegNumber : 2
|
||||
}
|
||||
@@ -950,7 +1053,8 @@ module.exports = {
|
||||
leanderNum: 0,
|
||||
coachNum: 0,
|
||||
athletesMaxNum: 3,
|
||||
substituteNum: 0
|
||||
substituteNum: 0,
|
||||
isTeamSignUp: false
|
||||
}
|
||||
this.initCheckedEventInfo()
|
||||
}
|
||||
@@ -1109,7 +1213,8 @@ module.exports = {
|
||||
.then(async () => {
|
||||
await this.doOperate()
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
} else {
|
||||
await this.doOperate()
|
||||
}
|
||||
@@ -1122,6 +1227,9 @@ module.exports = {
|
||||
v.athletesMaxNum = this.checkedEventInfo[0].athletesMaxNum
|
||||
v.restrictRegNumber = this.checkedEventInfo[0].restrictRegNumber
|
||||
}
|
||||
if (this.form.applyWay.includes(1)) {
|
||||
v.isTeamSignUp = this.checkedEventInfo[0].isTeamSignUp
|
||||
}
|
||||
if (v.ageDate && v.ageDate.length > 0) {
|
||||
v.startAgeDate = v.ageDate[0]
|
||||
v.endAgeDate = v.ageDate[1]
|
||||
@@ -1268,8 +1376,18 @@ module.exports = {
|
||||
{ label: "女", value: "女" }
|
||||
]
|
||||
},
|
||||
{ label: "在职状态", value: "userState", type: "select", options: userStateOptions },
|
||||
{ label: "人员类型", value: "personType", type: "select", options: personTypeOptions }
|
||||
{
|
||||
label: "在职状态",
|
||||
value: "userState",
|
||||
type: "select",
|
||||
options: userStateOptions
|
||||
},
|
||||
{
|
||||
label: "人员类型",
|
||||
value: "personType",
|
||||
type: "select",
|
||||
options: personTypeOptions
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -118,6 +118,7 @@ module.exports = {
|
||||
{prop: 'status', label: '状态', sortable: true},
|
||||
// {prop: 'awardsMode', label: '项目类型'},
|
||||
{prop: 'allName', label: '报名项目'},
|
||||
{prop: 'applyUserName', label: '报名人'},
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
@@ -27,61 +27,240 @@ layout("/mobile/platform.html"){
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder></van-nav-bar>
|
||||
<van-nav-bar :title="title"
|
||||
@click-left="pjaxReplace('/mobile/activity/Sports/list/activityList')" fixed
|
||||
left-arrow
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<!-- <van-dropdown-item v-model="pageForm.isMenWomen" @change="yearChange"
|
||||
:options="sexList"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="yearChange" :options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item :options="eventList" @change="yearChange" v-model="pageForm.eventId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange" v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="yearChange"
|
||||
:options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item :options="eventList" @change="yearChange"
|
||||
v-model="pageForm.eventId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange"
|
||||
v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" v-model="loading" @load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image
|
||||
class="register-icon"
|
||||
src="/assets/mobile/svg/activity/wbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply==0&&o.applyWay.includes(1)"
|
||||
></image>
|
||||
<image
|
||||
class="register-icon"
|
||||
src="/assets/mobile/svg/activity/qxbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"
|
||||
></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis" style="font-size: 16px">{{o.allName}}</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="您报队伍">{{o.activityTeamName?o.activityTeamName:'暂无'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<div style="margin: 40px auto 0 auto">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
mode="closeable"
|
||||
text="自己报名的项目如要修改请点击取消报名后再重新报名,若其他人帮助报名则联系报名人取消!"
|
||||
></van-notice-bar>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-model="loading" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
|
||||
<van-row>
|
||||
<van-col span="24" class="username">
|
||||
{{ o.allName }}
|
||||
<div v-if="o.status"
|
||||
style="display: flex;justify-content: flex-end">
|
||||
<span v-if="o.status===1">待审核</span>
|
||||
<span v-if="o.status===2">已成功报名</span>
|
||||
<span v-if="o.status===3">审核不通过</span>
|
||||
</div>
|
||||
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<!-- <van-row class="info" style="margin-top: 8px">
|
||||
<van-col span="24">
|
||||
<span>项目类型:</span>
|
||||
<span>{{ o.projectType == 1 ? '单项' : '团体' }}</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
|
||||
<!-- <van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>您报队伍:</span>
|
||||
<span>{{ o.activityTeamName ? o.activityTeamName : '暂无' }}</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
|
||||
<!-- <van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>年龄限制:</span>
|
||||
<span v-if="o.startAgeDate!=null">{{ o.startAgeDate }}至{{ o.endAgeDate }}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
<van-row class="info" v-if="o.restrictBoyNum>0">
|
||||
<van-col span="24">
|
||||
<span>最少报男运动员:</span>
|
||||
<span>
|
||||
{{o.restrictBoyNum}}人</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row class="info" v-if="o.restrictGirlNum>0">
|
||||
<van-col span="24">
|
||||
<span>最少报女运动员:</span>
|
||||
<span>
|
||||
{{o.restrictGirlNum}}人</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" v-if="o.projectType==2">
|
||||
<van-col span="24">
|
||||
<van-cell title="可报队数:">
|
||||
{{ o.restrictTotalTeam }}队
|
||||
</van-cell>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" v-if="o.athletesMaxNum<=1999">
|
||||
<van-col span="24">
|
||||
<span>每队可报人数:</span>
|
||||
<span v-if="o.athletesMaxNum">{{ o.athletesMaxNum }}人</span>
|
||||
<span v-else-if="o.applyType===1">{{
|
||||
o.athletesMaxNum * o.restrictTotalTeam
|
||||
}}人</span>
|
||||
<span v-else-if="o.applyType===2&&o.eveProjectType==='1'">{{
|
||||
o.athletesMaxNum
|
||||
}}人</span>
|
||||
<span
|
||||
v-else-if="o.applyType===2&&o.eveProjectType==='2'">{{
|
||||
(o.restrictGirlNum ? o.restrictGirlNum : 0) + (o.restrictBoyNum ? o.restrictBoyNum : 0)
|
||||
}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="可报队数" v-if="o.projectType==2">{{o.restrictTotalTeam}}队</van-cell>
|
||||
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="成功报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<span>已报名总人数:</span>
|
||||
<span
|
||||
v-if="o.successUserApply>0&&o.applyType!==3">{{ o.successUserApply }}人</span>
|
||||
<span v-else-if="JSON.parse(o.applyWay).length===2&&o.applyWay.includes(1)">{{
|
||||
o.totalApplyNum
|
||||
}}人</span>
|
||||
<span
|
||||
v-else-if="o.totalApplyNum>0&&o.applyType===3">{{ o.totalApplyNum }}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info" v-if="JSON.parse(o.applyWay).length===2&&JSON.parse(o.applyWay).includes(1)">
|
||||
<van-col span="24">
|
||||
<span>已报名人员:</span>
|
||||
<span v-if="o.userApplyNames" style="color: #0e78c5"
|
||||
@click="openApplyUser(o)">{{
|
||||
o.userApplyNames
|
||||
}}</span>
|
||||
<span v-else>未报名</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row class="info">
|
||||
<van-col span="24">
|
||||
<div class="register-icon">
|
||||
<img v-if="o.userApply==0&&o.applyWay.includes(1)"
|
||||
@click="openActivity(o)"
|
||||
src="/assets/mobile/svg/activity/wbm.svg" />
|
||||
<img v-if="o.userApply>0&&o.applyWay.includes(1)"
|
||||
@click="openActivity(o)"
|
||||
src="/assets/mobile/svg/activity/qxbm.svg" />
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="teamSignUpShow" :close-on-click-overlay="false"
|
||||
:style="{ height: '100%',width:'100%' ,'overflow-y':'visible'}"
|
||||
:title="isView?'查看报名信息':'组队报名'">
|
||||
<div class="van-card-header">
|
||||
本人信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly
|
||||
v-model="userName"></van-field>
|
||||
<van-field label="工号" readonly
|
||||
v-model="loginName"></van-field>
|
||||
<van-field label="性别" readonly v-model="sex"></van-field>
|
||||
<van-field label="所在单位" readonly
|
||||
v-model="unitName"></van-field>
|
||||
<van-field label="所属工会" readonly
|
||||
v-model="unionName"></van-field>
|
||||
</div>
|
||||
|
||||
<template
|
||||
v-for="(item,index) in registerList.filter(v=>v.loginName !== loginName)">
|
||||
<div class="van-card-header">
|
||||
队友信息{{ index + 1 }}
|
||||
<span style="color:red;" @click="removeRegUser(item)" v-if="!isView">删除</span>
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="item.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="item.loginName"></van-field>
|
||||
<van-field label="性别" readonly v-model="item.sex"></van-field>
|
||||
<van-field label="所在单位" readonly v-model="item.unitName"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="item.unionName"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div
|
||||
v-if="registerList.filter(v=>v.loginName !== loginName).length === 0">
|
||||
<div style="padding: 10px 10px;text-align: center;color: #9b9999;">
|
||||
暂无队友信息,请点击添加队友按钮
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
||||
<van-button @click="openUserActionSheet" style="border-radius: 10px" block
|
||||
type="info">
|
||||
添加队友
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
||||
<van-button @click="doTeamSignUp()" style="border-radius: 10px" block
|
||||
type="info">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-action-sheet v-model="userActionSheet" title="选择人员" class="userActionPopup">
|
||||
<van-search v-model="searchKey" @search="onSearchUser" show-action
|
||||
placeholder="请输入姓名或者工号搜索">
|
||||
<template #action>
|
||||
<div @click="onSearchUser">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
|
||||
<div class="van-action-sheet__content mt5 user-select-sheet"
|
||||
v-if="searchUserList && searchUserList.length>0">
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
<template v-if="!searchLoading">
|
||||
<template v-for="item in searchUserList"
|
||||
v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item">
|
||||
<span class="van-action-sheet__name"
|
||||
style="display: flex;flex-direction: column">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
{{ item.userName }}-{{ item.loginName }}-{{item.sex}}
|
||||
</div>
|
||||
<div>
|
||||
{{ item.unitName }}
|
||||
</div>
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty v-else image="search" description="请输入姓名或者工号搜索"></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-dialog
|
||||
@confirm="doActivityConfirm"
|
||||
show-cancel-button
|
||||
@@ -103,7 +282,8 @@ layout("/mobile/platform.html"){
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -112,13 +292,18 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
formData: {
|
||||
teamId: null,
|
||||
teamName: null,
|
||||
activityId: "",
|
||||
eventId: ""
|
||||
},
|
||||
title: "",
|
||||
title: "活动报名",
|
||||
projectType: "",
|
||||
applyType: "",
|
||||
activityDialog: false,
|
||||
@@ -150,10 +335,192 @@ layout("/mobile/platform.html"){
|
||||
pageForm: {
|
||||
year: "",
|
||||
isMenWomen: "1"
|
||||
}
|
||||
},
|
||||
teamSignUpShow: false,
|
||||
registerList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: "",
|
||||
searchUserList: [],
|
||||
searchLoading: false,
|
||||
addRegisterList: [],
|
||||
isView: false,
|
||||
activityData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openApplyUser(item) {
|
||||
this.isView = true
|
||||
this.formData.activityId = item.activityId
|
||||
const resp = await this.selectRegisterList()
|
||||
|
||||
if (resp) {
|
||||
const selfInfo = resp.find(v => v.id === "${@shiro.getPrincipalProperty('id')}" && v.eventId === item.eventId)
|
||||
if (selfInfo) {
|
||||
this.registerList = resp.filter(v => v.eventId == item.eventId && v.applyUser === selfInfo.applyUser)
|
||||
}
|
||||
this.teamSignUpShow = true
|
||||
}
|
||||
},
|
||||
async selectRegisterList() {
|
||||
const resp = await $.get("/mobile/activity/Sports/list/selectRegisterList", {
|
||||
activityId: this.formData.activityId
|
||||
})
|
||||
return resp.data
|
||||
|
||||
},
|
||||
async doTeamSignUp() {
|
||||
// if (this.registerList.length !== 2) {
|
||||
// this.$dialog.alert({
|
||||
// title: '温馨提示',
|
||||
// message: '此活动是组队模式只需一位队友!',
|
||||
// }).then(() => {
|
||||
//
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(v => v.eventId === this.formData.eventId)
|
||||
|
||||
if (restrictBoyNum > 0) {
|
||||
if (this.registerList.filter(v => v.sex === "男").length !== restrictBoyNum) {
|
||||
this.$dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: "男运动员需要报名" + restrictBoyNum + "人才能提交!"
|
||||
}).then(() => {
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
if (restrictGirlNum > 0) {
|
||||
if (this.registerList.filter(v => v.sex === "女").length !== restrictGirlNum) {
|
||||
this.$dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: "女运动员需要报名" + restrictGirlNum + "人才能提交!"
|
||||
}).then(() => {
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.addRegisterList = await this.selectRegisterList()
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.registerList.forEach(r => {
|
||||
const num = this.addRegisterList.filter(a => Number(a.id) === r.id).length
|
||||
if (num === this.formData.restrictRegNumber) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
this.$dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: "【" + arr.toString() + "】已达到限报数量,您无法添加其组队!"
|
||||
}).then(() => {
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.$modal.confirm("您确定要提交吗?").then(async () => {
|
||||
if (this.formData.teamId) {
|
||||
this.$set(this.formData, "teamName", this.teams.find(v => v.id === this.formData.teamId).name)
|
||||
}
|
||||
const userIds = this.registerList.map(v => v.id)
|
||||
await $.post("/mobile/activity/Sports/list/doTeamSignUp", {
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
teamId: this.formData.teamId,
|
||||
teamName: this.formData.teamName,
|
||||
userIds: JSON.stringify(userIds)
|
||||
})
|
||||
await this.onRefresh()
|
||||
this.teamSignUpShow = false
|
||||
this.$modal.msgSuccess("报名成功")
|
||||
})
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(v => v.eventId === this.formData.eventId)
|
||||
const nanRegisterList = this.registerList.filter(v => v.sex === "男").map(r => r.sex)
|
||||
const nvRegisterList = this.registerList.filter(v => v.sex === "女").map(r => r.sex)
|
||||
|
||||
if (restrictBoyNum > 0 && nanRegisterList.length === restrictBoyNum && item.sex === "男") {
|
||||
this.$dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: "男教师报名人数已满"
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (restrictGirlNum > 0 && nvRegisterList.length === restrictGirlNum && item.sex === "女") {
|
||||
this.$dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: "女教师报名人数已满"
|
||||
}).then(() => {
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.registerList.push(item)
|
||||
this.searchKey = null
|
||||
this.$modal.msgSuccess("添加成功")
|
||||
},
|
||||
async onSearchUser() {
|
||||
if (this.searchKey) {
|
||||
this.searchLoading = true
|
||||
const resp = await $.post("/mobile/activity/Sports/list/searchNoRegisterUser", {
|
||||
activityId: this.formData.activityId,
|
||||
isTeamSignUp: this.formData.isTeamSignUp,
|
||||
isMenWomen: this.formData.isMenWomen,
|
||||
eventId: this.formData.eventId,
|
||||
searchKey: this.searchKey
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
} else {
|
||||
this.searchUserList = []
|
||||
}
|
||||
},
|
||||
removeRegUser(item) {
|
||||
if ("${@shiro.getPrincipalProperty('id')}" === item.id) {
|
||||
this.$toast.fail("因为是组队报名,自己不能删除")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确认要删除吗?"
|
||||
}).then(() => {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ""
|
||||
this.searchUserList = []
|
||||
this.onSearchUser()
|
||||
this.userActionSheet = true
|
||||
},
|
||||
|
||||
|
||||
onBeforeClose(action, done) {
|
||||
return done(false)
|
||||
},
|
||||
@@ -171,16 +538,6 @@ layout("/mobile/platform.html"){
|
||||
const nv = data.filter((v) => v.sex === "女")
|
||||
const nan = data.filter((v) => v.sex === "男")
|
||||
let title = this.projectType === 1 ? "项目" : "小队"
|
||||
/* if (this.applyType !== 3) {
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '男' && nan.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '女' && nv.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
if (this.athletesMaxNum && data.length >= this.athletesMaxNum) {
|
||||
this.$toast("该" + title + "人员已报满!")
|
||||
return
|
||||
@@ -193,8 +550,12 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
this.isView = false
|
||||
let {
|
||||
isManGirlNum,
|
||||
successUserApply,
|
||||
applyUser,
|
||||
applyWay,
|
||||
isTeamSignUp,
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
@@ -208,67 +569,91 @@ layout("/mobile/platform.html"){
|
||||
this.projectType = projectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.eventId = eventId
|
||||
this.formData.isTeamSignUp = isTeamSignUp
|
||||
this.applyType = applyType
|
||||
this.isManGirlNum = isManGirlNum
|
||||
|
||||
const res = await $.get("/mobile/activity/Sports/list/getScopeUser", { activityGroupId: activityGroupId })
|
||||
if (res.data == 0) {
|
||||
this.$toast("您不在报名人员内!")
|
||||
const isExist = await getScopeUser(activityGroupId)
|
||||
if (!isExist) {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提示",
|
||||
message: "您不在报名范围中",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('unit').getUnionid()}" == "") {
|
||||
this.$toast("您的工会信息有误,无法报名,请联系工会管理员!")
|
||||
return
|
||||
}
|
||||
|
||||
/*if ((isInterest && "${@shiro.hasRole('H04')}" === 'false') || (isInterest && "${@shiro.hasRole('sysadmin')}" === 'false')) {
|
||||
this.$toast("您所报的是趣味运动,请联系工会管理员报名!")
|
||||
if (successUserApply !== 0 && JSON.parse(applyWay).length === 2) {
|
||||
this.$modal.msg("分工会审核已通过,自己暂不能取消。请联系分工会负责人取消!")
|
||||
return
|
||||
}*/
|
||||
if (userApply == 1) {
|
||||
}
|
||||
if (userApply !== 0) {
|
||||
if (applyUser && applyUser !== "${@shiro.getPrincipalProperty('id')}") {
|
||||
this.$modal.msg("请联系报名人取消")
|
||||
return
|
||||
}
|
||||
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "确定取消此次报名吗?"
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
$.post("/mobile/activity/Sports/list/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.onRefresh()
|
||||
this.teamSignUpShow = false
|
||||
this.$modal.msgSuccess("取消成功")
|
||||
} else {
|
||||
this.$modal.msgError(resp.msg)
|
||||
}
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
this.events = []
|
||||
const data = await $.get("/platform/activity/apply/getEvents", { activityId: activityId })
|
||||
this.events = data
|
||||
const { athletesMaxNum, startAgeDate, endAgeDate, isMenWomen, restrictBoyNum, restrictGirlNum } = this.events.find(
|
||||
(v) => v.id == eventId
|
||||
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(
|
||||
(v) => v.id === eventId
|
||||
)
|
||||
if (isMenWomen) {
|
||||
this.restrictBoyNum = athletesMaxNum
|
||||
this.restrictGirlNum = athletesMaxNum
|
||||
if (projectType === "2") {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
} else {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
}
|
||||
} else {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
}
|
||||
this.athletesMaxNum = athletesMaxNum
|
||||
if (projectType == 1) {
|
||||
if (isMenWomen != null && isMenWomen === 1 && "${@shiro.getPrincipalProperty('sex')}" != "男") {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
//如果是单项项目
|
||||
if (projectType === "1") {
|
||||
if (this.restrictBoyNum <= 0 && this.sex === "男") {
|
||||
this.$toast("此项目男性老师没有名额!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen === 2 && "${@shiro.getPrincipalProperty('sex')}" != "女") {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
if (this.restrictGirlNum <= 0 && this.sex === "女") {
|
||||
this.$toast("此项目女性老师没有名额!")
|
||||
return
|
||||
}
|
||||
if (restrictRegNumber > 0) {
|
||||
const { data } = await $.post("/platform/activity/apply/getActivityData", { activityId })
|
||||
const userApplyNum = data.filter((v) => v.userId == "${@shiro.getPrincipalProperty('id')}").length
|
||||
if (userApplyNum >= restrictRegNumber) {
|
||||
this.$toast("单项项目,每人限报" + restrictRegNumber + "个!团体项目除外")
|
||||
this.$toast("当前项目,每人限报" + restrictRegNumber + "个!")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -303,6 +688,23 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
//如果是组队报名
|
||||
if (isTeamSignUp) {
|
||||
this.formData.isMenWomen = isMenWomen
|
||||
if (this.registerList.length === 0) {
|
||||
this.registerList.push({
|
||||
id: "${@shiro.getPrincipalProperty('id')}",
|
||||
loginName: this.loginName,
|
||||
userName: this.userName,
|
||||
sex: this.sex
|
||||
})
|
||||
}
|
||||
this.teamSignUpShow = true
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != "男") {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
@@ -314,7 +716,7 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
}
|
||||
|
||||
if (projectType == 2) {
|
||||
if (projectType === "2") {
|
||||
const { data } = await $.get("/platform/activity/apply/getActivityTeamId", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
@@ -333,7 +735,7 @@ layout("/mobile/platform.html"){
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
|
||||
const { data } = await $.get("/platform/activity/apply/pageData", this.pageForm)
|
||||
const { data } = await $.get("/mobile/activity/Sports/list/pageData", this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
@@ -352,6 +754,7 @@ layout("/mobile/platform.html"){
|
||||
this.pageForm.activityId = id
|
||||
this.pageForm.applyType = applyType
|
||||
const data = await $.post("/platform/activity/apply/getEvents", { activityId: id })
|
||||
this.events = data
|
||||
data.forEach((v) => {
|
||||
this.eventList.push({ value: v.eventId, text: v.allName })
|
||||
})
|
||||
@@ -364,6 +767,88 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.info {
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info span:nth-of-type(1) {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
color: #0e78c5;
|
||||
}
|
||||
|
||||
.register-icon {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.teamCell .van-cell__value {
|
||||
color: #323233;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.user-select-sheet {
|
||||
height: calc(100% - 54px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
@@ -18,35 +18,43 @@ layout("/mobile/platform.html"){
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList" @change="getActivityData"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList" @change="getActivityData"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.applyEndTime,o.applyType)">
|
||||
<div v-for="o in tableData" class="list-card"
|
||||
@click="openInfo(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px" :style="{color:themeColor}">{{o.NAME}}</span>
|
||||
<span class="van-ellipsis" style="font-size: 16px"
|
||||
:style="{color:themeColor}">{{o.NAME}}</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动地址">{{o.address}}</van-cell>
|
||||
<van-cell :border="false" title="报名时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至 {{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
<van-cell :border="false" title="报名开始时间">
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至 {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
<van-cell :border="false" title="报名结束时间">
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</van-cell>
|
||||
<!-- <van-cell :border="false" title="活动时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至 {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</van-cell>-->
|
||||
<van-cell :border="false" title="活动状态">
|
||||
<van-tag type="warning" v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">未开始</van-tag>
|
||||
<van-tag type="warning"
|
||||
v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">未开始
|
||||
</van-tag>
|
||||
<van-tag
|
||||
type="primary"
|
||||
v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||
@@ -59,14 +67,48 @@ layout("/mobile/platform.html"){
|
||||
>
|
||||
进行中
|
||||
</van-tag>
|
||||
<van-tag type="danger" v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">活动结束</van-tag>
|
||||
<van-tag type="danger"
|
||||
v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">活动结束
|
||||
</van-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据"></van-empty>
|
||||
|
||||
<van-action-sheet v-model="show" title="活动通知">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">运动员资格</div>
|
||||
</div>
|
||||
<div v-html="activityInfo.athleteQualification" style="padding: 0 30px;"></div>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">报名方法</div>
|
||||
</div>
|
||||
<div v-html="activityInfo.registrationMethod" style="padding: 0 30px;"></div>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">竞赛方法</div>
|
||||
</div>
|
||||
<div v-html="activityInfo.competitionMethod" style="padding: 0 30px;"></div>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">奖励方法</div>
|
||||
</div>
|
||||
<div v-html="activityInfo.rewardMethod" style="padding: 0 30px;"></div>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">注意事项</div>
|
||||
</div>
|
||||
<div v-html="activityInfo.precautions" style="padding: 0 30px;"></div>
|
||||
|
||||
<van-button type="primary" block @click="openApply"
|
||||
style="position: fixed; bottom: 0; ">进入报名
|
||||
</van-button>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -84,8 +126,10 @@ layout("/mobile/platform.html"){
|
||||
],
|
||||
pageForm: {
|
||||
year: "",
|
||||
isActivity: "1"
|
||||
}
|
||||
isActivity: 2
|
||||
},
|
||||
activityInfo: {},
|
||||
show: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -101,18 +145,24 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
this.tableData = data
|
||||
},
|
||||
openInfo(id, applyEndTime, applyType) {
|
||||
openApply() {
|
||||
const { applyEndTime, id, applyType } = this.activityInfo
|
||||
if (moment(applyEndTime).valueOf() < moment().valueOf()) {
|
||||
this.$toast("活动已结束,暂不能报名")
|
||||
return
|
||||
}
|
||||
window.location.href = "/mobile/activity/Sports/list/activityEventList?id=" + id + "&applyType=" + applyType
|
||||
pjaxReplace("/mobile/activity/Sports/list/activityEventList?id=" + id + "&applyType=" + applyType)
|
||||
},
|
||||
openInfo(data) {
|
||||
this.activityInfo = data
|
||||
this.show = true
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.$set(this.pageForm, "isActivity", 1)
|
||||
this.$set(this.pageForm, "isActivity", 2)
|
||||
await this.getActivityData()
|
||||
this.mLoading = false
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,8 @@ layout("/layouts/platform.html"){
|
||||
style="width: 100%"
|
||||
@change="changeLevel"
|
||||
>
|
||||
<el-option v-for="item in activityTypeList" :key="item.code" :label="item.name" :value="item.code"></el-option>
|
||||
<el-option v-for="item in activityTypeList" :key="item.code"
|
||||
:label="item.name" :value="item.code"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,13 +69,18 @@ layout("/layouts/platform.html"){
|
||||
placeholder="请选择活动"
|
||||
@change="getData()"
|
||||
>
|
||||
<el-option v-for="item in activities" :label="item.name" :value="item.id"></el-option>
|
||||
<el-option v-for="item in activities" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label" v-if="pageForm.activityLevel!=='40003'">基层工会</div>
|
||||
<div class="search-item-label" v-if="pageForm.activityLevel==='40003'">协会名称</div>
|
||||
<div class="search-item-label" v-if="pageForm.activityLevel!=='40003'">
|
||||
基层工会
|
||||
</div>
|
||||
<div class="search-item-label" v-if="pageForm.activityLevel==='40003'">
|
||||
协会名称
|
||||
</div>
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
style="width: 100%; font-weight: bold"
|
||||
@@ -85,7 +91,8 @@ layout("/layouts/platform.html"){
|
||||
@change="changeVVV"
|
||||
@clear="changeVVV"
|
||||
>
|
||||
<el-option v-for="item in unions" :key="item.id" :label="item.unionname" :value="item.id"></el-option>
|
||||
<el-option v-for="item in unions" :key="item.id"
|
||||
:label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,8 +102,10 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">报名状态</div>
|
||||
<div class="search-item-option">
|
||||
<el-radio-group v-model="pageForm.applyed">
|
||||
<el-radio style="background-color: white" label="1" border>未报名</el-radio>
|
||||
<el-radio style="background-color: white" label="2" border>已报名</el-radio>
|
||||
<el-radio style="background-color: white" label="1" border>未报名
|
||||
</el-radio>
|
||||
<el-radio style="background-color: white" label="2" border>已报名
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,25 +142,31 @@ layout("/layouts/platform.html"){
|
||||
</el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="[]" size="mini" v-if="noneData||tabLoading" v-loading="tabLoading"></el-table>
|
||||
<el-table :data="[]" size="mini" v-if="noneData||tabLoading"
|
||||
v-loading="tabLoading"></el-table>
|
||||
|
||||
<el-card v-else class="box-card mb10" v-for="app,tabIdx in apply" shadow="hover" v-loading="tabLoading">
|
||||
<el-card v-else class="box-card mb10" v-for="app,tabIdx in apply" shadow="hover"
|
||||
v-loading="tabLoading">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="2">{{tabIdx + 1}}</el-col>
|
||||
<el-col :span="4">{{pageForm.year}}</el-col>
|
||||
<el-col :span="6">{{isDisPlayCode?'('+app.unioncode+')':null}}{{app.unionname}}</el-col>
|
||||
<el-col :span="6">
|
||||
{{isDisPlayCode?'('+app.unioncode+')':null}}{{app.unionname}}
|
||||
</el-col>
|
||||
<el-col :span="6">{{pageForm.activityName || '暂无'}}</el-col>
|
||||
<el-col :span="2">{{app.num |money}} 人</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button style="float: right; padding: 3px 5px" @click="$set(app,'show',!app.show)" type="text">
|
||||
<el-button style="float: right; padding: 3px 5px"
|
||||
@click="$set(app,'show',!app.show)" type="text">
|
||||
{{app.show?'折叠':'展开'}}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div v-show="app.show" class="text item transition-box" style="padding: 20px 20px">
|
||||
<div v-show="app.show" class="text item transition-box"
|
||||
style="padding: 20px 20px">
|
||||
<el-timeline v-if="pageForm.applyType===1||pageForm.applyType===3">
|
||||
<!-- <el-timeline-item timestamp="领队信息" placement="top" v-if="app.leader.username!=null">
|
||||
<el-card shadow="never">
|
||||
@@ -225,7 +240,8 @@ layout("/layouts/platform.html"){
|
||||
</el-timeline-item>-->
|
||||
|
||||
<el-timeline-item timestamp="运动员信息" placement="top">
|
||||
<el-table border stripe :data="app.apply2" size="mini" :key="tableKey">
|
||||
<el-table border stripe :data="app.apply2" size="mini"
|
||||
:key="tableKey">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
@@ -248,7 +264,8 @@ layout("/layouts/platform.html"){
|
||||
<span v-if="row.team">{{ row.team }}</span>
|
||||
<span v-if="!row.team">暂无</span>
|
||||
</template>
|
||||
<template scope="{row:{projectType}}" v-else-if="column.prop=='projectType'">
|
||||
<template scope="{row:{projectType}}"
|
||||
v-else-if="column.prop=='projectType'">
|
||||
{{projectType==1?'单项':'团体'}}
|
||||
</template>
|
||||
|
||||
@@ -258,12 +275,23 @@ layout("/layouts/platform.html"){
|
||||
<span v-else class="text-danger">否</span>
|
||||
</template>-->
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='identity'">
|
||||
<el-tag v-if="row.identity.includes(1)" effect="light">运动员</el-tag>
|
||||
<el-tag v-if="row.identity.includes(2)" type="success" effect="light">教练</el-tag>
|
||||
<el-tag v-if="row.identity.includes(3)" type="warning" effect="light">领队</el-tag>
|
||||
<el-tag v-if="row.identity.includes(4)" type="warning" effect="light">处级领导</el-tag>
|
||||
<el-tag v-if="row.identity.includes(5)" type="warning" effect="light">替补</el-tag>
|
||||
<template scope="{row}"
|
||||
v-else-if="column.prop=='identity'">
|
||||
<el-tag v-if="row.identity.includes(1)"
|
||||
effect="light">运动员
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(2)"
|
||||
type="success" effect="light">教练
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(3)"
|
||||
type="warning" effect="light">领队
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(4)"
|
||||
type="warning" effect="light">处级领导
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(5)"
|
||||
type="warning" effect="light">替补
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -271,93 +299,141 @@ layout("/layouts/platform.html"){
|
||||
</el-timeline>
|
||||
|
||||
<el-timeline v-else-if="pageForm.applyType===2">
|
||||
<el-timeline-item timestamp="领队信息" placement="top" v-if="app.leader.username!=null">
|
||||
<el-timeline-item timestamp="领队信息" placement="top"
|
||||
v-if="app.leader.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-suffix=":" label-position="right" label-width="80px" style="margin-top: 30px">
|
||||
<el-form label-suffix=":" label-position="right"
|
||||
label-width="80px" style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">{{ app.leader.username | str }}</el-form-item>
|
||||
<el-form-item label="姓名">{{
|
||||
app.leader.username | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">{{ app.leader.sex | str }}</el-form-item>
|
||||
<el-form-item label="性别">{{ app.leader.sex |
|
||||
str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">{{ app.leader.loginname | str }}</el-form-item>
|
||||
<el-form-item label="工号">{{
|
||||
app.leader.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">{{ app.leader.mobile | str }}</el-form-item>
|
||||
<el-form-item label="电话">{{ app.leader.mobile
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">{{ app.leader.unitname | str }}</el-form-item>
|
||||
<el-form-item label="单位">{{
|
||||
app.leader.unitname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="教练信息" placement="top" v-if="app.coach.username!=null">
|
||||
<el-timeline-item timestamp="教练信息" placement="top"
|
||||
v-if="app.coach.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-suffix=":" label-position="right" label-width="80px" style="margin-top: 30px">
|
||||
<el-form label-suffix=":" label-position="right"
|
||||
label-width="80px" style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">{{ app.coach.username | str }}</el-form-item>
|
||||
<el-form-item label="姓名">{{ app.coach.username
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">{{ app.coach.sex | str }}</el-form-item>
|
||||
<el-form-item label="性别">{{ app.coach.sex |
|
||||
str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">{{ app.coach.loginname | str }}</el-form-item>
|
||||
<el-form-item label="工号">{{
|
||||
app.coach.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">{{ app.coach.mobile | str }}</el-form-item>
|
||||
<el-form-item label="电话">{{ app.coach.mobile |
|
||||
str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">{{ app.coach.unitname | str }}</el-form-item>
|
||||
<el-form-item label="单位">{{ app.coach.unitname
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="团长信息" placement="top" v-if="app.head.username!=null">
|
||||
<el-timeline-item timestamp="团长信息" placement="top"
|
||||
v-if="app.head.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-suffix=":" label-position="right" label-width="80px" style="margin-top: 30px">
|
||||
<el-form label-suffix=":" label-position="right"
|
||||
label-width="80px" style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">{{ app.head.username | str }}</el-form-item>
|
||||
<el-form-item label="姓名">{{ app.head.username
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">{{ app.head.sex | str }}</el-form-item>
|
||||
<el-form-item label="性别">{{ app.head.sex | str
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">{{ app.head.loginname | str }}</el-form-item>
|
||||
<el-form-item label="工号">{{ app.head.loginname
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">{{ app.head.mobile | str }}</el-form-item>
|
||||
<el-form-item label="电话">{{ app.head.mobile |
|
||||
str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">{{ app.head.unitname | str }}</el-form-item>
|
||||
<el-form-item label="单位">{{ app.head.unitname
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="工作人员信息" placement="top" v-if="app.staff.username!=null">
|
||||
<el-timeline-item timestamp="工作人员信息" placement="top"
|
||||
v-if="app.staff.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-suffix=":" label-position="right" label-width="80px" style="margin-top: 30px">
|
||||
<el-form label-suffix=":" label-position="right"
|
||||
label-width="80px" style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">{{ app.staff.username | str }}</el-form-item>
|
||||
<el-form-item label="姓名">{{ app.staff.username
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">{{ app.staff.sex | str }}</el-form-item>
|
||||
<el-form-item label="性别">{{ app.staff.sex |
|
||||
str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">{{ app.staff.loginname | str }}</el-form-item>
|
||||
<el-form-item label="工号">{{
|
||||
app.staff.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">{{ app.staff.mobile | str }}</el-form-item>
|
||||
<el-form-item label="电话">{{ app.staff.mobile |
|
||||
str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">{{ app.staff.unitname | str }}</el-form-item>
|
||||
<el-form-item label="单位">{{ app.staff.unitname
|
||||
| str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -411,7 +487,8 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table border stripe :data="app.apply2" size="mini" :key="tableKey">
|
||||
<el-table border stripe :data="app.apply2" size="mini"
|
||||
:key="tableKey">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
@@ -442,16 +519,28 @@ layout("/layouts/platform.html"){
|
||||
<span v-else class="text-danger">否</span>
|
||||
</template>-->
|
||||
|
||||
<template scope="{row:{projectType}}" v-else-if="column.prop=='projectType'">
|
||||
<template scope="{row:{projectType}}"
|
||||
v-else-if="column.prop=='projectType'">
|
||||
{{projectType==1?'单项':'团体'}}
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='identity'">
|
||||
<el-tag v-if="row.identity.includes(1)" effect="light">运动员</el-tag>
|
||||
<el-tag v-if="row.identity.includes(2)" type="success" effect="light">教练</el-tag>
|
||||
<el-tag v-if="row.identity.includes(3)" type="warning" effect="light">领队</el-tag>
|
||||
<el-tag v-if="row.identity.includes(4)" type="warning" effect="light">处级领导</el-tag>
|
||||
<el-tag v-if="row.identity.includes(5)" type="warning" effect="light">替补</el-tag>
|
||||
<template scope="{row}"
|
||||
v-else-if="column.prop=='identity'">
|
||||
<el-tag v-if="row.identity.includes(1)"
|
||||
effect="light">运动员
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(2)"
|
||||
type="success" effect="light">教练
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(3)"
|
||||
type="warning" effect="light">领队
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(4)"
|
||||
type="warning" effect="light">处级领导
|
||||
</el-tag>
|
||||
<el-tag v-if="row.identity.includes(5)"
|
||||
type="warning" effect="light">替补
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -494,7 +583,9 @@ layout("/layouts/platform.html"){
|
||||
name="file"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button icon="el-icon-upload" size="medium" style="width: 200px" type="">选择文件</el-button>
|
||||
<el-button icon="el-icon-upload" size="medium" style="width: 200px" type="">
|
||||
选择文件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -517,7 +608,11 @@ layout("/layouts/platform.html"){
|
||||
importLoading: false,
|
||||
importVisible: false,
|
||||
events: [],
|
||||
activityTypeList: [],
|
||||
activityTypeList: [
|
||||
{ name: "校级", code: 40001 },
|
||||
{ name: "基层工会", code: 40002 },
|
||||
{ name: "社团或协会", code: 40003 }
|
||||
],
|
||||
noneData: true,
|
||||
tabLoading: true,
|
||||
activities: [],
|
||||
@@ -527,6 +622,7 @@ layout("/layouts/platform.html"){
|
||||
rootData: [],
|
||||
tableKey: "",
|
||||
pageForm: {
|
||||
activityLevel: 40001,
|
||||
id: "",
|
||||
unionid: "",
|
||||
year: new Date().getFullYear() + ""
|
||||
@@ -541,7 +637,8 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "unitname", label: "单位", sortable: true },
|
||||
{ prop: "mobile", label: "电话" },
|
||||
{ prop: "projectType", label: "项目类型", sortable: true },
|
||||
{ prop: "identity", label: "身份", sortable: true, width: "300px" }
|
||||
{ prop: "identity", label: "身份", sortable: true, width: "300px" },
|
||||
{ prop: "applyUserName", label: "报名人" }
|
||||
],
|
||||
projectTypeList: [
|
||||
{ id: "1", name: "单项" },
|
||||
@@ -819,8 +916,6 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async created() {
|
||||
await this.changeActivit()
|
||||
this.activityTypeList = await this.getActivityTypeList("40000")
|
||||
this.$set(this.pageForm, "activityLevel", this.activityTypeList[0].code)
|
||||
await this.getNearActivity()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user