Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -1,15 +1,18 @@
|
|||||||
package com.budwk.app.sys.controller;
|
package com.budwk.app.sys.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
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;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.sys.models.Sys_union_group;
|
import com.budwk.app.sys.models.Sys_union_group;
|
||||||
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.sys.services.SysUnionGroupService;
|
import com.budwk.app.sys.services.SysUnionGroupService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
@@ -55,7 +58,7 @@ public class SysUnionGroupController {
|
|||||||
@ApiOperation("删除工会小组")
|
@ApiOperation("删除工会小组")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Result delete(String id) {
|
public Result delete(String id) {
|
||||||
sysUnionGroupService.delete(id);
|
sysUnionGroupService.deleteById(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
@@ -31,6 +31,7 @@ import org.nutz.dao.util.cri.Static;
|
|||||||
import org.nutz.ioc.aop.Aop;
|
import org.nutz.ioc.aop.Aop;
|
||||||
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;
|
||||||
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
@@ -167,4 +168,24 @@ public class SysBranchUnionUserAuthorizationApprovalController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("sys.branch.union.authorization.approval.delete")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
@ApiOperation("校工会删除")
|
||||||
|
public Result deleteDo(@Valid String id, @Valid String processInstanceId) {
|
||||||
|
Sys_branch_union_user_permission userPermission = dao.fetch(Sys_branch_union_user_permission.class, id);
|
||||||
|
if (Lang.isEmpty(userPermission)) {
|
||||||
|
return Result.error("数据错误!");
|
||||||
|
}
|
||||||
|
// 移除角色
|
||||||
|
dao.clear(Sys_user_role.class, Cnd.where(Sys_user_role::getUserId, "=", userPermission.getUserId()).and(Sys_user_role::getUnionId, "=", userPermission.getUnionId())
|
||||||
|
.and(Sys_user_role::getRoleId, "=", userPermission.getRoleId()));
|
||||||
|
dao.delete(Sys_branch_union_user_permission.class, id);
|
||||||
|
bpmService.deleteInstance(processInstanceId);
|
||||||
|
|
||||||
|
sysUserService.clearCache();
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.budwk.app.web.controllers.open.commons;
|
|||||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
|
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||||
import com.budwk.app.sys.models.Sys_config;
|
import com.budwk.app.sys.models.Sys_config;
|
||||||
import com.budwk.app.sys.models.Sys_dict;
|
import com.budwk.app.sys.models.Sys_dict;
|
||||||
import com.budwk.app.sys.models.Sys_union;
|
import com.budwk.app.sys.models.Sys_union;
|
||||||
@@ -115,9 +117,21 @@ public class CommonController {
|
|||||||
@SaCheckLogin
|
@SaCheckLogin
|
||||||
@ApiOperation("协会列表")
|
@ApiOperation("协会列表")
|
||||||
public Result clubOptions(String clubId) {
|
public Result clubOptions(String clubId) {
|
||||||
List<SysClub> sysClubs = sysClubService.dao().query(SysClub.class,
|
Sql sql = Sqls.create("""
|
||||||
Cnd.NEW().andEX("id", "=", clubId));
|
SELECT
|
||||||
return Result.success(sysClubs);
|
c.*
|
||||||
|
FROM
|
||||||
|
`sys_club` c
|
||||||
|
LEFT JOIN bpm_process_instance inst ON inst.processInstanceBusinessId = c.id
|
||||||
|
$condition
|
||||||
|
""");
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX("c.id", "=", clubId);
|
||||||
|
cnd.andEX("inst.processInstanceStatus", "=", "COMPLETED");
|
||||||
|
cnd.andEX("inst.processInstanceNodeCode", "=", 80);
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
List list = sysClubService.listVO(sql, SysClub.class);
|
||||||
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
|||||||
+2
-4
@@ -87,12 +87,10 @@ public class FamilyActivityApplyController {
|
|||||||
cnd.andEX("`year`", "=", year);
|
cnd.andEX("`year`", "=", year);
|
||||||
//查询报名中
|
//查询报名中
|
||||||
if (activityType == 2) {
|
if (activityType == 2) {
|
||||||
cnd.and(new Static("now() > activitySignUpStartTime and now() < activitySignUpEndTime"));
|
cnd.and(new Static("now() < activitySignUpEndTime"));
|
||||||
}//查询已结束的
|
}//查询已结束的
|
||||||
else if (activityType == 3) {
|
else if (activityType == 3) {
|
||||||
cnd.and(new Static("now() > activityEndTime"));
|
cnd.and(new Static("now() >= activityEndTime"));
|
||||||
} else if (activityType == 4) {
|
|
||||||
cnd.and(new Static("now() < activitySignUpStartTime"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AuthUtil.hasRole("H04") && !AuthUtil.hasRoleOr("sysadmin, A06")) {
|
if (AuthUtil.hasRole("H04") && !AuthUtil.hasRoleOr("sysadmin, A06")) {
|
||||||
|
|||||||
+16
-3
@@ -7,6 +7,7 @@ import cn.hutool.json.JSONObject;
|
|||||||
import com.budwk.app.base.exception.BaseException;
|
import com.budwk.app.base.exception.BaseException;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
|
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
||||||
import com.budwk.app.zhgh.activity.qsv.dto.QsvCheckAnswerResult;
|
import com.budwk.app.zhgh.activity.qsv.dto.QsvCheckAnswerResult;
|
||||||
import com.budwk.app.zhgh.activity.qsv.models.QsvActivity;
|
import com.budwk.app.zhgh.activity.qsv.models.QsvActivity;
|
||||||
import com.budwk.app.zhgh.activity.qsv.models.QsvOption;
|
import com.budwk.app.zhgh.activity.qsv.models.QsvOption;
|
||||||
@@ -63,6 +64,12 @@ public class H5QsvQuizController {
|
|||||||
@ApiOperation("题目列表")
|
@ApiOperation("题目列表")
|
||||||
public Result subjects(@Valid String activityId) {
|
public Result subjects(@Valid String activityId) {
|
||||||
QsvActivity activity = dao.fetch(QsvActivity.class, activityId);
|
QsvActivity activity = dao.fetch(QsvActivity.class, activityId);
|
||||||
|
|
||||||
|
int count = dao.count(ActivityUserScope.class, Cnd.where("groupId", "=", activity.getGroupId()).and("userId", "=", SecurityUtil.getUserId()));
|
||||||
|
if (count != 1) {
|
||||||
|
return Result.error("您无需参加此次答题,感谢您的关注!");
|
||||||
|
}
|
||||||
|
|
||||||
String mode = activity.getMode();
|
String mode = activity.getMode();
|
||||||
//能否重复答题
|
//能否重复答题
|
||||||
Boolean repeatable = activity.getRepeatable();
|
Boolean repeatable = activity.getRepeatable();
|
||||||
@@ -72,6 +79,8 @@ public class H5QsvQuizController {
|
|||||||
Integer maxAttempts = activity.getMaxAttempts();
|
Integer maxAttempts = activity.getMaxAttempts();
|
||||||
//题目显示模式
|
//题目显示模式
|
||||||
String displayMode = activity.getDisplayMode();
|
String displayMode = activity.getDisplayMode();
|
||||||
|
// 重复答题,显示提示
|
||||||
|
Boolean repeatTips = false;
|
||||||
|
|
||||||
//最终返回的题目数据
|
//最终返回的题目数据
|
||||||
List<QsvSubject> resultSubjects = new ArrayList<>();
|
List<QsvSubject> resultSubjects = new ArrayList<>();
|
||||||
@@ -81,7 +90,7 @@ public class H5QsvQuizController {
|
|||||||
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(QsvUserAnswerRecord::getUserId, "=", SecurityUtil.getUserId()));
|
.and(QsvUserAnswerRecord::getUserId, "=", SecurityUtil.getUserId()));
|
||||||
|
|
||||||
if (activity.getEndTime().after(new Date())) {
|
if (activity.getEndTime().before(new Date())) {
|
||||||
//已结束 查询最新一次的答题记录
|
//已结束 查询最新一次的答题记录
|
||||||
Optional<QsvUserAnswerRecord> lastRecordOptional = answerRecords.stream().max(Comparator.comparing(QsvUserAnswerRecord::getAnswerTime));
|
Optional<QsvUserAnswerRecord> lastRecordOptional = answerRecords.stream().max(Comparator.comparing(QsvUserAnswerRecord::getAnswerTime));
|
||||||
if (lastRecordOptional.isPresent()) {
|
if (lastRecordOptional.isPresent()) {
|
||||||
@@ -91,7 +100,7 @@ public class H5QsvQuizController {
|
|||||||
cnd.and(new Static("1=1 ORDER BY FIELD (id," + dynamic + ")"));
|
cnd.and(new Static("1=1 ORDER BY FIELD (id," + dynamic + ")"));
|
||||||
resultSubjects = dao.query(QsvSubject.class, cnd);
|
resultSubjects = dao.query(QsvSubject.class, cnd);
|
||||||
answerRecordId = lastRecordOptional.get().getId();
|
answerRecordId = lastRecordOptional.get().getId();
|
||||||
}else{
|
} else {
|
||||||
//没生成过 那就看全部的题目
|
//没生成过 那就看全部的题目
|
||||||
List<QsvSubject> subjects = dao.query(QsvSubject.class, Cnd.where(QsvSubject::getActivityId, "=", activityId));
|
List<QsvSubject> subjects = dao.query(QsvSubject.class, Cnd.where(QsvSubject::getActivityId, "=", activityId));
|
||||||
QsvUserAnswerRecord answerRecord = qsvUserAnswerRecordService.insertRecord(activityId, subjects.stream().map(QsvSubject::getId).collect(Collectors.toList()));
|
QsvUserAnswerRecord answerRecord = qsvUserAnswerRecordService.insertRecord(activityId, subjects.stream().map(QsvSubject::getId).collect(Collectors.toList()));
|
||||||
@@ -148,6 +157,7 @@ public class H5QsvQuizController {
|
|||||||
String dynamic = subjectIds.stream().map(id -> "'" + id + "'").collect(Collectors.joining(","));
|
String dynamic = subjectIds.stream().map(id -> "'" + id + "'").collect(Collectors.joining(","));
|
||||||
cnd.and(new Static("1=1 ORDER BY FIELD (id," + dynamic + ")"));
|
cnd.and(new Static("1=1 ORDER BY FIELD (id," + dynamic + ")"));
|
||||||
resultSubjects = dao.query(QsvSubject.class, cnd);
|
resultSubjects = dao.query(QsvSubject.class, cnd);
|
||||||
|
repeatTips = true;
|
||||||
} else {
|
} else {
|
||||||
//已达到最大次数 返回最新一次记录
|
//已达到最大次数 返回最新一次记录
|
||||||
Optional<QsvUserAnswerRecord> maxAnswerRecordOptional = answerRecords.stream().max(Comparator.comparingLong(QsvUserAnswerRecord::getRandomNumber));
|
Optional<QsvUserAnswerRecord> maxAnswerRecordOptional = answerRecords.stream().max(Comparator.comparingLong(QsvUserAnswerRecord::getRandomNumber));
|
||||||
@@ -293,7 +303,10 @@ public class H5QsvQuizController {
|
|||||||
|
|
||||||
resultSubjects.forEach(v -> v.setUserSelectOptionIds(new ArrayList<>()));
|
resultSubjects.forEach(v -> v.setUserSelectOptionIds(new ArrayList<>()));
|
||||||
|
|
||||||
NutMap result = NutMap.NEW().addv("subjects", resultSubjects).addv("answerRecordId", answerRecordId).addv("activity", activity);
|
NutMap result = NutMap.NEW().addv("subjects", resultSubjects)
|
||||||
|
.addv("answerRecordId", answerRecordId)
|
||||||
|
.addv("activity", activity)
|
||||||
|
.addv("repeatTips", repeatTips);
|
||||||
return Result.success(result);
|
return Result.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
|||||||
(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 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
|
(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,
|
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) totalApplyNum,
|
(SELECT COUNT(1) FROM activity_school_apply WHERE eventId=ase.eventId AND activityId=ase.activityId and activityUnionId=@unionId and status=2) 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=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
|
(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
|
FROM
|
||||||
|
|||||||
+36
-35
@@ -334,44 +334,45 @@ public class ClubInfoManageController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("club.infoManage.manage")
|
@SaCheckPermission("club.infoManage.manage")
|
||||||
@ApiOperation("授权")
|
@ApiOperation("授权")
|
||||||
public Result doAuthRole(@Valid String userId, @Valid String clubId, @Param("roleCode") @Valid String[] roleCode) {
|
public Result doAuthRole(@Valid String id, @Valid String clubId, @Param("roleCode") @Valid String[] roleCodes) {
|
||||||
// 删除原来的身份
|
List<String> roleCodeList = Arrays.asList(roleCodes);
|
||||||
List<String> roleCodes = List.of(RoleConstant.CLUB_PRESIDENT.name(),
|
//查询社团是否存在会长或者秘书长
|
||||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_PRESIDENT.name())) {
|
||||||
RoleConstant.CLUB_SECRETARY.name(),
|
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||||
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_PRESIDENT.name()))));
|
||||||
RoleConstant.CLUB_OPERATOR.name(),
|
if (count > 0) {
|
||||||
RoleConstant.CLUB_MEMBER.name());
|
return Result.error("会长只能有一位");
|
||||||
for (String code : roleCodes) {
|
}
|
||||||
String roleId = sysRoleService.getByCode(code).getId();
|
}
|
||||||
dao.clear(Sys_user_role.class, Cnd.where(Sys_user_role::getUserId, "=", userId).and(Sys_user_role::getClubId, "=", clubId).and(Sys_user_role::getRoleId, "=", roleId));
|
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) {
|
||||||
}
|
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||||
|
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_SECRETARY.name()))));
|
||||||
// 新增身份
|
if (count > 0) {
|
||||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubId).and(ClubUser::getUserId, "=", userId));
|
return Result.error("秘书长只能有一位");
|
||||||
List<String> list = new ArrayList<>(Arrays.asList(roleCode));
|
}
|
||||||
if(list.isEmpty()) {
|
|
||||||
list.add(RoleConstant.CLUB_MEMBER.name());
|
|
||||||
} else {
|
|
||||||
list.remove(RoleConstant.CLUB_MEMBER.name());
|
|
||||||
}
|
}
|
||||||
clubUser.setRoleCode(list);
|
|
||||||
dao.update(clubUser,"roleCode");
|
|
||||||
|
|
||||||
// 新增权限
|
ClubUser clubUser = clubInfoManageService.dao().fetch(ClubUser.class, id);
|
||||||
for (String code : roleCode) {
|
|
||||||
Sys_role sysRole = sysRoleService.getByCode(code);
|
|
||||||
Sys_user_role userRole = new Sys_user_role();
|
|
||||||
userRole.setUserId(userId);
|
|
||||||
userRole.setRoleId(sysRole.getId());
|
|
||||||
userRole.setClubId(clubId);
|
|
||||||
dao.insert(userRole);
|
|
||||||
}
|
|
||||||
|
|
||||||
sysUserService.clearCache();
|
// 先清除所有的角色
|
||||||
sysRoleService.clearCache();
|
dao.clear(Sys_user_role.class, Cnd.where("userId", "=", clubUser.getUserId()).and("clubId", "=", clubUser.getClubId()));
|
||||||
|
// 再根据传过来的赋值
|
||||||
return Result.success();
|
clubUser.setRoleCode(roleCodeList);
|
||||||
|
dao.update(clubUser);
|
||||||
|
// 设置角色
|
||||||
|
List<Sys_user_role> roles = new ArrayList<>();
|
||||||
|
for (String s : roleCodeList) {
|
||||||
|
Sys_user_role ur = new Sys_user_role();
|
||||||
|
ur.setUserId(clubUser.getUserId());
|
||||||
|
ur.setClubId(clubUser.getClubId());
|
||||||
|
Sys_role sRole = sysRoleService.getByCode(s);
|
||||||
|
ur.setRoleId(sRole.getId());
|
||||||
|
roles.add(ur);
|
||||||
|
}
|
||||||
|
dao.insert(roles);
|
||||||
|
sysUserService.clearCache();
|
||||||
|
sysRoleService.clearCache();
|
||||||
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===============================20250806新增授权 zhaoxinyu==========================================*/
|
/*===============================20250806新增授权 zhaoxinyu==========================================*/
|
||||||
|
|||||||
+1
-1
@@ -178,7 +178,7 @@ public class BuildHomeAgencyController {
|
|||||||
@ApiOperation("删除工会小组")
|
@ApiOperation("删除工会小组")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Result deleteGroup(String id) {
|
public Result deleteGroup(String id) {
|
||||||
sysUnionGroupService.delete(id);
|
sysUnionGroupService.deleteById(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-4
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="流程节点" prop="processInstanceNodeName"></el-table-column>
|
<el-table-column label="流程节点" prop="processInstanceNodeName"></el-table-column>
|
||||||
<el-table-column label="操作" width="200px" fixed="right">
|
<el-table-column label="操作" width="300px" fixed="right">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button size="mini" type="primary"
|
<el-button size="mini" type="primary"
|
||||||
@click="onOpen(row.id)">
|
@click="onOpen(row.id)">
|
||||||
@@ -50,6 +50,10 @@ layout("/layouts/platform.html"){
|
|||||||
type="primary">
|
type="primary">
|
||||||
审核
|
审核
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-if="$auth.hasPermission('sys.branch.union.authorization.approval.delete')" size="mini"
|
||||||
|
type="danger" @click="deleteDo(row)">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"-->
|
<!-- v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"-->
|
||||||
<!-- @click="openRevoke(row.processInstanceTaskId)"-->
|
<!-- @click="openRevoke(row.processInstanceTaskId)"-->
|
||||||
@@ -104,10 +108,25 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async deleteDo(row) {
|
||||||
|
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
if (confirm === "confirm") {
|
||||||
|
const resp = await this.$axios.post("/platform/branchUnionUser/authorization/approval/deleteDo", {
|
||||||
|
id: row.id,
|
||||||
|
processInstanceId: row.processInstanceId
|
||||||
|
})
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
},
|
||||||
onOpen(id) {
|
onOpen(id) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.showApprovalForm = false
|
this.showApprovalForm = false
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.$refs.infoRef.onOpen(id)
|
this.$refs.infoRef.onOpen(id)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -116,7 +135,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
this.formData = row.approvalParam
|
this.formData = row.approvalParam
|
||||||
this.formData.approvalOpinion = '同意'
|
this.formData.approvalOpinion = '同意'
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.$refs.infoRef.onOpen(row.id)
|
this.$refs.infoRef.onOpen(row.id)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -144,7 +163,7 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "info"
|
type: "info"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post("/platform/branchUnionUser/authorization/approval/revoke", { taskId }).then((res) => {
|
this.$axios.post("/platform/branchUnionUser/authorization/approval/revoke", {taskId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
|||||||
@@ -54,8 +54,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-select v-model="pageForm.activityType" @change="doSearch" style="width: 100%"
|
<el-select v-model="pageForm.activityType" @change="doSearch" style="width: 100%"
|
||||||
placeholder="请选择活动状态" filterable>
|
placeholder="请选择活动状态" filterable>
|
||||||
<el-option :value="1" label="全部"></el-option>
|
<el-option :value="1" label="全部"></el-option>
|
||||||
<el-option :value="4" label="即将开始"></el-option>
|
<el-option :value="2" label="即将开始 & 报名中"></el-option>
|
||||||
<el-option :value="2" label="报名中"></el-option>
|
|
||||||
<el-option :value="3" label="已结束"></el-option>
|
<el-option :value="3" label="已结束"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
@@ -90,8 +89,13 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="300">
|
<el-table-column label="操作" width="300">
|
||||||
<template v-slot="{row}">
|
<template v-slot="{row}">
|
||||||
<el-button @click="onView(row)" size="mini" type="primary">查看介绍</el-button>
|
<template v-if="$moment().isBefore($moment(row.activitySignUpEndTime))">
|
||||||
<el-button @click="onOpen(row)" size="mini" type="primary">去报名</el-button>
|
<el-button @click="onView(row)" size="mini" type="primary">查看介绍</el-button>
|
||||||
|
<el-button @click="onOpen(row)" size="mini" type="primary">去报名</el-button>
|
||||||
|
</template>
|
||||||
|
<template v-if="$moment().isAfter($moment(row.activitySignUpEndTime))">
|
||||||
|
<el-button size="mini" type="info">已结束</el-button>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -143,7 +147,7 @@ layout("/layouts/platform.html"){
|
|||||||
return {
|
return {
|
||||||
pageForm: {
|
pageForm: {
|
||||||
year: this.$moment().format("YYYY"),
|
year: this.$moment().format("YYYY"),
|
||||||
activityType: 4
|
activityType: 2
|
||||||
},
|
},
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{ label: "活动名称", prop: "activityName", width: 600},
|
{ label: "活动名称", prop: "activityName", width: 600},
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const clubUserJoin = {
|
|||||||
{{viewData.sex}}
|
{{viewData.sex}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="出生年月">
|
<el-descriptions-item label="出生年月">
|
||||||
{{viewData.birthday}}
|
{{$moment(viewData.birthday).format('YYYY-MM-DD')}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="联系电话">
|
<el-descriptions-item label="联系电话">
|
||||||
{{viewData.mobile}}
|
{{viewData.mobile}}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
|
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
|
||||||
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
|
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
|
||||||
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
|
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(this.formData, "unionName", user.union ? user.union.name : null)
|
this.$set(this.formData, "unionName", user.union ? user.union.name : null)
|
||||||
this.$set(this.formData, "sex", user.sex)
|
this.$set(this.formData, "sex", user.sex)
|
||||||
this.$set(this.formData, "birthday", "${@auth.getPrincipalProperty('birthday'),'yyyy-MM-dd'}")
|
this.$set(this.formData, "birthday", "${@auth.getPrincipalProperty('birthday'),'yyyy-MM-dd'}")
|
||||||
|
this.$set(this.formData, "mobile", user.mobile)
|
||||||
this.$set(this.formData, "nation", user.nation)
|
this.$set(this.formData, "nation", user.nation)
|
||||||
this.$set(this.formData, "political", user.political)
|
this.$set(this.formData, "political", user.political)
|
||||||
this.$set(this.formData, "education", user.education)
|
this.$set(this.formData, "education", user.education)
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (this.honorTypeList && this.honorLevelList) {
|
if (this.honorTypeList && this.honorLevelList) {
|
||||||
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
||||||
this.$set(this.pageForm, "queryTypeCode", this.honorTypeList[0].queryTypeCode)
|
this.$set(this.pageForm, "queryTypeCode", this.honorTypeList[0].queryTypeCode)
|
||||||
this.honorPrizeList = await this.getHonorPrize(this.formData.honorType)
|
this.honorPrizeList = await this.getHonorPrize(this.pageForm.honorType)
|
||||||
console.log(this.pageForm)
|
console.log(this.pageForm)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ layout("/layouts/platform_h5.html"){
|
|||||||
.van-count-down {
|
.van-count-down {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
.item-header .van-tag {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 3px 6px;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div id="app">
|
<div id="app">
|
||||||
@@ -40,10 +45,25 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<table-list api="/platform/family/apply/activityPageData"
|
<table-list api="/platform/family/apply/activityPageData"
|
||||||
:page_form.sync="pageForm"
|
:page_form.sync="pageForm"
|
||||||
ref="tableListRef"
|
ref="tableListRef"
|
||||||
title="activityName"
|
|
||||||
img="cover"
|
img="cover"
|
||||||
@ready="onReady"
|
@ready="onReady"
|
||||||
>
|
>
|
||||||
|
<template #header="{index,row}">
|
||||||
|
<div class="item-header">
|
||||||
|
<div class="item-title">{{ row.activityName }}</div>
|
||||||
|
<div>
|
||||||
|
<van-tag type="primary" v-if="$moment().isBefore($moment(row.activitySignUpStartTime))">
|
||||||
|
即将开始
|
||||||
|
</van-tag>
|
||||||
|
<van-tag type="success" v-if="$moment().isAfter($moment(row.activitySignUpStartTime)) && $moment().isBefore($moment(row.activitySignUpEndTime))">
|
||||||
|
进行中
|
||||||
|
</van-tag>
|
||||||
|
<van-tag class="grey" v-if="$moment().isAfter($moment(row.activitySignUpEndTime))">
|
||||||
|
已结束
|
||||||
|
</van-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template v-slot="{index,row}">
|
<template v-slot="{index,row}">
|
||||||
<table-column label="面向对象">{{row.activityGroupName}}</table-column>
|
<table-column label="面向对象">{{row.activityGroupName}}</table-column>
|
||||||
<table-column label="报名时间">
|
<table-column label="报名时间">
|
||||||
@@ -54,14 +74,16 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</table-column>
|
</table-column>
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{index,row}">
|
<template #actions="{index,row}">
|
||||||
<div class="action-btn" @click="onView(row)">
|
<template v-if="$moment().isBefore($moment(row.activitySignUpEndTime))">
|
||||||
<i class="fa fa-eye"></i>
|
<div class="action-btn" @click="onView(row)">
|
||||||
<span>查看介绍</span>
|
<i class="fa fa-eye"></i>
|
||||||
</div>
|
<span>查看介绍</span>
|
||||||
<div class="action-btn" @click="onApply(row)">
|
</div>
|
||||||
<i class="fa fa-edit"></i>
|
<div class="action-btn" @click="onApply(row)">
|
||||||
<span>去报名</span>
|
<i class="fa fa-edit"></i>
|
||||||
</div>
|
<span>去报名</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</table-list>
|
</table-list>
|
||||||
|
|
||||||
@@ -105,12 +127,11 @@ layout("/layouts/platform_h5.html"){
|
|||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
searchKeyword: '',
|
searchKeyword: '',
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
activityType: 4,
|
activityType: 2,
|
||||||
},
|
},
|
||||||
typeOptions: [
|
typeOptions: [
|
||||||
{text: '全部', value: 1},
|
{text: '全部', value: 1},
|
||||||
{text: '即将开始', value: 4},
|
{text: '即将开始 & 报名中', value: 2},
|
||||||
{text: '报名中', value: 2},
|
|
||||||
{text: '已结束', value: 3},
|
{text: '已结束', value: 3},
|
||||||
],
|
],
|
||||||
infoVisible: false,
|
infoVisible: false,
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
id: GetQueryString("id"),
|
id: GetQueryString("id"),
|
||||||
|
H5JumpTo: GetQueryString("H5JumpTo"),
|
||||||
subjects: [],
|
subjects: [],
|
||||||
activity: {},
|
activity: {},
|
||||||
// remainingTime: 0,
|
// remainingTime: 0,
|
||||||
@@ -161,8 +162,23 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.activity = res.data.activity
|
this.activity = res.data.activity
|
||||||
this.subjects = res.data.subjects
|
this.subjects = res.data.subjects
|
||||||
this.answerRecordId = res.data.answerRecordId
|
this.answerRecordId = res.data.answerRecordId
|
||||||
this.checkGroupPermission()
|
debugger
|
||||||
this.getAnswerRecord()
|
if (!this.H5JumpTo && this.activity.repeatable && res.data.repeatTips){
|
||||||
|
// 如果是可重复答题,第二次答题进来弹出提示
|
||||||
|
vant.Dialog.confirm({
|
||||||
|
title: '温馨提示',
|
||||||
|
message: '您已完成本次答题,是否要重新答题?',
|
||||||
|
confirmButtonText: '重新答题',
|
||||||
|
cancelButtonText: '查看答题记录',
|
||||||
|
}).then(() => {
|
||||||
|
this.getAnswerRecord()
|
||||||
|
}).catch(() => {
|
||||||
|
pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.getAnswerRecord()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="button-control">
|
<div class="button-control">
|
||||||
|
<van-button v-if="canAgainQuestion" type="primary" @click="againQuestion" block>重新答题</van-button>
|
||||||
<van-button type="primary" @click="openHistory" block>查看全部答题记录</van-button>
|
<van-button type="primary" @click="openHistory" block>查看全部答题记录</van-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -239,7 +240,9 @@ layout("/layouts/platform_h5.html"){
|
|||||||
activity: {},
|
activity: {},
|
||||||
list: [],
|
list: [],
|
||||||
historyShow: false,
|
historyShow: false,
|
||||||
historyList: []
|
historyList: [],
|
||||||
|
|
||||||
|
canAgainQuestion: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -268,12 +271,26 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 重新答题
|
||||||
|
*/
|
||||||
|
againQuestion() {
|
||||||
|
vant.Dialog.confirm({
|
||||||
|
title: '温馨提示',
|
||||||
|
message: '确定要重新答题吗?',
|
||||||
|
}).then(() => {
|
||||||
|
pjaxReplace('/platform/h5/qsv/quiz?id=' + this.activity.id + "&H5JumpTo=true")
|
||||||
|
}).catch(() => {
|
||||||
|
// on cancel
|
||||||
|
});
|
||||||
|
},
|
||||||
getAnswerResult() {
|
getAnswerResult() {
|
||||||
this.$axios.post("/platform/h5/qsv/quiz/answerResult", { answerRecordId: this.answerRecordId }).then((res) => {
|
this.$axios.post("/platform/h5/qsv/quiz/answerResult", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.subjects = res.data.subjects
|
this.subjects = res.data.subjects
|
||||||
this.activity = res.data.activity
|
this.activity = res.data.activity
|
||||||
this.getAnswerRecord()
|
this.getAnswerRecord()
|
||||||
|
this.getHistoryQuestion()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -317,6 +334,16 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.historyList = res.data
|
this.historyList = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getHistoryQuestion() {
|
||||||
|
$.post("/platform/h5/qsv/quiz/historyScore", { activityId: this.activity.id }).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.historyList = res.data
|
||||||
|
if (this.activity.maxAttempts > res.data.length) {
|
||||||
|
this.canAgainQuestion = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -261,6 +261,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.formData.loginName = user.loginname;
|
this.formData.loginName = user.loginname;
|
||||||
this.formData.unitName = user.unit ? user.unit.name : null;
|
this.formData.unitName = user.unit ? user.unit.name : null;
|
||||||
this.formData.unionName = user.union ? user.union.name : null;
|
this.formData.unionName = user.union ? user.union.name : null;
|
||||||
|
this.formData.birthday = this.$moment(user.birthday).format('YYYY-MM-DD');
|
||||||
|
this.formData.mobile = user.mobile;
|
||||||
this.formData.sex = user.sex;
|
this.formData.sex = user.sex;
|
||||||
this.formData.education = user.education;
|
this.formData.education = user.education;
|
||||||
this.formData.technicalTitle = user.technicalTitle;
|
this.formData.technicalTitle = user.technicalTitle;
|
||||||
|
|||||||
Reference in New Issue
Block a user