Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.budwk.app.sys.controller;
|
package com.budwk.app.sys.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -77,9 +78,7 @@ public class SysLoginController {
|
|||||||
@At("/noPermission")
|
@At("/noPermission")
|
||||||
@Ok("beetl:/platform/sys/noPermission.html")
|
@Ok("beetl:/platform/sys/noPermission.html")
|
||||||
@Filters
|
@Filters
|
||||||
public void noPermission() {
|
public void noPermission() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@At("/doLogin")
|
@At("/doLogin")
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
@@ -141,44 +140,23 @@ public class SysLoginController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("re")
|
||||||
|
@SaCheckLogin
|
||||||
|
@ApiOperation("小程序桥接界面")
|
||||||
|
public String weAppLogin() {
|
||||||
|
return "beetl:/platform/zhghh5/sys/weappcheck/index.html";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
@ApiOperation("小程序账号密码登录")
|
@ApiOperation("登录信息")
|
||||||
public Result weAppLogin(@Param("username") String username, @Param("password") String password, HttpServletRequest req) {
|
@SaCheckLogin
|
||||||
if (StrUtil.isBlank(username)) {
|
public Result getWeAppToken(){
|
||||||
return Result.error("用户名不能为空");
|
|
||||||
}
|
|
||||||
if (StrUtil.isBlank(password)) {
|
|
||||||
return Result.error("密码不能为空");
|
|
||||||
}
|
|
||||||
|
|
||||||
String lockKey = RedisConstant.USER_LOGIN_LOCK_PREFIX + username;
|
|
||||||
int errCount = Convert.toInt(StrUtil.blankToDefault(redisService.get(lockKey), "0"));
|
|
||||||
log.info("用户名:" + username + "登录失败次数:" + errCount);
|
|
||||||
|
|
||||||
if (errCount > 5) {
|
|
||||||
redisService.setex(lockKey, 5 * 60, String.valueOf(errCount + 1));
|
|
||||||
return Result.error("登录失败次数过多,请5分钟后再试");
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
Sys_user user = sysUserService.loginByIdCardLastNum(username, password);
|
|
||||||
if (user == null) {
|
|
||||||
throw new BaseException("用户登录失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
sysUserService.loginPlus(user, LoginType.WE_APP, req);
|
|
||||||
// redisService.del(lockKey);
|
|
||||||
return Result.success("login.success").addData(StpUtil.getTokenInfo());
|
return Result.success("login.success").addData(StpUtil.getTokenInfo());
|
||||||
} catch (Exception e) {
|
|
||||||
log.error(e.getMessage(), e);
|
|
||||||
redisService.set(lockKey, Convert.toStr(errCount + 1));
|
|
||||||
return Result.error(e.getMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@At(value = "/platform/wxwork/oauth2/callback", top = true)
|
@At(value = "/platform/wxwork/oauth2/callback", top = true)
|
||||||
@Ok("re")
|
@Ok("re")
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
|||||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||||
// throw new BaseException("用户名或者密码不正确");
|
throw new BaseException("用户名或者密码不正确");
|
||||||
}
|
}
|
||||||
user = this.fetchLinks(user, "unit");
|
user = this.fetchLinks(user, "unit");
|
||||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||||
|
|||||||
+3
-1
@@ -320,7 +320,9 @@ public class ActivityBasicScopeController {
|
|||||||
|
|
||||||
if (activityUserScopePageParam.getActivityGroupId() != null) {
|
if (activityUserScopePageParam.getActivityGroupId() != null) {
|
||||||
Sql sqlx = Sqls.createf("SELECT userId FROM activity_user_scope where groupId = '%s'", activityUserScopePageParam.getActivityGroupId());
|
Sql sqlx = Sqls.createf("SELECT userId FROM activity_user_scope where groupId = '%s'", activityUserScopePageParam.getActivityGroupId());
|
||||||
cnd.and("u.id", activityUserScopePageParam.getReverseSelection() ? "IN" : "NOT IN", sqlx);
|
List<NutMap> userList = baseService.listMap(sqlx);
|
||||||
|
List<String> userIds = userList.stream().map(v -> v.getString("userId")).toList();
|
||||||
|
cnd.and("u.id", activityUserScopePageParam.getReverseSelection() ? "IN" : "NOT IN", userIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
cnd.andEX("u.id", IN_OR_NIN_OP, activityUserScopePageParam.getUserId());
|
cnd.andEX("u.id", IN_OR_NIN_OP, activityUserScopePageParam.getUserId());
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ public class QsvSurveyServiceImpl extends BaseServiceImpl<QsvUserAnswerRecord> i
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 查询用户答题记录
|
// 查询用户答题记录
|
||||||
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where(QsvUserAnswerRecord::getActivityId, "=", activityId));
|
List<QsvUserAnswerRecord> answerRecords = dao().query(QsvUserAnswerRecord.class, Cnd.where(QsvUserAnswerRecord::getActivityId, "=", activityId).and("isFinish","=",1));
|
||||||
// 将答题记录的扩展JSON转换为JSONObject列表
|
// 将答题记录的扩展JSON转换为JSONObject列表
|
||||||
List<JSONObject> answerExtList = answerRecords.stream().map(QsvUserAnswerRecord::getExtJson).toList();
|
List<JSONObject> answerExtList = answerRecords.stream().map(QsvUserAnswerRecord::getExtJson).toList();
|
||||||
|
|
||||||
|
|||||||
@@ -88,11 +88,23 @@ public class ActivitySchoolEvent extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.INT, width = 8)
|
@ColDefine(type = ColType.INT, width = 8)
|
||||||
private Integer leanderNum;
|
private Integer leanderNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("领队是否必须是运动员")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
|
private Boolean leanderIsAthlete;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("组合方式2:教练人数")
|
@Comment("组合方式2:教练人数")
|
||||||
@ColDefine(type = ColType.INT, width = 8)
|
@ColDefine(type = ColType.INT, width = 8)
|
||||||
private Integer coachNum;
|
private Integer coachNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("教练是否必须是运动员")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
|
private Boolean coachIsAthlete;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("组合方式2:女队人数")
|
@Comment("组合方式2:女队人数")
|
||||||
@ColDefine(type = ColType.INT, width = 8)
|
@ColDefine(type = ColType.INT, width = 8)
|
||||||
|
|||||||
+3
-3
@@ -104,7 +104,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
|||||||
|
|
||||||
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
|
||||||
RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_WENTI_WY.name())) {
|
||||||
// cnd.where().andLike("school.applyWay ", "1");
|
// 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(SecurityUtil.getUserId())));
|
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
|||||||
|
|
||||||
//查询报名中
|
//查询报名中
|
||||||
if (isActivity == 2) {
|
if (isActivity == 2) {
|
||||||
cnd.and(new Static("now() >applyStartTime and now() < applyEndTime"));
|
cnd.and(new Static("(now() >applyStartTime and now() < applyEndTime) or now() <applyStartTime"));
|
||||||
}//查询已结束的
|
}//查询已结束的
|
||||||
else if (isActivity == 3) {
|
else if (isActivity == 3) {
|
||||||
cnd.and(new Static("now() > school.applyEndTime"));
|
cnd.and(new Static("now() > school.applyEndTime"));
|
||||||
@@ -182,7 +182,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
|
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
|
||||||
RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_WENTI_WY.name())) {
|
||||||
// cnd.and(new Static("JSON_CONTAINS(school.applyWay,JSON_ARRAY( 1))>0"));
|
// cnd.and(new Static("JSON_CONTAINS(school.applyWay,JSON_ARRAY( 1))>0"));
|
||||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
|
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -233,7 +233,7 @@ public class MTrainSignUpActivityController {
|
|||||||
.and("state", "!=", 2));
|
.and("state", "!=", 2));
|
||||||
int hasRegisterNum = signUpUsers.size() + 1;//+1是算自己
|
int hasRegisterNum = signUpUsers.size() + 1;//+1是算自己
|
||||||
if(hasRegisterNum > course.getCoursePeopleNumber()) {
|
if(hasRegisterNum > course.getCoursePeopleNumber()) {
|
||||||
return Result.error(3, "您当前的报名为候补报名状态");
|
return Result.error(99, "您当前的报名为候补报名状态");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|||||||
+7
-2
@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
|||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
@@ -139,6 +140,7 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
u.unitName,
|
u.unitName,
|
||||||
u.unionName,
|
u.unionName,
|
||||||
u.sex,
|
u.sex,
|
||||||
|
u.personType,
|
||||||
if(ts.mobile is null, u.mobile, ts.mobile) as mobile,
|
if(ts.mobile is null, u.mobile, ts.mobile) as mobile,
|
||||||
u.birthday,
|
u.birthday,
|
||||||
tsc.courseName,
|
tsc.courseName,
|
||||||
@@ -150,7 +152,7 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
left join train_sign_up_course tsc on tsc.id = ts.courseId
|
left join train_sign_up_course tsc on tsc.id = ts.courseId
|
||||||
WHERE
|
WHERE
|
||||||
ts.activityId = @activityId
|
ts.activityId = @activityId
|
||||||
ORDER BY FIELD( ts.state, 1, 3, 2, 4 ),u.unionid desc, u.unitid desc
|
ORDER BY FIELD( ts.state, 1, 3, 2, 4 ),u.unionid desc, u.unitid desc,ts.signUpTime asc
|
||||||
""").setParam("activityId", activityId);
|
""").setParam("activityId", activityId);
|
||||||
List<NutMap> userList = trainSignUpActivityManageService.listMap(sql);
|
List<NutMap> userList = trainSignUpActivityManageService.listMap(sql);
|
||||||
userList.forEach(item -> {
|
userList.forEach(item -> {
|
||||||
@@ -163,6 +165,8 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
} else if (item.getInt("state") == 4) {
|
} else if (item.getInt("state") == 4) {
|
||||||
item.setv("stateName", "无效报名(缺席)");
|
item.setv("stateName", "无效报名(缺席)");
|
||||||
}
|
}
|
||||||
|
item.setv("birthday", DateUtil.format(item.getTime("birthday"),"yyyy-MM-dd"));
|
||||||
|
item.setv("signUpTime", DateUtil.format(item.getTime("signUpTime"),"yyyy-MM-dd HH:mm:ss"));
|
||||||
});
|
});
|
||||||
|
|
||||||
List<ExcelExportEntity> excelCommonExportEntity = new ArrayList<>();
|
List<ExcelExportEntity> excelCommonExportEntity = new ArrayList<>();
|
||||||
@@ -172,8 +176,9 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
excelCommonExportEntity.add(new ExcelExportEntity("分工会", "unionName", 20));
|
excelCommonExportEntity.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||||
excelCommonExportEntity.add(new ExcelExportEntity("性别", "sex", 20));
|
excelCommonExportEntity.add(new ExcelExportEntity("性别", "sex", 20));
|
||||||
excelCommonExportEntity.add(new ExcelExportEntity("手机号", "mobile", 20));
|
excelCommonExportEntity.add(new ExcelExportEntity("手机号", "mobile", 20));
|
||||||
excelCommonExportEntity.add(new ExcelExportEntity("生日", "birthday", 20));
|
excelCommonExportEntity.add(new ExcelExportEntity("教职工类别", "personType", 20));
|
||||||
excelCommonExportEntity.add(new ExcelExportEntity("报名状态", "stateName", 20));
|
excelCommonExportEntity.add(new ExcelExportEntity("报名状态", "stateName", 20));
|
||||||
|
excelCommonExportEntity.add(new ExcelExportEntity("报名时间", "signUpTime", 30));
|
||||||
|
|
||||||
List<TrainSignUpCourse> courseList = dao.query(TrainSignUpCourse.class, Cnd.where("activityId", "=", activityId));
|
List<TrainSignUpCourse> courseList = dao.query(TrainSignUpCourse.class, Cnd.where("activityId", "=", activityId));
|
||||||
Map<String, TrainSignUpCourse> courseMap = courseList.stream().collect(Collectors.toMap(o -> o.getId(), o -> o));
|
Map<String, TrainSignUpCourse> courseMap = courseList.stream().collect(Collectors.toMap(o -> o.getId(), o -> o));
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public class SysClub extends BaseModel {
|
|||||||
private List<JSONObject> establishReport;
|
private List<JSONObject> establishReport;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("章程草案")
|
@Comment("章程")
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
private List<JSONObject> rulesFile;
|
private List<JSONObject> rulesFile;
|
||||||
|
|
||||||
|
|||||||
+48
@@ -1,8 +1,16 @@
|
|||||||
package com.budwk.app.zhgh.staffmanage.member.controller.statistics;
|
package com.budwk.app.zhgh.staffmanage.member.controller.statistics;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberStatisticsService;
|
import com.budwk.app.zhgh.staffmanage.member.service.MemberStatisticsService;
|
||||||
|
import com.budwk.app.zhgh.user.singleTeacher.param.SingleTeacherPageForm;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -80,4 +88,44 @@ public class MemberSummaryController {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@SaCheckPermission("member.statistics.summary")
|
||||||
|
@ApiOperation("导出Excel")
|
||||||
|
public void exportExcel(@Param("queryId") String queryId, @Param("queryType") String queryType,
|
||||||
|
@Param("currentYear") Integer currentYear, HttpServletResponse response) {
|
||||||
|
if (currentYear == null) {
|
||||||
|
currentYear = DateUtil.thisYear();
|
||||||
|
}
|
||||||
|
List<NutMap> list = new ArrayList<>();
|
||||||
|
if ("fgh".equals(queryType)) {
|
||||||
|
list = memberStatisticsService.getUnionStatisticsData(queryId, currentYear);
|
||||||
|
} else {
|
||||||
|
list = memberStatisticsService.getUnitStatisticsData(queryId, currentYear);
|
||||||
|
}
|
||||||
|
|
||||||
|
NutMap totalMap = NutMap.NEW();
|
||||||
|
totalMap.put("单位名称", "合计");
|
||||||
|
totalMap.put("总人数", list.stream().mapToInt(v -> v.getInt("totalNumber", 0)).sum());
|
||||||
|
list.add(totalMap);
|
||||||
|
|
||||||
|
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||||
|
if ("fgh".equals(queryType)) {
|
||||||
|
entities.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||||
|
} else {
|
||||||
|
entities.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||||
|
entities.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||||
|
}
|
||||||
|
entities.add(new ExcelExportEntity("总人数", "totalNumber", 15));
|
||||||
|
|
||||||
|
try {
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list);
|
||||||
|
CommonDownloadUtil.download("会员人数统计.xlsx", workbook, response);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -362,6 +362,7 @@ public class MemberStatisticsServiceImpl extends BaseServiceImpl<Sys_user> imple
|
|||||||
un.id,
|
un.id,
|
||||||
un.unitcode AS unitCode,
|
un.unitcode AS unitCode,
|
||||||
un.`name` AS unitName,
|
un.`name` AS unitName,
|
||||||
|
uni.`name`AS unionName,
|
||||||
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) <= 40 $personCnd $yearCnd THEN 1 ELSE 0 END) AS smallForty,
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) <= 40 $personCnd $yearCnd THEN 1 ELSE 0 END) AS smallForty,
|
||||||
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) >= 41 AND TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) <= 50 $personCnd $yearCnd THEN 1 ELSE 0 END) AS smallFifty,
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) >= 41 AND TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) <= 50 $personCnd $yearCnd THEN 1 ELSE 0 END) AS smallFifty,
|
||||||
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) >= 51 AND TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) <= 55 $personCnd $yearCnd THEN 1 ELSE 0 END) AS smallFiftyFive,
|
SUM(CASE WHEN TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) >= 51 AND TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) <= 55 $personCnd $yearCnd THEN 1 ELSE 0 END) AS smallFiftyFive,
|
||||||
@@ -371,6 +372,7 @@ public class MemberStatisticsServiceImpl extends BaseServiceImpl<Sys_user> imple
|
|||||||
SUM(CASE WHEN sex = '女' $personCnd $yearCnd THEN 1 ELSE 0 END) AS femaleMember
|
SUM(CASE WHEN sex = '女' $personCnd $yearCnd THEN 1 ELSE 0 END) AS femaleMember
|
||||||
FROM
|
FROM
|
||||||
sys_unit un
|
sys_unit un
|
||||||
|
LEFT JOIN sys_union uni ON uni.id = un.unionId
|
||||||
JOIN $table u ON u.unitId = un.id AND u.member = 1
|
JOIN $table u ON u.unitId = un.id AND u.member = 1
|
||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
|
|||||||
@@ -107,11 +107,19 @@ public class WelfareListController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("welfare.list.mange")
|
||||||
|
@ApiOperation("导出收货地址")
|
||||||
|
@Ok("void")
|
||||||
|
public void exportAddress(WelfareListPageForm pageForm, HttpServletResponse response) {
|
||||||
|
welfareListService.exportAddress(pageForm, response);
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("welfare.list.mange")
|
@SaCheckPermission("welfare.list.mange")
|
||||||
@ApiOperation("导出")
|
@ApiOperation("导出")
|
||||||
@Ok("void")
|
@Ok("void")
|
||||||
public void exportXlsx(@Param("pageForm") WelfareListPageForm pageForm, HttpServletResponse response) {
|
public void exportXlsx(WelfareListPageForm pageForm, HttpServletResponse response) {
|
||||||
welfareListService.exportXlsx(pageForm, response);
|
welfareListService.exportXlsx(pageForm, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public class WelfareMineController {
|
|||||||
cnd.and("wp.isDisabled", "=", 0);
|
cnd.and("wp.isDisabled", "=", 0);
|
||||||
cnd.andEX("YEAR(wp.choiceTimeStart)", "=", year);
|
cnd.andEX("YEAR(wp.choiceTimeStart)", "=", year);
|
||||||
cnd.andEX("wl.userId", "=", SecurityUtil.getUserId());
|
cnd.andEX("wl.userId", "=", SecurityUtil.getUserId());
|
||||||
|
cnd.andEX("wp.isUnseal", "=", true);
|
||||||
cnd.desc("wp.choiceTimeStart");
|
cnd.desc("wp.choiceTimeStart");
|
||||||
cnd.groupBy("wl.id");
|
cnd.groupBy("wl.id");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
|
|||||||
+12
@@ -1,6 +1,7 @@
|
|||||||
package com.budwk.app.zhgh.welfare.controller;
|
package com.budwk.app.zhgh.welfare.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaMode;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
@@ -80,6 +81,7 @@ public class WelfareProjectMangeController {
|
|||||||
if (StrUtil.isNotBlank(project.getId())) {
|
if (StrUtil.isNotBlank(project.getId())) {
|
||||||
projectService.updateProject(project);
|
projectService.updateProject(project);
|
||||||
} else {
|
} else {
|
||||||
|
project.setIsUnseal(false);
|
||||||
projectService.saveProject(project);
|
projectService.saveProject(project);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@@ -146,4 +148,14 @@ public class WelfareProjectMangeController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("welfare.project.mange")
|
||||||
|
public Result welfareStatusChange(@Valid String id, @Valid Boolean isUnseal) {
|
||||||
|
projectService.update(Chain.make("isUnseal", isUnseal), Cnd.where("id", "=", id));
|
||||||
|
projectService.dao().update(WelfareProject.class,
|
||||||
|
Chain.make("isUnseal", isUnseal),
|
||||||
|
Cnd.where("id", "=", id));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public class WelfareUserSelectController {
|
|||||||
cnd.andEX("YEAR(wp.choiceTimeStart)", "in", year);
|
cnd.andEX("YEAR(wp.choiceTimeStart)", "in", year);
|
||||||
cnd.and("wp.isDisabled", "=", 0);
|
cnd.and("wp.isDisabled", "=", 0);
|
||||||
cnd.groupBy("wp.id");
|
cnd.groupBy("wp.id");
|
||||||
|
cnd.andEX("wp.isUnseal", "=", true);
|
||||||
cnd.desc("YEAR(wp.choiceTimeStart)");
|
cnd.desc("YEAR(wp.choiceTimeStart)");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = welfareProjectService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination pagination = welfareProjectService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
|||||||
@@ -74,6 +74,11 @@ public class WelfareProject extends BaseModel implements SysHomeConvert {
|
|||||||
@ColDefine(type = ColType.DATETIME)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
private Date choiceTimeEnd;
|
private Date choiceTimeEnd;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否开启")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean isUnseal;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("逾期补发结束时间")
|
@Comment("逾期补发结束时间")
|
||||||
@ColDefine(type = ColType.DATETIME)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@@ -55,4 +57,7 @@ public class WelfareListPageForm extends PageForm {
|
|||||||
@ApiModelProperty("在职状态")
|
@ApiModelProperty("在职状态")
|
||||||
private String[] userStates;
|
private String[] userStates;
|
||||||
|
|
||||||
|
@ApiModelProperty("导出的数据")
|
||||||
|
private List<Map<String, String>> columns;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,13 @@ public interface WelfareListService extends BaseService<WelfareList> {
|
|||||||
*/
|
*/
|
||||||
void addWelfareUser(WelfareFilterUserPageForm pageForm);
|
void addWelfareUser(WelfareFilterUserPageForm pageForm);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出收货地址
|
||||||
|
* @param pageForm
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void exportAddress(WelfareListPageForm pageForm, HttpServletResponse response);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出
|
* 导出
|
||||||
* @param pageForm
|
* @param pageForm
|
||||||
|
|||||||
+111
-15
@@ -553,6 +553,82 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
|||||||
dao().insert(welfareList);
|
dao().insert(welfareList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportAddress(WelfareListPageForm pageForm, HttpServletResponse response) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.*,
|
||||||
|
t2.loginname,
|
||||||
|
t2.username,
|
||||||
|
t2.sex,
|
||||||
|
DATE_FORMAT(t2.birthday, '%Y-%m-%d') AS birthday,
|
||||||
|
CONCAT('收货人:',t3.userName,' 电话:',t3.tel,' 详细地址:',t3.province, t3.city, t3.county, t3.addressDetail) AS address
|
||||||
|
FROM
|
||||||
|
`welfare_list` t1
|
||||||
|
LEFT JOIN sys_user t2 ON t2.id = t1.userId
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
userId,
|
||||||
|
userName,
|
||||||
|
tel,
|
||||||
|
province,
|
||||||
|
city,
|
||||||
|
county,
|
||||||
|
addressDetail,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY userId ORDER BY isDefault DESC, id) as rn
|
||||||
|
FROM welfare_member_address
|
||||||
|
) t3 ON t3.userId = t1.userId AND t3.rn = 1
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("t1.projectId", "=", pageForm.getProjectId());
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getUserName())) {
|
||||||
|
cnd.where().andLike("t2.username", pageForm.getUserName());
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getLoginName())) {
|
||||||
|
cnd.where().andLike("t2.loginname", pageForm.getLoginName());
|
||||||
|
}
|
||||||
|
cnd.andEX("t2.sex", "=", pageForm.getSex());
|
||||||
|
cnd.andEX("t2.birthday", "=", pageForm.getBirthday());
|
||||||
|
if (pageForm.getBirthMonths() != null && pageForm.getBirthMonths().length > 0) {
|
||||||
|
cnd.andEX("MONTH(t2.birthday)", "in", pageForm.getBirthMonths());
|
||||||
|
}
|
||||||
|
cnd.andEX("t1.welfareUnitId", "in", pageForm.getUnitIds());
|
||||||
|
cnd.andEX("t1.welfareUnionId", "=", pageForm.getUnionId());
|
||||||
|
cnd.andEX("t1.personType", "in", pageForm.getPersonTypes());
|
||||||
|
cnd.andEX("t1.preparedBy", "in", pageForm.getPreparedBys());
|
||||||
|
cnd.andEX("t1.userState", "in", pageForm.getUserStates());
|
||||||
|
|
||||||
|
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||||
|
cnd.asc("t1.welfareUnionName");
|
||||||
|
cnd.asc("t1.welfareUnitName");
|
||||||
|
} else {
|
||||||
|
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List<NutMap> list = listMap(sql);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Workbook workbook = null;
|
||||||
|
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
|
exportEntities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("收货地址", "address", 70));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属工会", "welfareUnionName", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属单位", "welfareUnitName", 30));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||||
|
|
||||||
|
|
||||||
|
CommonDownloadUtil.download("收货地址汇总.xlsx", workbook, response);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportXlsx(WelfareListPageForm pageForm, HttpServletResponse response) {
|
public void exportXlsx(WelfareListPageForm pageForm, HttpServletResponse response) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
@@ -596,26 +672,46 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
|
|||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = listMap(sql);
|
List<NutMap> list = listMap(sql);
|
||||||
|
|
||||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
try {
|
||||||
entities.add(new ExcelExportEntity("工号", "loginname", 20));
|
Workbook workbook = null;
|
||||||
entities.add(new ExcelExportEntity("姓名", "username", 20));
|
if (Lang.isNotEmpty(pageForm.getColumns())) {
|
||||||
entities.add(new ExcelExportEntity("性别", "sex", 20));
|
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
entities.add(new ExcelExportEntity("出生日期", "birthday", 20));
|
|
||||||
entities.add(new ExcelExportEntity("人员类型", "personType", 20));
|
|
||||||
entities.add(new ExcelExportEntity("聘用方式", "preparedBy", 20));
|
|
||||||
entities.add(new ExcelExportEntity("在职状态", "userState", 20));
|
|
||||||
entities.add(new ExcelExportEntity("所属工会", "welfareUnionName", 20));
|
|
||||||
entities.add(new ExcelExportEntity("所属单位", "welfareUnitName", 20));
|
|
||||||
entities.add(new ExcelExportEntity("备注", "remark", 20));
|
|
||||||
|
|
||||||
// 设置导出参数
|
pageForm.getColumns().forEach(column -> {
|
||||||
|
exportEntities.add(new ExcelExportEntity(column.get("label"), column.get("prop"), 20));
|
||||||
|
});
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
exportParams.setType(ExcelType.XSSF);
|
exportParams.setType(ExcelType.XSSF);
|
||||||
// 导出Excel并下载
|
|
||||||
try (Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, list)) {
|
workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||||
|
} else {
|
||||||
|
workbook = setHistoryExcelData(list);
|
||||||
|
}
|
||||||
|
|
||||||
CommonDownloadUtil.download("福利名单.xlsx", workbook, response);
|
CommonDownloadUtil.download("福利名单.xlsx", workbook, response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("导出Excel失败", e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Workbook setHistoryExcelData(List<NutMap> list) {
|
||||||
|
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
|
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("身份证号", "idCard", 30));
|
||||||
|
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("聘用方式", "preparedBy", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("人员类型", "personType", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属单位", "unitName", 30));
|
||||||
|
// exportEntities.add(new ExcelExportEntity("来校年月", "comeSchoolDate", 30));
|
||||||
|
// exportEntities.add(new ExcelExportEntity("所在科室", "threeUnitName", 20));
|
||||||
|
// exportEntities.add(new ExcelExportEntity("工会小组", "unionGroupName", 30));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
return ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,9 +77,11 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
|||||||
<!--如果是正常报名-->
|
<!--如果是正常报名-->
|
||||||
<template v-if="!activityTableData.isLeader">
|
<template v-if="!activityTableData.isLeader">
|
||||||
<div style="display: flex;margin: 20px 0;align-items: center;">
|
<div style="display: flex;margin: 20px 0;align-items: center;">
|
||||||
<el-divider content-position="left">每支队伍最多
|
<!-- 每支队伍最多
|
||||||
{{activityTableData.restrictMaxNum}}
|
{{activityTableData.restrictMaxNum}}
|
||||||
人,其中领队{{activityTableData.leanderNum}}人,
|
人,其中-->
|
||||||
|
<el-divider content-position="left">
|
||||||
|
报名人员限制:领队{{activityTableData.leanderNum}}人,
|
||||||
教练{{activityTableData.coachNum}}人,
|
教练{{activityTableData.coachNum}}人,
|
||||||
运动员必须设置{{activityTableData.athleteMaxNum}}人,
|
运动员必须设置{{activityTableData.athleteMaxNum}}人,
|
||||||
替补{{activityTableData.substituteNum}}人。
|
替补{{activityTableData.substituteNum}}人。
|
||||||
@@ -507,6 +509,8 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
|||||||
restrictGirlNum,
|
restrictGirlNum,
|
||||||
restrictBoyNum,
|
restrictBoyNum,
|
||||||
leanderNum,
|
leanderNum,
|
||||||
|
leanderIsAthlete,
|
||||||
|
coachIsAthlete,
|
||||||
coachNum,
|
coachNum,
|
||||||
deputyDirectorNum,
|
deputyDirectorNum,
|
||||||
substituteNum,
|
substituteNum,
|
||||||
@@ -542,6 +546,14 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
|||||||
message = teamName + "领队应设置" + leanderNum + "人"
|
message = teamName + "领队应设置" + leanderNum + "人"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
if (leanderNum > 0 && leanderIsAthlete) {
|
||||||
|
const num = teamApplyData[i].filter((v) => v.identity.includes("3") && !v.identity.includes("1")).length
|
||||||
|
if (num>0){
|
||||||
|
msgFlag = false
|
||||||
|
message = teamName + "领队必须是运动员!"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
//教练
|
//教练
|
||||||
const jlNum = teamApplyData[i].filter((v) => v.identity.includes("2")).length
|
const jlNum = teamApplyData[i].filter((v) => v.identity.includes("2")).length
|
||||||
if (coachNum > 0 && (jlNum > coachNum || jlNum === 0)) {
|
if (coachNum > 0 && (jlNum > coachNum || jlNum === 0)) {
|
||||||
@@ -549,6 +561,15 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
|||||||
message = teamName + "教练应设置" + coachNum + "人"
|
message = teamName + "教练应设置" + coachNum + "人"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
debugger
|
||||||
|
if (coachNum > 0 && coachIsAthlete) {
|
||||||
|
const num = teamApplyData[i].filter((v) => v.identity.includes("2") && !v.identity.includes("1")).length
|
||||||
|
if (num>0){
|
||||||
|
msgFlag = false
|
||||||
|
message = teamName + "教练必须是运动员!"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
//运动员
|
//运动员
|
||||||
const ydyNum = teamApplyData[i].filter((v) => v.identity.includes("1")).length
|
const ydyNum = teamApplyData[i].filter((v) => v.identity.includes("1")).length
|
||||||
if (athletesMaxNum > 0 && (ydyNum > athletesMaxNum || ydyNum < athletesMaxNum)) {
|
if (athletesMaxNum > 0 && (ydyNum > athletesMaxNum || ydyNum < athletesMaxNum)) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
|
|||||||
<search-item label="">
|
<search-item label="">
|
||||||
<el-radio-group @change="activityInfoData" v-model="pageForm.isActivity">
|
<el-radio-group @change="activityInfoData" v-model="pageForm.isActivity">
|
||||||
<el-radio-button :label="1">全部</el-radio-button>
|
<el-radio-button :label="1">全部</el-radio-button>
|
||||||
<el-radio-button :label="2">报名中</el-radio-button>
|
<el-radio-button :label="2">即将开始&报名中</el-radio-button>
|
||||||
<el-radio-button :label="3">已结束</el-radio-button>
|
<el-radio-button :label="3">已结束</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ let ACTIVITY_SPORTS_ADD_ACTIVITY = {
|
|||||||
<el-row :gutter="40">
|
<el-row :gutter="40">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="leanderNum" label="领队人数(可兼运动员)">
|
<el-form-item prop="leanderNum" label="领队人数(可兼运动员)">
|
||||||
|
<el-checkbox v-model="eventForm.leanderIsAthlete" v-if="eventForm.leanderNum>0">领队是否必须是运动员</el-checkbox>
|
||||||
<el-input-number style="width: 100%" v-model="eventForm.leanderNum"
|
<el-input-number style="width: 100%" v-model="eventForm.leanderNum"
|
||||||
placeholder="请填写领队人数" controls-position="right" :precision="0"
|
placeholder="请填写领队人数" controls-position="right" :precision="0"
|
||||||
:max="100000" :min="0"></el-input-number>
|
:max="100000" :min="0"></el-input-number>
|
||||||
@@ -314,6 +314,7 @@ let ACTIVITY_SPORTS_ADD_ACTIVITY = {
|
|||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="coachNum" label="教练人数(可兼运动员)">
|
<el-form-item prop="coachNum" label="教练人数(可兼运动员)">
|
||||||
|
<el-checkbox v-model="eventForm.coachIsAthlete" v-if="eventForm.coachNum>0">教练是否必须是运动员</el-checkbox>
|
||||||
<el-input-number style="width: 100%" v-model="eventForm.coachNum"
|
<el-input-number style="width: 100%" v-model="eventForm.coachNum"
|
||||||
placeholder="请填写教练人数" controls-position="right" :precision="0"
|
placeholder="请填写教练人数" controls-position="right" :precision="0"
|
||||||
:max="100000" :min="0"></el-input-number>
|
:max="100000" :min="0"></el-input-number>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #edit_func>
|
<template #edit_func>
|
||||||
<el-button @click="doSave" type="primary">保 存</el-button>
|
<!-- <el-button @click="doSave" type="primary">保 存</el-button>-->
|
||||||
<el-button @click="doOperate" type="primary">提 交</el-button>
|
<el-button @click="doOperate" type="primary">提 交</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #edit>
|
<template #edit>
|
||||||
|
|||||||
@@ -501,7 +501,7 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
this.$message.warning(res.msg)
|
this.$message.warning(res.msg)
|
||||||
if (res.code !== 3) {
|
if (res.code !== 99) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ layout("/layouts/platform.html"){
|
|||||||
registerUserTableColumns: [
|
registerUserTableColumns: [
|
||||||
{ label: "姓名", prop: "username" },
|
{ label: "姓名", prop: "username" },
|
||||||
{ label: "一卡通号", prop: "loginname" },
|
{ label: "一卡通号", prop: "loginname" },
|
||||||
{ label: "单位", prop: "unitName" },
|
{ label: "单位", prop: "unitname" },
|
||||||
{ label: "分工会", prop: "unionName" },
|
{ label: "分工会", prop: "unionname" },
|
||||||
{ label: "联系方式", prop: "mobile" },
|
{ label: "联系方式", prop: "mobile" },
|
||||||
{ label: "报名时间", prop: "signUpTime" },
|
{ label: "报名时间", prop: "signUpTime" },
|
||||||
{ label: "报名状态", prop: "state" }
|
{ label: "报名状态", prop: "state" }
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
<div class="text-left" v-html="viewData.introduce"></div>
|
<div class="text-left" v-html="viewData.introduce"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span="4">
|
<el-descriptions-item :span="4">
|
||||||
<template slot="label">活动形式</template>
|
<template slot="label">协会宗旨</template>
|
||||||
<div class="text-left" v-html="viewData.purpose"></div>
|
<div class="text-left" v-html="viewData.purpose"></div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span="2">
|
<el-descriptions-item :span="2">
|
||||||
@@ -39,7 +39,7 @@ const REGISTER_INFO_COMPONENT = {
|
|||||||
<file-preview :files="viewData.establishReport" complete_result></file-preview>
|
<file-preview :files="viewData.establishReport" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span="2">
|
<el-descriptions-item :span="2">
|
||||||
<template slot="label">章程草案</template>
|
<template slot="label">章程</template>
|
||||||
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
<file-preview :files="viewData.rulesFile" complete_result></file-preview>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span="2">
|
<el-descriptions-item :span="2">
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ const CLUB_FORM_TEMPLATE = {
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="协会介绍及宗旨" prop="introduce">
|
<el-form-item label="协会介绍" prop="introduce">
|
||||||
<text-editor v-model="formData.introduce"></text-editor>
|
<text-editor v-model="formData.introduce"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="活动形式" prop="purpose">
|
<el-form-item label="协会宗旨" prop="purpose">
|
||||||
<text-editor v-model="formData.purpose"></text-editor>
|
<text-editor v-model="formData.purpose"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ const CLUB_FORM_TEMPLATE = {
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="章程草案" prop="rulesFile">
|
<el-form-item label="章程" prop="rulesFile">
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="formData.rulesFile"
|
:value.sync="formData.rulesFile"
|
||||||
:upload_number="5"
|
:upload_number="5"
|
||||||
@@ -162,9 +162,10 @@ const CLUB_FORM_TEMPLATE = {
|
|||||||
clubCode: [{ required: false, message: "请填写协会编码", trigger: ["blur", "change"] }],
|
clubCode: [{ required: false, message: "请填写协会编码", trigger: ["blur", "change"] }],
|
||||||
clubType: [{ required: true, message: "请选择协会类型", trigger: ["blur", "change"] }],
|
clubType: [{ required: true, message: "请选择协会类型", trigger: ["blur", "change"] }],
|
||||||
concatPerson: [{ required: true, message: "请选择协会联系人", trigger: ["blur", "change"] }],
|
concatPerson: [{ required: true, message: "请选择协会联系人", trigger: ["blur", "change"] }],
|
||||||
foundTime: [{ required: true, message: "请选择成立时间", trigger: ["blur", "change"] }]
|
foundTime: [{ required: true, message: "请选择成立时间", trigger: ["blur", "change"] }],
|
||||||
|
due: [{ required: true, message: "请输入会费标准", trigger: ["blur", "change"] }],
|
||||||
// establishReport: [{ required: true, message: "请上传申请成立报告", trigger: ["blur", "change"] }]
|
// establishReport: [{ required: true, message: "请上传申请成立报告", trigger: ["blur", "change"] }]
|
||||||
//rulesFile: [{ required: true, message: "请上传章程草案", trigger: ["blur", "change"] }],
|
rulesFile: [{ required: true, message: "请上传章程", trigger: ["blur", "change"] }],
|
||||||
//manageFile: [{ required: true, message: "请上传经费来源及管理办法", trigger: ["blur", "change"] }],
|
//manageFile: [{ required: true, message: "请上传经费来源及管理办法", trigger: ["blur", "change"] }],
|
||||||
//yearPlanFile: [{ required: true, message: "请上传年度活动计划", trigger: ["blur", "change"] }]
|
//yearPlanFile: [{ required: true, message: "请上传年度活动计划", trigger: ["blur", "change"] }]
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-1
@@ -42,7 +42,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool label="会员统计"></table-tool>
|
<table-tool label="会员统计">
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-download" @click="exportExcel">导出</el-button>
|
||||||
|
</table-tool>
|
||||||
<el-table :data="tableData" show-summary>
|
<el-table :data="tableData" show-summary>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
@@ -90,6 +92,13 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
exportExcel() {
|
||||||
|
this.$downLoad("/platform/member/statistics/summary/exportExcel", {
|
||||||
|
queryId: this.pageForm.queryId,
|
||||||
|
queryType: this.pageForm.queryType,
|
||||||
|
currentYear: this.pageForm.currentYear
|
||||||
|
})
|
||||||
|
},
|
||||||
doExport() {},
|
doExport() {},
|
||||||
initData() {
|
initData() {
|
||||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||||
|
|||||||
@@ -106,8 +106,8 @@ layout("/layouts/platform.html"){
|
|||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
<!--#include("../../member/common/audit/memberAuditChangeInfo.js"){}#-->
|
<!--#include("../../member/change/common/memberAllChangeInfo.js"){}#-->
|
||||||
<!--#include("../../member/common/change/memberChangeInfo.js"){}#-->
|
<!--#include("../../member/change/common/memberChange.js"){}#-->
|
||||||
<!--#include("../../member/common/info/memberInfo.js"){}#-->
|
<!--#include("../../member/common/info/memberInfo.js"){}#-->
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
@@ -175,8 +175,8 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'member-audit-change-info': MEMBER_AUDIT_CHANGE_INFO,
|
'member-audit-change-info': MEMBER_ALL_CHANGE_INFO,
|
||||||
'member-change-info': MEMBER_CHANGE_INFO,
|
'member-change-info': MEMBER_CHANGE,
|
||||||
'member-info': MEMBER_INFO
|
'member-info': MEMBER_INFO
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -51,6 +51,14 @@ layout("/layouts/platform.html"){
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
|
<template scope="{row}" v-if="column.prop=='isUnseal'">
|
||||||
|
<el-switch
|
||||||
|
@change="(val)=>{welfareStatusChange(row.id,row.isUnseal)}"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
v-model="row.isUnseal">
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
<!-- <template scope="{row}" v-if="column.prop=='gift'">-->
|
<!-- <template scope="{row}" v-if="column.prop=='gift'">-->
|
||||||
<!-- <span v-if="row.flexible">福利套餐</span>-->
|
<!-- <span v-if="row.flexible">福利套餐</span>-->
|
||||||
<!-- <span v-else>{{row.gift}}</span>-->
|
<!-- <span v-else>{{row.gift}}</span>-->
|
||||||
@@ -261,7 +269,8 @@ layout("/layouts/platform.html"){
|
|||||||
{ prop: "year", label: "年度" },
|
{ prop: "year", label: "年度" },
|
||||||
{ prop: "name", label: "项目名称" },
|
{ prop: "name", label: "项目名称" },
|
||||||
{ prop: "choiceTimeStart", label: "开始选择时间" },
|
{ prop: "choiceTimeStart", label: "开始选择时间" },
|
||||||
{ prop: "choiceTimeEnd", label: "结束选择时间" }
|
{ prop: "choiceTimeEnd", label: "结束选择时间" },
|
||||||
|
{prop: "isUnseal", label: "是否开启"},
|
||||||
|
|
||||||
// { prop: "gift", label: "福利礼品" },
|
// { prop: "gift", label: "福利礼品" },
|
||||||
// { prop: "provideTimeStart", label: "发放时间" }
|
// { prop: "provideTimeStart", label: "发放时间" }
|
||||||
@@ -296,6 +305,19 @@ layout("/layouts/platform.html"){
|
|||||||
this.sendMsg(data)
|
this.sendMsg(data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async welfareStatusChange(id, isUnseal) {
|
||||||
|
|
||||||
|
const resp = await this.$axios.post("/platform/welfare/project/mange/welfareStatusChange", {
|
||||||
|
id: id,
|
||||||
|
isUnseal: isUnseal
|
||||||
|
})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.doSearch()
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
} else {
|
||||||
|
this.$message.error(resp.msg)
|
||||||
|
}
|
||||||
|
},
|
||||||
async save() {
|
async save() {
|
||||||
const formValid = await this.$refs["form"].validate()
|
const formValid = await this.$refs["form"].validate()
|
||||||
if (formValid) {
|
if (formValid) {
|
||||||
|
|||||||
@@ -130,6 +130,9 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool :app="this" label="福利名单">
|
<table-tool :app="this" label="福利名单">
|
||||||
|
<el-button :disabled="!pageForm.projectId" @click="exportAddress" icon="el-icon-download" size="small" type="primary">
|
||||||
|
导出收货地址
|
||||||
|
</el-button>
|
||||||
<el-button :disabled="!pageForm.projectId" @click="openExport" icon="el-icon-download" size="small" type="primary">
|
<el-button :disabled="!pageForm.projectId" @click="openExport" icon="el-icon-download" size="small" type="primary">
|
||||||
导出名单
|
导出名单
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -145,6 +148,38 @@ layout("/layouts/platform.html"){
|
|||||||
>
|
>
|
||||||
添加人员
|
添加人员
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
trigger="click"
|
||||||
|
width="200">
|
||||||
|
|
||||||
|
<div style="padding:4px 0;border-bottom:1px solid #eee;">
|
||||||
|
<el-button size="mini" @click="checkAll">全选</el-button>
|
||||||
|
<el-button size="mini" @click="invertCheck">反选</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="max-height:40vh;overflow-y:auto;padding:6px 0;">
|
||||||
|
<el-checkbox-group v-model="checkedFields">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="f in tableColumns"
|
||||||
|
:key="f.prop"
|
||||||
|
:label="f.prop"
|
||||||
|
style="display:block;margin:6px 0;">
|
||||||
|
{{ f.label }}
|
||||||
|
</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
slot="reference"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-s-operation"
|
||||||
|
size="small"
|
||||||
|
style="margin-left:12px;">
|
||||||
|
列设置
|
||||||
|
</el-button>
|
||||||
|
</el-popover>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
@@ -159,6 +194,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
v-if="checkedFields.includes(column.prop)"
|
||||||
:key="column.prop"
|
:key="column.prop"
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
@@ -241,8 +277,14 @@ layout("/layouts/platform.html"){
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
},
|
||||||
|
showColumns() {
|
||||||
|
return this.tableColumns.filter(c => this.checkedFields.includes(c.prop));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.checkedFields = this.tableColumns.filter(c => c.checked !== 0).map(c => c.prop);
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
add_welfare_list_by_select: ADD_WELFARE_LIST_BY_SELECT,
|
add_welfare_list_by_select: ADD_WELFARE_LIST_BY_SELECT,
|
||||||
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime()),
|
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime()),
|
||||||
@@ -251,6 +293,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
checkedFields: [],
|
||||||
pageForm: {
|
pageForm: {
|
||||||
searchName: "username",
|
searchName: "username",
|
||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
@@ -282,13 +325,26 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 导出收货地址
|
||||||
|
exportAddress() {
|
||||||
|
this.$downLoad("/platform/welfare/list/mange/exportAddress", this.pageForm)
|
||||||
|
},
|
||||||
// 导出名单
|
// 导出名单
|
||||||
openExport() {
|
openExport() {
|
||||||
this.$downLoad("/platform/welfare/list/mange/exportXlsx", {
|
const pageForm = clone(this.pageForm)
|
||||||
pageForm: JSON.stringify(this.pageForm)
|
const data = this.tableColumns.filter(item => this.checkedFields.includes(item.prop)).map(item => {
|
||||||
|
return {prop: item.prop, label: item.label}
|
||||||
})
|
})
|
||||||
|
pageForm.columns = JSON.stringify(data)
|
||||||
|
this.$downLoad("/platform/welfare/list/mange/exportXlsx", pageForm)
|
||||||
|
},
|
||||||
|
checkAll() {
|
||||||
|
this.checkedFields = this.tableColumns.map(c => c.prop);
|
||||||
|
},
|
||||||
|
invertCheck() {
|
||||||
|
const all = this.tableColumns.map(c => c.prop);
|
||||||
|
this.checkedFields = all.filter(p => !this.checkedFields.includes(p));
|
||||||
},
|
},
|
||||||
|
|
||||||
successImport() {
|
successImport() {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
this.importDialog = false
|
this.importDialog = false
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
],
|
],
|
||||||
stateList: [
|
stateList: [
|
||||||
{value: 1, text: "全部"},
|
{value: 1, text: "全部"},
|
||||||
{value: 2, text: "报名中"},
|
{value: 2, text: "即将开始&报名中"},
|
||||||
{value: 3, text: "报名已结束"}
|
{value: 3, text: "报名已结束"}
|
||||||
],
|
],
|
||||||
subLoading: false,
|
subLoading: false,
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<van-nav-bar title="活动详情" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
<van-nav-bar title="活动详情" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||||
|
|
||||||
<van-image height="186" src="/assets/mobile/img/trainSignUp/3quhtakfd4heeqsk6irqhft60p.png"></van-image>
|
<van-image height="186" :src="activity.cover"></van-image>
|
||||||
<div class="title">{{activity.activityName}}</div>
|
<div class="title">{{activity.activityName}}</div>
|
||||||
|
|
||||||
<van-tabs v-model:active="tabActive" shrink>
|
<van-tabs v-model:active="tabActive" shrink>
|
||||||
|
|||||||
+33
-17
@@ -147,16 +147,19 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<van-nav-bar :title="trainType + '列表'" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
<van-nav-bar :title="trainType + '列表'" @click-left="historyBack" left-arrow left-text="返回" placeholder
|
||||||
|
fixed></van-nav-bar>
|
||||||
|
|
||||||
<van-sticky>
|
<van-sticky>
|
||||||
<van-dropdown-menu>
|
<van-dropdown-menu>
|
||||||
<van-dropdown-item @change="tabChange" v-model="activityStatus" :options="activityOptions"></van-dropdown-item>
|
<van-dropdown-item @change="tabChange" v-model="activityStatus"
|
||||||
|
:options="activityOptions"></van-dropdown-item>
|
||||||
<van-dropdown-item @change="courseChange" v-model="courseType" :options="courseOptions"></van-dropdown-item>
|
<van-dropdown-item @change="courseChange" v-model="courseType" :options="courseOptions"></van-dropdown-item>
|
||||||
</van-dropdown-menu>
|
</van-dropdown-menu>
|
||||||
</van-sticky>
|
</van-sticky>
|
||||||
|
|
||||||
<van-tabs v-if="activityStatus != '1' && assortList.length > 0" v-model="assort" type="card" style="margin-top: 10px" @click="tabClick">
|
<van-tabs v-if="activityStatus != '1' && assortList.length > 0" v-model="assort" type="card"
|
||||||
|
style="margin-top: 10px" @click="tabClick">
|
||||||
<van-tab v-for="item in assortList" :key="item" :name="item" :title="item"></van-tab>
|
<van-tab v-for="item in assortList" :key="item" :name="item" :title="item"></van-tab>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
|
|
||||||
@@ -187,13 +190,16 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="train-title">活动时间:</span>
|
<span class="train-title">活动时间:</span>
|
||||||
<span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)" style="color: #1867b0">点我查看</span>
|
<span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)"
|
||||||
<span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1" style="color: #1867b0">
|
style="color: #1867b0">点我查看</span>
|
||||||
|
<span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1"
|
||||||
|
style="color: #1867b0">
|
||||||
{{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}
|
{{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span @click.stop="showPic(tableData.wechat)" v-if="o.isSign === true && tableData.wechat" style="color: #dd6363">
|
<span @click.stop="showPic(tableData.wechat)" v-if="o.isSign === true && tableData.wechat"
|
||||||
|
style="color: #dd6363">
|
||||||
点我查看微信群二维码
|
点我查看微信群二维码
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,11 +255,13 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<van-empty v-else image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"></van-empty>
|
<van-empty v-else image="/assets/platform/plugins/vant-green/images/nodata/nodata.png"
|
||||||
|
description="暂无数据"></van-empty>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<van-popup v-model:show="popupShow" class="popup">
|
<van-popup v-model:show="popupShow" class="popup">
|
||||||
<div id="map" v-if="course.isMobileSign === true && course.signType === 3" style="width: 100%; height: 250px"></div>
|
<div id="map" v-if="course.isMobileSign === true && course.signType === 3"
|
||||||
|
style="width: 100%; height: 250px"></div>
|
||||||
|
|
||||||
<van-card
|
<van-card
|
||||||
:title="item.courseStartTime.substring(0, 10) + '(' +
|
:title="item.courseStartTime.substring(0, 10) + '(' +
|
||||||
@@ -263,7 +271,9 @@ layout("/layouts/platform_h5.html"){
|
|||||||
thumb="/assets/mobile/svg/trainSignUp/qd1.svg"
|
thumb="/assets/mobile/svg/trainSignUp/qd1.svg"
|
||||||
>
|
>
|
||||||
<template #desc>
|
<template #desc>
|
||||||
<div style="margin-top: 7px">{{item.courseStartTime.substring(11, 19) + ' ~ ' + item.courseEndTime.substring(11, 19)}}</div>
|
<div style="margin-top: 7px">{{item.courseStartTime.substring(11, 19) + ' ~ ' +
|
||||||
|
item.courseEndTime.substring(11, 19)}}
|
||||||
|
</div>
|
||||||
<div v-if="item.courseLocationCoordinates && item.isMobileSign === true && activityStatus === '1'">
|
<div v-if="item.courseLocationCoordinates && item.isMobileSign === true && activityStatus === '1'">
|
||||||
<van-button
|
<van-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -317,7 +327,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</van-popup>
|
</van-popup>
|
||||||
|
|
||||||
<van-popup class="joinPopup" position="right" v-model:show="joinPopup">
|
<van-popup class="joinPopup" position="right" v-model:show="joinPopup">
|
||||||
<van-nav-bar @click-left="joinPopup = false" left-text="返回" fixed left-arrow placeholder title="活动报名"></van-nav-bar>
|
<van-nav-bar @click-left="joinPopup = false" left-text="返回" fixed left-arrow placeholder
|
||||||
|
title="活动报名"></van-nav-bar>
|
||||||
<div class="join_content">
|
<div class="join_content">
|
||||||
<van-form @submit="joinSubmit" :show-error-message="false">
|
<van-form @submit="joinSubmit" :show-error-message="false">
|
||||||
<div class="van-doc-card-two" style="margin: 0 0 16px 0">
|
<div class="van-doc-card-two" style="margin: 0 0 16px 0">
|
||||||
@@ -554,24 +565,25 @@ layout("/layouts/platform_h5.html"){
|
|||||||
await this.pageData()
|
await this.pageData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
async signUp(o) {
|
async signUp(o) {
|
||||||
this.choose = o
|
this.choose = o
|
||||||
|
|
||||||
const res = await this.$axios.post("/platform/mobile/trainSignUpActivity/validateSignUp", {
|
this.$axios.post("/platform/mobile/trainSignUpActivity/validateSignUp", {
|
||||||
courseId: o.id
|
courseId: o.id
|
||||||
})
|
}).then(async res => {
|
||||||
|
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
vant.Dialog.alert({
|
await vant.Dialog.alert({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
message: res.msg
|
message: res.msg
|
||||||
})
|
})
|
||||||
if (res.code !== 3) {
|
if (res.code !== 99) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formData = {
|
this.formData = {
|
||||||
userName: this.$store.state.user.username,
|
userName: this.$store.state.user.username,
|
||||||
loginName: this.$store.state.user.loginname,
|
loginName: this.$store.state.user.loginname,
|
||||||
@@ -590,6 +602,9 @@ layout("/layouts/platform_h5.html"){
|
|||||||
item.columnValue = ""
|
item.columnValue = ""
|
||||||
})
|
})
|
||||||
this.joinPopup = true
|
this.joinPopup = true
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async joinSubmit() {
|
async joinSubmit() {
|
||||||
let valid = false
|
let valid = false
|
||||||
@@ -647,7 +662,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
toast.clear()
|
toast.clear()
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
trainClick(o) {
|
trainClick(o) {
|
||||||
this.timeList = o.courseTimeList
|
this.timeList = o.courseTimeList
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform_h5.html"){
|
||||||
|
#-->
|
||||||
|
<div id="app">
|
||||||
|
{{ 登录成功,正在跳转小程序界面 }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
store,
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async handleLogin() {
|
||||||
|
try {
|
||||||
|
const res = await this.$axios.post('/platform/login/getWeAppToken');
|
||||||
|
if (res.code === 0) {
|
||||||
|
console.log("token获取成功,下一步关闭当前web-view")
|
||||||
|
if (window.wx?.miniProgram) {
|
||||||
|
console.log("小程序界面,正在关闭web-view")
|
||||||
|
// 发送登录成功 + 关闭指令
|
||||||
|
window.wx.miniProgram.postMessage({
|
||||||
|
data: {
|
||||||
|
type: 'login_success',
|
||||||
|
loginname: this.$store.state.user.loginname,
|
||||||
|
...res.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
wx.miniProgram.navigateTo({ url: '/pages/activity/index' });
|
||||||
|
}, 3000);
|
||||||
|
} else {
|
||||||
|
// 非小程序环境,跳转首页等
|
||||||
|
window.location.href = 'platform/home'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error('获取 token 失败');
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('请求异常', err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.handleLogin()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
Reference in New Issue
Block a user