Merge remote-tracking branch 'origin/main'

# Conflicts:
#	src/main/resources/static/assets/platform/css/h5.css
This commit is contained in:
那些花儿
2025-09-05 15:16:10 +08:00
22 changed files with 771 additions and 484 deletions
@@ -1,11 +1,20 @@
package com.budwk.app.zhgh.activity.culture.controller; package com.budwk.app.zhgh.activity.culture.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode; import cn.dev33.satoken.annotation.SaMode;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
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.constant.RoleConstant; import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.result.Result; import com.budwk.app.base.result.Result;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.sys.models.Sys_user_role; import com.budwk.app.sys.models.Sys_user_role;
import com.budwk.app.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil;
@@ -13,11 +22,15 @@ import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService; import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService;
import com.budwk.app.zhgh.club.model.SysClub; import com.budwk.app.zhgh.club.model.SysClub;
import com.budwk.app.zhgh.club.service.SysClubService; import com.budwk.app.zhgh.club.service.SysClubService;
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd; import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls; import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql; import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup; import org.nutz.dao.util.cri.SqlExpressionGroup;
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.Strings; import org.nutz.lang.Strings;
@@ -41,6 +54,17 @@ import java.util.stream.Collectors;
@At("/platform/activity/culture/applyActivity") @At("/platform/activity/culture/applyActivity")
public class ActivityCultureApplyActivityController { public class ActivityCultureApplyActivityController {
@Inject
private Dao dao;
@Inject
private FlowEngine flowEngine;
@Inject
private FlowCommonService flowCommonService;
@Inject
private SysClubService sysClubService;
@Inject
private ActivityCultureService activityCultureService;
@At("/school") @At("/school")
@Ok("beetl:platform/zhgh/activity/culture/school/applyActivity/index.html") @Ok("beetl:platform/zhgh/activity/culture/school/applyActivity/index.html")
@SaCheckPermission("activity.culture.applyActivity.school") @SaCheckPermission("activity.culture.applyActivity.school")
@@ -59,12 +83,6 @@ public class ActivityCultureApplyActivityController {
public void clubIndex() { public void clubIndex() {
} }
@Inject
private ActivityCultureService activityCultureService;
@Inject
private SysClubService sysClubService;
/** /**
* @param activityScopeGroupId * @param activityScopeGroupId
@@ -94,6 +112,58 @@ public class ActivityCultureApplyActivityController {
return Result.success(); return Result.success();
} }
@At
@SaCheckLogin
@ApiOperation("提交申请")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission(value = {"activity.culture.applyActivity.school", "activity.culture.applyActivity.union", "activity.culture.applyActivity.club"}, mode = SaMode.OR)
public Result submit(@Param("data") ActivityTissue tissue) {
if (tissue.getActivity_type() == 40002) {
tissue.setUnionId(SecurityUtil.getUnionId());
}
tissue.setUserId(SecurityUtil.getUserId());
tissue.setApplyTime(DateUtil.now());
activityCultureService.insertOrUpdate(tissue);
if (tissue.getActivity_type() == 40002 || tissue.getActivity_type() == 40003){
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, tissue);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("WHHD", tissue.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
for (ProcessTask task : doingTaskList) {
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
}
return Result.success();
}
return Result.success();
}
@At
@SaCheckLogin
@ApiOperation("重新提交申请")
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission(value = {"activity.culture.applyActivity.school", "activity.culture.applyActivity.union", "activity.culture.applyActivity.club"}, mode = SaMode.OR)
public Result submitAgain(@Param("data") ActivityTissue tissue, @Param("taskId") Long taskId) {
if (tissue.getActivity_type() == 40002) {
tissue.setUnionId(SecurityUtil.getUnionId());
}
tissue.setUserId(SecurityUtil.getUserId());
tissue.setApplyTime(DateUtil.now());
activityCultureService.insertOrUpdate(tissue);
Dict dict = Dict.create();
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
flowCommonService.executeTask(dict);
return Result.success();
}
@At @At
@SLog(tag = "文化活动", msg = "编辑了一条文化活动记录", param = true, result = true) @SLog(tag = "文化活动", msg = "编辑了一条文化活动记录", param = true, result = true)
@SaCheckPermission(value = {"activity.culture.applyActivity.school", "activity.culture.applyActivity.union", "activity.culture.applyActivity.club"}, mode = SaMode.OR) @SaCheckPermission(value = {"activity.culture.applyActivity.school", "activity.culture.applyActivity.union", "activity.culture.applyActivity.club"}, mode = SaMode.OR)
@@ -7,6 +7,7 @@ import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.model.Audit; import com.budwk.app.base.model.Audit;
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.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.culture.models.ActivityTissue; import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService; import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService;
@@ -20,6 +21,8 @@ import org.nutz.lang.Strings;
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 java.util.List;
/** /**
* @ClassName ActivityCultureAuditActivityController * @ClassName ActivityCultureAuditActivityController
* @Description TODO * @Description TODO
@@ -50,7 +53,7 @@ public class ActivityCultureAuditActivityController {
@At @At
@SaCheckPermission(value = {"activity.culture.auditActivity.union", "activity.culture.auditActivity.club"}, mode = SaMode.OR) @SaCheckPermission(value = {"activity.culture.auditActivity.union", "activity.culture.auditActivity.club"}, mode = SaMode.OR)
public Result pageData(PageForm page, Boolean state, public Result pageData(PageForm page, boolean approval,
String year, String year,
String name, String name,
String unionId, String unionId,
@@ -62,19 +65,46 @@ public class ActivityCultureAuditActivityController {
tissue.*, tissue.*,
uni.name unionname , uni.name unionname ,
club.clubName, club.clubName,
abs.`name` projectTypeName abs.`name` projectTypeName,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM FROM
activity_tissue tissue wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_tissue tissue ON tissue.id = ins.businessNo
LEFT JOIN sys_union uni ON uni.id = tissue.unionId LEFT JOIN sys_union uni ON uni.id = tissue.unionId
LEFT JOIN sys_club club ON club.id = tissue.clubId LEFT JOIN sys_club club ON club.id = tissue.clubId
LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition $condition
"""); """);
cnd.and("t.taskName", "=", "76a03838-caa4-4561-ba0f-0da0d3a17c37");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("YEAR(tissue.startTime)", "=", year); cnd.andEX("YEAR(tissue.startTime)", "=", year);
cnd.andEX("tissue.unionId", "=", unionId); cnd.andEX("tissue.unionId", "=", unionId);
cnd.andEX("tissue.activity_type", "=", activity_type); cnd.andEX("tissue.activity_type", "=", activity_type);
cnd.andEX("tissue.state", state ? ">" : "=", 1); if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
if (Strings.isNotBlank(name)) { if (Strings.isNotBlank(name)) {
cnd.where().andLike("tissue.name", name); cnd.where().andLike("tissue.name", name);
@@ -86,7 +116,7 @@ public class ActivityCultureAuditActivityController {
} else { } else {
cnd.desc("tissue.startTime"); cnd.desc("tissue.startTime");
} }
cnd.groupBy("t.id");
sql.setCondition(cnd); sql.setCondition(cnd);
return Result.success(activityCultureService.listPageMap(page.getPageNumber(), page.getPageSize(), sql)); return Result.success(activityCultureService.listPageMap(page.getPageNumber(), page.getPageSize(), sql));
} }
@@ -133,17 +133,38 @@ public class ActivityCultureUserStatisticsController {
@SaCheckPermission(value = {"activity.culture.userStatistics.school", "activity.culture.userStatistics.union", "activity.culture.userStatistics.club"}, mode = SaMode.OR) @SaCheckPermission(value = {"activity.culture.userStatistics.school", "activity.culture.userStatistics.union", "activity.culture.userStatistics.club"}, mode = SaMode.OR)
public Result getActivityByYearOrType(Integer year, public Result getActivityByYearOrType(Integer year,
@Valid Integer activity_type) { @Valid Integer activity_type) {
Cnd cnd = Cnd.where("activity_type", "=", activity_type); Sql sql = Sqls.create("""
cnd.and("projectTypeCode", "!=", 50004); SELECT
tissue.*,
uni.name unionname ,
club.clubName,
abs.`name` projectTypeName,
atp.applyUserId,
ins.state instanceState,
CASE WHEN atp.id IS NOT NULL THEN 1 ELSE 0 END AS isEnrolled
FROM
activity_tissue tissue
LEFT JOIN sys_union uni ON uni.id = tissue.unionId
LEFT JOIN sys_club club ON club.id = tissue.clubId
LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode
LEFT JOIN activity_tissue_person atp on atp.tissueId=tissue.id AND (atp.applyUserId = @userId OR atp.userId = @userId)
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = tissue.id AND ins.state = 20
$condition
""").setParam("userId", SecurityUtil.getUserId());
Cnd cnd =Cnd.where("tissue.activity_type", "=", activity_type);
cnd.and("tissue.projectTypeCode", "!=", 50004);
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and("signUpMethod", "in", List.of(1, 2, 3)); cnd.and("tissue.signUpMethod", "in", List.of(1, 2, 3));
if (activity_type == 40002) { if (activity_type == 40002) {
cnd.and("unionId", "=", SecurityUtil.getUnionId()); cnd.and("tissue.unionId", "=", SecurityUtil.getUnionId());
} }
} }
cnd.andEX("YEAR(startTime)", "=", year).desc("startTime"); // 只查询流程实例状态为20的数据(已完成状态)
List<ActivityTissue> list = activityCultureApplyUserService.dao().query(ActivityTissue.class, cnd); cnd.and("ins.state", "=", 20);
return Result.success(list); cnd.andEX("YEAR(tissue.startTime)", "=", year).desc("tissue.startTime");
sql.setCondition(cnd);
return Result.success(activityCultureApplyUserService.list(sql));
} }
@@ -49,6 +49,7 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
club.clubName, club.clubName,
abs.`name` projectTypeName, abs.`name` projectTypeName,
atp.applyUserId, atp.applyUserId,
ins.state instanceState,
CASE WHEN atp.id IS NOT NULL THEN 1 ELSE 0 END AS isEnrolled CASE WHEN atp.id IS NOT NULL THEN 1 ELSE 0 END AS isEnrolled
FROM FROM
activity_tissue tissue activity_tissue tissue
@@ -56,16 +57,19 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
LEFT JOIN sys_club club ON club.id = tissue.clubId LEFT JOIN sys_club club ON club.id = tissue.clubId
LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode
LEFT JOIN activity_tissue_person atp on atp.tissueId=tissue.id AND (atp.applyUserId = @userId OR atp.userId = @userId) LEFT JOIN activity_tissue_person atp on atp.tissueId=tissue.id AND (atp.applyUserId = @userId OR atp.userId = @userId)
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = tissue.id
$condition $condition
""").setParam("userId", SecurityUtil.getUserId()); """).setParam("userId", SecurityUtil.getUserId());
if (Strings.isNotBlank(name)) { if (Strings.isNotBlank(name)) {
cnd.where().andLike("tissue.name", name); cnd.where().andLike("tissue.name", name);
} }
// 只查询流程实例状态为20的数据(已完成状态)
cnd.and("ins.state", "=", 20);
cnd.andEX("YEAR(tissue.startTime)", "=", year); cnd.andEX("YEAR(tissue.startTime)", "=", year);
cnd.andEX("tissue.isUnseal", "=", true); cnd.andEX("tissue.isUnseal", "=", true);
cnd.andEX("tissue.activity_type", "=", activity_type); cnd.andEX("tissue.activity_type", "=", activity_type);
cnd.andEX("tissue.state", "=", 3);
cnd.and("tissue.isEnrollSystem", "=", 1); cnd.and("tissue.isEnrollSystem", "=", 1);
cnd.andEX("tissue.projectTypeCode", "!=", 50004); cnd.andEX("tissue.projectTypeCode", "!=", 50004);
cnd.andEX("tissue.signUpMethod", "in", List.of(1, 2, 3)); cnd.andEX("tissue.signUpMethod", "in", List.of(1, 2, 3));
@@ -58,7 +58,7 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
gh.id, gh.id,
gh.name unionname, gh.name unionname,
( SELECT count( 1 ) FROM `user` WHERE id IN ( SELECT userid FROM activity_user_scope WHERE groupId = @activityScopeGroupId ) AND unionId = gh.id ) as teacherCount ( SELECT count( 1 ) FROM `user` WHERE id IN ( SELECT userid FROM activity_user_scope WHERE groupId = @activityScopeGroupId ) AND unionId = gh.id ) as teacherCount
FROM FROM
sys_union gh sys_union gh
LEFT JOIN `vw_user` u ON u.unionid = gh.id LEFT JOIN `vw_user` u ON u.unionid = gh.id
@@ -85,12 +85,31 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
tissue.*, tissue.*,
uni.name unionname , uni.name unionname ,
club.clubName, club.clubName,
abs.`name` projectTypeName abs.`name` projectTypeName,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
FROM FROM
activity_tissue tissue activity_tissue tissue
LEFT JOIN sys_union uni ON uni.id = tissue.unionId LEFT JOIN sys_union uni ON uni.id = tissue.unionId
LEFT JOIN sys_club club ON club.id = tissue.clubId LEFT JOIN sys_club club ON club.id = tissue.clubId
LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode LEFT JOIN activity_basic_settings abs ON abs.`code`=tissue.projectTypeCode
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = tissue.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition $condition
"""); """);
@@ -120,7 +139,7 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
} else { } else {
cnd.desc("tissue.startTime"); cnd.desc("tissue.startTime");
} }
//cnd.groupBy("tissue.id");
sql.setCondition(cnd); sql.setCondition(cnd);
return this.listPageMap(page.getPageNumber(), page.getPageSize(), sql); return this.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
} }
@@ -179,7 +179,7 @@ public class ActivityWorksCollectionReadController {
response.setHeader("Content-Disposition", "attachment;filename=" + URLUtil.encode("作品征集数据.zip")); response.setHeader("Content-Disposition", "attachment;filename=" + URLUtil.encode("作品征集数据.zip"));
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.andEX("up.activityId", "=", pageForm.getActivityId()); cnd.andEX("activityId", "=", pageForm.getActivityId());
cnd.andEX("typeName", "=", pageForm.getTypeName()); cnd.andEX("typeName", "=", pageForm.getTypeName());
if (StrUtil.isAllNotBlank(pageForm.getSearchKeyword())) { if (StrUtil.isAllNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup(); SqlExpressionGroup seg = new SqlExpressionGroup();
@@ -1,6 +1,7 @@
package com.budwk.app.zhgh.activity.workscollection.controller; package com.budwk.app.zhgh.activity.workscollection.controller;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
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;
@@ -26,6 +27,7 @@ import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param; import org.nutz.mvc.annotation.Param;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@@ -56,7 +58,7 @@ public class ActivityWorksCollectionUploadController {
*/ */
@At @At
@SaCheckPermission("activity.workscollection.upload") @SaCheckPermission("activity.workscollection.upload")
public Result pageData(@Valid PageForm pageForm, String activityId, String subjectId, String worksId) { public Result pageData(@Valid PageForm pageForm, String activityId, String subjectId, String worksId, Long year) {
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
select select
up.*, up.*,
@@ -72,6 +74,7 @@ public class ActivityWorksCollectionUploadController {
"""); """);
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
cnd.and("userId", "=", SecurityUtil.getUserId()); cnd.and("userId", "=", SecurityUtil.getUserId());
cnd.andEX("YEAR(co.startDateTime)","=",year);
cnd.andEX("up.activityId", "=", activityId); cnd.andEX("up.activityId", "=", activityId);
cnd.andEX("up.subjectId", "=", subjectId); cnd.andEX("up.subjectId", "=", subjectId);
cnd.andEX("up.worksId", "=", worksId); cnd.andEX("up.worksId", "=", worksId);
@@ -9,7 +9,9 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List; import java.util.List;
@Data @Data
@@ -97,4 +99,6 @@ public class Activity_works_collection_upload extends BaseModel {
@NotEmpty(message = "附件不能为空") @NotEmpty(message = "附件不能为空")
private List<JSONObject> files; private List<JSONObject> files;
} }
@@ -75,6 +75,7 @@ public class ClubUserJoinApplyController {
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
cua.*, cua.*,
club.clubName,
u.loginname AS loginName, u.loginname AS loginName,
u.username AS userName, u.username AS userName,
u.sex, u.sex,
@@ -85,6 +86,7 @@ public class ClubUserJoinApplyController {
u.academicDegree u.academicDegree
FROM FROM
club_user_apply cua club_user_apply cua
LEFT JOIN sys_club club ON club.id = cua.clubId
LEFT JOIN vw_user u ON u.id = cua.userId LEFT JOIN vw_user u ON u.id = cua.userId
WHERE cua.id = @id WHERE cua.id = @id
""").setParam("id", id); """).setParam("id", id);
@@ -149,6 +151,7 @@ public class ClubUserJoinApplyController {
Dict dict = Dict.create(); Dict dict = Dict.create();
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId); dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode()); dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
dict.set("clubId", clubUserApply.getClubId());
flowCommonService.executeTask(dict); flowCommonService.executeTask(dict);
return Result.success(); return Result.success();
} }
@@ -37,7 +37,7 @@ import org.nutz.mvc.annotation.Param;
@At("/platform/unionReimburse/mine") @At("/platform/unionReimburse/mine")
@Api("工会报销我的") @Api("工会报销我的")
@Ok("json:full") @Ok("json:full")
public class UnionReimburseMineController { public class UnionReimburseMineController {
@Inject @Inject
private UnionReimburseService unionReimburseService; private UnionReimburseService unionReimburseService;
@@ -21,7 +21,7 @@ public class H5ChildManageController {
@At("") @At("")
@Ok("beetl:/platform/zhghh5/staffmanage/childmanage/") @Ok("beetl:/platform/zhghh5/staffmanage/childmanage/")
@SaCheckPermission("childManage.h5") @SaCheckPermission("h5.childManage")
public void index() { public void index() {
} }
} }
@@ -1,12 +1,19 @@
<template> <template>
<div> <div>
<template v-for="item in options"> <template v-if="mode === 'pc'" v-for="item in options">
<el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs" <el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs"
:type="item.type" :type="item.type"
>{{ item[label_key] }} >{{ item[label_key] }}
</el-tag> </el-tag>
</template> </template>
</div>
<template v-if="mode === 'h5'" v-for="item in options">
<van-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs"
:type="item.type">
{{ item[label_key] }}
</van-tag>
</template>
</div>
</template> </template>
<script> <script>
@@ -15,73 +22,80 @@ const enumCache = {}
const requestPromises = {} const requestPromises = {}
module.exports = { module.exports = {
name: "DictTag", name: "DictTag",
props: { props: {
value: {type: String | Number}, value: { type: String | Number },
name: {type: String}, name: { type: String },
value_key: { value_key: {
type: String, type: String,
default: "code" default: "code"
},
label_key: {
type: String,
default: "name"
},
mode: {
type: String,
default: "pc"
}
}, },
label_key: { data() {
type: String, return {
default: "name" options: []
} }
}, },
data() { watch: {
return { code: {
options: [] handler(val) {
} this.getEnumOptions()
}, },
watch: { immediate: true
code: { }
handler(val) { },
this.getEnumOptions() methods: {
}, getEnumOptions() {
immediate: true // // 检查数据缓存
} // if (enumCache[this.name]) {
}, // this.options = enumCache[this.name]
methods: { // return
getEnumOptions() { // }
// // 检查数据缓存 //
// if (enumCache[this.name]) { // // 检查是否已有相同请求在进行中
// this.options = enumCache[this.name] // if (requestPromises[this.name]) {
// return // requestPromises[this.name].then(data => {
// } // this.options = data
// // })
// // 检查是否已有相同请求在进行中 // return
// if (requestPromises[this.name]) { // }
// requestPromises[this.name].then(data => {
// this.options = data
// })
// return
// }
// 创建请求Promise并缓存 // 创建请求Promise并缓存
requestPromises[this.name] = $.get("/open/common/dictEnumOptions", {name: this.name}) requestPromises[this.name] = $.get("/open/common/dictEnumOptions", { name: this.name })
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
// 存入数据缓存 // 存入数据缓存
enumCache[this.name] = res.data enumCache[this.name] = res.data
// 清除请求Promise缓存 // 清除请求Promise缓存
delete requestPromises[this.name] delete requestPromises[this.name]
return res.data return res.data
} }
}) })
requestPromises[this.name].then(data => {
this.options = data
})
}
},
created() {
requestPromises[this.name].then(data => {
this.options = data
})
} }
},
created() {
}
} }
</script> </script>
<style scoped> <style scoped>
.el-tag + .el-tag { .el-tag + .el-tag {
margin-left: 10px; margin-left: 10px;
}
.van-tag {
padding: 4px 8px;
} }
</style> </style>
@@ -105,6 +105,7 @@ module.exports = {
} }
}) })
} else { } else {
val = JSON.parse(val)
this.fileList = val.map((v) => { this.fileList = val.map((v) => {
return { return {
...v, ...v,
@@ -364,6 +364,7 @@
Vue.component("svg-icon", httpVueLoader("/components/plugins/sysSvgIcon/index.vue?v=" + new Date().getTime())) Vue.component("svg-icon", httpVueLoader("/components/plugins/sysSvgIcon/index.vue?v=" + new Date().getTime()))
Vue.component("year-van-dropdown-item", httpVueLoader("/components/plugins/vantMore/yearVanDropDownItem.vue?v=" + new Date().getTime())) Vue.component("year-van-dropdown-item", httpVueLoader("/components/plugins/vantMore/yearVanDropDownItem.vue?v=" + new Date().getTime()))
Vue.component("van-text-dialog", httpVueLoader("/components/plugins/vantMore/vantTextDialog.vue?v=" + new Date().getTime())) Vue.component("van-text-dialog", httpVueLoader("/components/plugins/vantMore/vantTextDialog.vue?v=" + new Date().getTime()))
Vue.component("enum-tag", httpVueLoader("/components/plugins/sysEnum/EnumTag.vue?v=" + new Date().getTime()))
</script> </script>
</head> </head>
<body> <body>
@@ -45,7 +45,6 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
<el-form-item label="是否用于报名" prop="isEnrollSystem"> <el-form-item label="是否用于报名" prop="isEnrollSystem">
<el-radio-group v-model="formData.isEnrollSystem" size="small"> <el-radio-group v-model="formData.isEnrollSystem" size="small">
<el-radio border :label="true">活动报名</el-radio> <el-radio border :label="true">活动报名</el-radio>
<el-radio border :label="false">活动管理</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -529,8 +528,9 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
mixins: [initTableMixins], mixins: [initTableMixins],
data() { data() {
return { return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"), bizId: "",
taskId: "",
activeName: "1", activeName: "1",
pageForm: { pageForm: {
year: new Date().getFullYear() + "" year: new Date().getFullYear() + ""
@@ -613,7 +613,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
formData.plannedDate = null formData.plannedDate = null
} }
this.$axios.post('/platform/activity/culture/applyActivity/save', {data: JSON.stringify(this.formData)}).then(res => { this.$axios.post('/platform/activity/culture/applyActivity/save', {data: JSON.stringify(formData)}).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("保存成功") this.$message.success("保存成功")
if (this.activity_type === 40002) { if (this.activity_type === 40002) {
@@ -627,6 +627,89 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
}) })
}) })
}, },
// 提交
onSubmit() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const formData = JSON.parse(JSON.stringify(this.formData))
formData.activity_type = this.activity_type
const {time, applyTime2, plannedDate} = formData
if (applyTime2 && applyTime2.length) {
formData.applyStartTime = applyTime2[0]
formData.applyEndTime = applyTime2[1]
formData.applyTime2 = null
}
if (time && time.length) {
formData.startTime = formData.time[0]
formData.endTime = formData.time[1]
formData.time = null
}
if (plannedDate && plannedDate.length) {
formData.startPlannedDate = formData.plannedDate[0]
formData.endPlannedDate = formData.plannedDate[1]
formData.plannedDate = null
}
this.$axios.post('/platform/activity/culture/applyActivity/submit', {
data: JSON.stringify(formData)
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
if (this.activity_type === 40002) {
window.location.href = "/platform/activity/culture/infoManage/union"
} else if (this.activity_type === 40003) {
window.location.href = "/platform/activity/culture/infoManage/club"
} else {
window.location.href = "/platform/activity/culture/infoManage/school"
}
}
})
})
},
// 再次提交
onFinishTask() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const formData = JSON.parse(JSON.stringify(this.formData))
formData.activity_type = this.activity_type
const {time, applyTime2, plannedDate} = formData
if (applyTime2 && applyTime2.length) {
formData.applyStartTime = applyTime2[0]
formData.applyEndTime = applyTime2[1]
formData.applyTime2 = null
}
if (time && time.length) {
formData.startTime = formData.time[0]
formData.endTime = formData.time[1]
formData.time = null
}
if (plannedDate && plannedDate.length) {
formData.startPlannedDate = formData.plannedDate[0]
formData.endPlannedDate = formData.plannedDate[1]
formData.plannedDate = null
}
this.$axios.post('/platform/activity/culture/applyActivity/submitAgain', {
data: JSON.stringify(formData),
taskId: this.taskId
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
if (this.activity_type === 40002) {
window.location.href = "/platform/activity/culture/infoManage/union"
} else if (this.activity_type === 40003) {
window.location.href = "/platform/activity/culture/infoManage/club"
} else {
window.location.href = "/platform/activity/culture/infoManage/school"
}
}
})
})
},
async remoteMethod(query) { async remoteMethod(query) {
if (query) { if (query) {
this.selectLoading = true this.selectLoading = true
@@ -832,9 +915,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
} }
} }
}, },
openEdit(id) { openEdit(row) {
this.taskId=row.startTaskId
this.bizId=row.id
this.activeName = "1" this.activeName = "1"
this.init(id) this.init(row.id)
} }
}, },
async created() { async created() {
@@ -17,7 +17,7 @@ const ACTIVITY_CULTURE_APPLY_USER = {
></el-date-picker> ></el-date-picker>
</search-item> </search-item>
<search-item label="活动时间"> <search-item label="活动名称">
<el-input clearable placeholder="请输入活动名称" <el-input clearable placeholder="请输入活动名称"
v-model="pageForm.name"></el-input> v-model="pageForm.name"></el-input>
</search-item> </search-item>
@@ -132,7 +132,7 @@ const ACTIVITY_CULTURE_APPLY_USER = {
}, },
openView(row) { openView(row) {
this.$refs.guava.view(() => { this.$refs.guava.view(() => {
this.$refs.infoActivity.findOne(row.id) this.$refs.infoActivity.onOpen(row)
}) })
}, },
pageData() { pageData() {
@@ -38,7 +38,7 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
<el-card class="mt10" shadow="never"> <el-card class="mt10" shadow="never">
<table-tool :app="this" label="活动列表"> <table-tool :app="this" label="活动列表">
<el-radio-group @change="doSearch" size="small" v-model="pageForm.state"> <el-radio-group @change="doSearch" size="small" v-model="pageForm.approval">
<el-radio-button :key="i.code" :label="i.code" v-for="i in auditList">{{i.name}} <el-radio-button :key="i.code" :label="i.code" v-for="i in auditList">{{i.name}}
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
@@ -70,89 +70,62 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
{{row.projectTypeName}}({{row.projectTypeCode}}) {{row.projectTypeName}}({{row.projectTypeCode}})
</template> </template>
<template scope="{row}" v-else-if="column.prop=='tussueName'"> <template scope="{row}" v-else-if="column.prop=='curTaskName'">
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span> <span v-if="row.activity_type==40002 || row.activity_type==40003">
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span> {{row.curTaskName}}
<span v-if="row.activity_type==40001">校工会</span> </span>
<span v-else>-</span>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='state'"> <template scope="{row}" v-else-if="column.prop=='instanceState'">
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}} <span v-if="row.activity_type==40002 || row.activity_type==40003">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</span>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" header-align="center" label="操作" <el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="150px"> prop="userOnline" width="150px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button :loading="row.loading" @click="openView(row)" size="mini"> <el-button :loading="row.loading" @click="onView(row)" size="mini">
查看 查看
</el-button> </el-button>
<el-button :loading="row.loading" @click="openAudit(row)" size="mini" <el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">
type="primary" 审核
v-if="row.state===1">
审核
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--#include("/layouts/pagination.html"){}#--> <!--#include("/layouts/pagination.html"){}#-->
</el-card> </el-card>
</template> </template>
<template #edit> <template #edit>
<activity-culture-info-activity handle label="校工会审核" ref="editInfo"> <activity-culture-info-activity handle label="校工会审核" ref="editInfo">
<template #handle> <div v-if="showApprovalForm">
<el-form :model="formData" label-position="right" <div class="process-title">
label-width="120px" {{formData.taskName}}
style="padding: 20px 0"> </div>
<el-form-item class="view-header" label="审核信息" label-width="135px"> <el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
</el-form-item> class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-row :gutter="20"> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
<el-col :span="12"> </el-form-item>
<el-form-item label="审核人" prop="username"> </el-form>
<el-input disabled <el-row type="flex" justify="end">
v-model="formData.username"></el-input> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-form-item> <el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
</el-col> <el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-col :span="12"> <el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-form-item label="审核时间" prop="time"> </el-row>
<el-input disabled v-model="formData.auditTime"></el-input> </div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见" prop="idea">
<el-input maxlength="500" placeholder="请填写您的审核意见"
rows="4" type="textarea"
v-model="formData.auditOpinion"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button :disabled="subDis" @click="doReview(false)"
type="danger">拒
</el-button>
<el-button :disabled="subDis" @click="doReview(true)"
type="success">通
</el-button>
</div>
</template>
</activity-culture-info-activity> </activity-culture-info-activity>
</template> </template>
<template #view>
<activity-culture-info-activity ref="infoActivity"></activity-culture-info-activity>
</template>
</guava> </guava>
`, `,
props: { props: {
@@ -166,12 +139,13 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
return { return {
subDis: false, subDis: false,
unionList: [], unionList: [],
showApprovalForm: false,
auditList: [ auditList: [
{ code: true, name: "已审核" }, { code: true, name: "已审核" },
{ code: false, name: "未审核" } { code: false, name: "未审核" }
], ],
pageForm: { pageForm: {
state: false, approval: false,
year: new Date().getFullYear() + "" year: new Date().getFullYear() + ""
}, },
tableColumns: [ tableColumns: [
@@ -181,7 +155,6 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
{ prop: "tussueName", label: "举办单位" }, { prop: "tussueName", label: "举办单位" },
{ prop: "time", label: "活动日期" }, { prop: "time", label: "活动日期" },
{ prop: "applyTime", label: "创建时间", sortable: true }, { prop: "applyTime", label: "创建时间", sortable: true },
{ prop: "state", label: "审核状态", sortable: true }
] ]
} }
}, },
@@ -189,39 +162,23 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY "activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
}, },
methods: { methods: {
async doReview(flag) {
const confirm = await this.$confirm("确定要审核" + (flag ? "通过" : "拒绝") + "吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
this.formData.flag = flag
this.subDis = true
flag ? (this.subLoading2 = true) : (this.subLoading1 = true)
const resp = await $.post("/platform/activity/culture/auditActivity/doReview", this.formData)
if (resp.code === 0) {
this.pageData()
this.$refs.guava.index()
this.$message.success(resp.msg)
} else {
this.$message.error(resp.msg)
}
}
},
openAudit(row) { openAudit(row) {
this.$refs.guava.edit() this.$refs.guava.edit(()=>{
this.$refs.editInfo.findOne(row.id) this.showApprovalForm = true
this.formData = { this.formData = {
id: row.id, processTaskId: row.taskId,
username: this.$store.state.user.username, taskName: row.curTaskName
auditTime: this.$moment().format("YYYY-MM-DD") }
} this.$refs.editInfo.onOpen(row)
})
}, },
openView(row) { onView(row) {
const { id } = row this.$refs.guava.edit(()=>{
this.$refs.guava.view() this.showApprovalForm = false
this.$refs.infoActivity.findOne(id) this.$refs.editInfo.onOpen(row)
})
}, },
pageData() { pageData() {
this.tableLoading = true this.tableLoading = true
@@ -233,9 +190,50 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
} }
}) })
this.tableLoading = false this.tableLoading = false
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
} }
}, },
async created() { async created() {
// 根据 activity_type 动态添加流程相关列
if (this.activity_type === 40002 || this.activity_type === 40003) {
this.tableColumns.push(
{prop: "curTaskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
);
}
this.unionList = await this.$businessTool.listUnion() this.unionList = await this.$businessTool.listUnion()
this.pageData() this.pageData()
} }
@@ -1,123 +1,129 @@
const ACTIVITY_CULTURE_INFO_ACTIVITY = { const ACTIVITY_CULTURE_INFO_ACTIVITY = {
template: /*language=HTML*/ ` template: /*language=HTML*/ `
<el-tabs tab-position="top" v-loading="loading" v-model="activeName"> <div>
<el-tab-pane label="活动基础信息" name="1"> <div class="process-title">
<el-descriptions :column="3" border class="margin-top" style="margin: 10px" title=""> 申请信息
<el-descriptions-item label="活动名称" span="3"> <el-link type="primary" @click="openChart">点击查看流程图</el-link>
<span class="item-center"> {{ viewData.name }}</span> </div>
</el-descriptions-item> <el-descriptions :column="3" border class="margin-top" style="margin: 10px" title="">
<el-descriptions-item label="联系人"> <el-descriptions-item label="活动名称" span="3">
<span class="item-center"> {{ viewData.name }}</span>
</el-descriptions-item>
<el-descriptions-item label="联系人">
<span v-if="viewData.username"> <span v-if="viewData.username">
{{ viewData.username }} {{ viewData.username }}
({{ viewData.loginname }})</span> ({{ viewData.loginname }})</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="联系方式"> <el-descriptions-item label="联系方式">
{{ viewData.mobile }} {{ viewData.mobile }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="活动编号"> <el-descriptions-item label="活动编号">
{{ viewData.activityCode }} {{ viewData.activityCode }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="活动项目类型"> <el-descriptions-item label="活动项目类型">
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }}) {{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="活动类型" :span="2"> <el-descriptions-item label="活动类型" :span="2">
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ? '分工会活动' {{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ?
: '分工会活动'
'协会/社团活动' }} :
</el-descriptions-item> '协会/社团活动' }}
<!-- <el-descriptions-item label="活动计划时间">--> </el-descriptions-item>
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}--> <!-- <el-descriptions-item label="活动计划时间">-->
<!-- </el-descriptions-item>--> <!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
<el-descriptions-item label="活动时间"> <!-- </el-descriptions-item>-->
{{ viewData.startTime + ' - ' + viewData.endTime }} <el-descriptions-item label="活动时间">
</el-descriptions-item> {{ viewData.startTime + ' - ' + viewData.endTime }}
<el-descriptions-item label="报名时间" v-if="viewData.applyStartTime"> </el-descriptions-item>
{{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }} <el-descriptions-item label="报名时间" v-if="viewData.applyStartTime">
</el-descriptions-item> {{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }}
<el-descriptions-item label="活动人数"> </el-descriptions-item>
{{ viewData.peopleNum || '暂无' }} <el-descriptions-item label="活动人数">
</el-descriptions-item> {{ viewData.peopleNum || '暂无' }}
<el-descriptions-item label="活动地点"> </el-descriptions-item>
{{ viewData.address }} <el-descriptions-item label="活动地点">
</el-descriptions-item> {{ viewData.address }}
<el-descriptions-item label="报名方式"> </el-descriptions-item>
<span v-if="viewData.signUpMethod===1">个人报名</span> <el-descriptions-item label="报名方式">
<span v-else-if="viewData.signUpMethod===2">组队报名</span> <span v-if="viewData.signUpMethod===1">个人报名</span>
<span v-else-if="viewData.signUpMethod===3">分工会报名</span> <span v-else-if="viewData.signUpMethod===2">组队报名</span>
<span v-else-if="!viewData.signUpMethod">无需报名</span> <span v-else-if="viewData.signUpMethod===3">分工会报名</span>
</el-descriptions-item> <span v-else-if="!viewData.signUpMethod">无需报名</span>
<el-descriptions-item label="是否用于报名"> </el-descriptions-item>
<span v-if="viewData.isEnrollSystem">活动报名</span> <el-descriptions-item label="是否用于报名">
<span v-else>活动管理</span> <span v-if="viewData.isEnrollSystem">活动报名</span>
</el-descriptions-item> <span v-else>活动管理</span>
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null"> </el-descriptions-item>
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null">
<span v-if="viewData.userNumberLimit===1">总人数限制({{ <span v-if="viewData.userNumberLimit===1">总人数限制({{
viewData.totalUserNumberLimit viewData.totalUserNumberLimit
}}人)</span> }}人)</span>
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span> <span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
<span v-else-if="!viewData.userNumberLimit">不限制</span> <span v-else-if="!viewData.userNumberLimit">不限制</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2"> <el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2">
<el-table :data="viewData.unionUserNumberLimit" border height="500" size="small" <el-table :data="viewData.unionUserNumberLimit" border height="500" size="small"
stripe> stripe>
<el-table-column align="center" header-align="center" label="序号" <el-table-column align="center" header-align="center" label="序号"
type="index" type="index"
width="100"> width="100">
</el-table-column> </el-table-column>
<el-table-column label="分工会名称" prop="unionname"></el-table-column> <el-table-column label="分工会名称" prop="unionname"></el-table-column>
<el-table-column label="分工会人数" prop="teacherCount"></el-table-column> <el-table-column label="分工会人数" prop="teacherCount"></el-table-column>
<el-table-column label="限制人数" prop="limitNum"></el-table-column> <el-table-column label="限制人数" prop="limitNum"></el-table-column>
</el-table> </el-table>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="封面图" span="3"> <el-descriptions-item label="封面图" span="3">
<img :src="viewData.cover" <img :src="viewData.cover"
class="avatar" class="avatar"
style="height: 200px;width: auto" v-if="viewData.cover"> style="height: 200px;width: auto" v-if="viewData.cover">
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="活动内容" span="3"> <el-descriptions-item label="活动内容" span="3">
<div v-html="viewData.activityContent"></div> <div v-html="viewData.activityContent"></div>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane>
<el-tab-pane label="活动费用" name="2" v-if="!viewData.isEnrollSystem">
</el-tab-pane> <template v-for="task in doneTasks">
<el-tab-pane label="活动总结" name="3" v-if="!viewData.isEnrollSystem"> <div class="mt10">
<el-form label-width="120px" ref="form"> <div class="process-title">{{ task.displayName }}</div>
<el-form-item label="活动总结" prop="activitySummary"> <el-descriptions border class="flow-task-form" :column="3" :key="task.id"
{{ viewData.activitySummary }} v-if="task.ext.isFirstTaskNode">
</el-form-item> <el-descriptions-item label="申请用户">{{ task.ext.initiatorName
</el-form> }}({{task.ext.initiatorAccount}})
</el-tab-pane> </el-descriptions-item>
<el-tab-pane label="审核信息" name="4" v-if="viewData.auditId"> <el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-form label-width="120px" ref="form"> <el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-row :gutter="20"> <el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-col :span="12"> <el-descriptions-item label="办理用户">{{ task.taskFormData.userName
<el-form-item label="审核人员:"> }}({{task.taskFormData.loginName}})
{{ viewData.audit.username }} </el-descriptions-item>
</el-form-item> <el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
</el-col> <el-descriptions-item label="办理结果">
<el-col :span="12"> <dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
<el-form-item label="审核时间:"> :value="task.ext.submitType"></dict-tag>
{{ viewData.audit.auditTime }} </el-descriptions-item>
</el-form-item> <el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
</el-col> task.taskFormData.opinion }}
<el-col :span="24"> </el-descriptions-item>
<el-form-item label="审核意见:"> </el-descriptions>
{{ viewData.audit.auditOpinion }} </div>
</el-form-item> </template>
</el-col> <slot></slot>
</el-row>
</el-form> <snaker-chart ref="snakerChartRef"></snaker-chart>
</el-tab-pane> </div>
<el-tab-pane :label="label" name="999" v-if="handle">
<slot name="handle"></slot>
</el-tab-pane>
</el-tabs>
`, `,
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
styles: [ styles: [
` `
.item-center { .item-center {
@@ -127,20 +133,13 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
} }
` `
], ],
props: {
handle: {
type: Boolean,
default: false
},
label: {
type: String,
default: "审核"
}
},
data() { data() {
return { return {
visible: false,
userData: [], userData: [],
viewData: {}, viewData: {},
row: null,
doneTasks: [],
loading: true, loading: true,
search: "", search: "",
tableKey: "", tableKey: "",
@@ -148,15 +147,9 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
} }
}, },
methods: { methods: {
hasPane(name) { async findOne() {
if (!this.handle) {
return true
}
return this.panes.includes(name)
},
async findOne(id) {
this.loading = true this.loading = true
const { data } = await this.$axios.post("/platform/activity/culture/infoManage/findOne", { id }) const { data } = await this.$axios.post("/platform/activity/culture/infoManage/findOne", { id: this.row.id })
this.loading = false this.loading = false
if (data) { if (data) {
data.billFiles = JSON.parse(data.billFiles) data.billFiles = JSON.parse(data.billFiles)
@@ -172,8 +165,28 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
this.viewData = {} this.viewData = {}
this.$notify.error({ title: "错误", message: "获取信息失败" }) this.$notify.error({ title: "错误", message: "获取信息失败" })
} }
},
// 打开
onOpen(row) {
this.row = row;
this.visible = true;
this.findOne();
this.getDoneTasks();
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
} }
} }
} }
// <style> // <style>
@@ -66,18 +66,23 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
</el-switch> </el-switch>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='tussueName'"> <template scope="{row}" v-else-if="column.prop=='taskName'">
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span> <span v-if="row.activity_type==40002 || row.activity_type==40003">
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span> {{row.taskName}}
<span v-if="row.activity_type==40001">校工会</span> </span>
</template> <span v-else>-</span>
<template scope="{row}" v-else-if="column.prop=='state'">
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
</template> </template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<span v-if="row.activity_type==40002 || row.activity_type==40003">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</span>
<span v-else>-</span>
</template>
</el-table-column> </el-table-column>
<el-table-column align="center" header-align="center" label="操作" <el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="150px"> prop="userOnline" width="150px">
<template slot-scope="{row}"> <template slot-scope="{row}">
@@ -92,10 +97,17 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="{type:'edit',row}" <el-dropdown-item :command="{type:'edit',row}"
v-if="row.taskKey === 'startTask' || !row.instanceId"
:disabled="row.projectTypeCode==50004"> :disabled="row.projectTypeCode==50004">
编辑 编辑
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="{type:'delete',row}"> <el-dropdown-item
v-if="row.canRevoke" :command="{type:'Revoke',row}">
撤回
</el-dropdown-item>
<el-dropdown-item :command="{type:'delete',row}"
v-if="row.taskKey === 'startTask' || !row.instanceId" >
删除 删除
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="{type:'openCode',row}"> <el-dropdown-item :command="{type:'openCode',row}">
@@ -155,9 +167,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
{prop: "time2", label: "报名日期", width: "300"}, {prop: "time2", label: "报名日期", width: "300"},
{prop: "applyTime", label: "创建时间", sortable: true}, {prop: "applyTime", label: "创建时间", sortable: true},
{prop: "isUnseal", label: "是否开启"}, {prop: "isUnseal", label: "是否开启"},
{prop: "state", label: "审核状态", sortable: true} ],
],
url: "" url: ""
} }
}, },
@@ -182,9 +192,11 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
dropdownCommand(command) { dropdownCommand(command) {
const {type, row} = command const {type, row} = command
if (type === "view") { if (type === "view") {
this.openView(row) this.onView(row)
} else if (type === "edit") { } else if (type === "edit") {
this.openEdit(row) this.openEdit(row)
}else if (type === "Revoke") {
this.onRevoke(row)
} else if (type === "delete") { } else if (type === "delete") {
this.doDelete(row) this.doDelete(row)
} else if (type === "openCode") { } else if (type === "openCode") {
@@ -200,12 +212,12 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
}, },
openEdit(row) { openEdit(row) {
this.$refs.guava.edit(() => { this.$refs.guava.edit(() => {
this.$refs.applyActivity.openEdit(row.id) this.$refs.applyActivity.openEdit(row)
}) })
}, },
openView(row) { onView(row) {
this.$refs.guava.view(() => { this.$refs.guava.view(()=>{
this.$refs.infoActivity.findOne(row.id) this.$refs.infoActivity.onOpen(row)
}) })
}, },
doDelete(row) { doDelete(row) {
@@ -222,6 +234,20 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
this.$set(row, "loading", false) this.$set(row, "loading", false)
}) })
}, },
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
pageData() { pageData() {
this.tableLoading = true this.tableLoading = true
this.pageForm.activity_type = this.activity_type this.pageForm.activity_type = this.activity_type
@@ -235,6 +261,13 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
} }
}, },
async created() { async created() {
// 根据 activity_type 动态添加流程相关列
if (this.activity_type === 40002 || this.activity_type === 40003) {
this.tableColumns.push(
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
);
}
this.pageData() this.pageData()
} }
} }
@@ -8,47 +8,6 @@ layout("/layouts/platform_h5.html"){
height: 100vh; height: 100vh;
overflow-y: auto; overflow-y: auto;
} }
.form-container {
padding: 0 16px;
font-family: "PingFang SC", sans-serif;
}
/* 分段标题样式 */
.form-section {
border-radius: 12px;
overflow: hidden;
}
/* 协会选择字段样式 */
.club-field .van-field__label {
width: 90px !important;
}
.club-field .van-cell__value {
color: #333;
}
/* 弹出选择器样式 */
.picker-style {
background-color: #f5f5f5;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
}
/* 输入文本区域样式 */
.van-field__control {
font-size: 14px;
color: #333;
}
.van-field__control input,
.van-field__control textarea {
font-size: 14px;
color: #333;
border-radius: 6px;
padding: 8px 12px;
background-color: #f9f9f9;
}
/* 同意条款样式 */ /* 同意条款样式 */
.agree-section { .agree-section {
padding: 16px; padding: 16px;
@@ -61,28 +20,6 @@ layout("/layouts/platform_h5.html"){
line-height: 1.5; line-height: 1.5;
color: #666; color: #666;
} }
/* 提交按钮样式 */
.submit-btn {
margin: 20px 16px 30px;
background: linear-gradient(to right, #4a90e2, #5ab1ef);
border-radius: 24px;
overflow: hidden;
}
.submit-btn .van-button {
height: 48px;
font-size: 16px;
font-weight: bold;
}
.van-cell-group__title {
font-weight: bold;
}
.more-text .van-field__label{
width: 100%;
}
.more-text {
display: inline-block;
}
</style> </style>
<div id="app"> <div id="app">
@@ -90,7 +27,7 @@ layout("/layouts/platform_h5.html"){
<van-nav-bar title="文体协会会员申请" left-text="返回" left-arrow @click-left="historyBack"></van-nav-bar> <van-nav-bar title="文体协会会员申请" left-text="返回" left-arrow @click-left="historyBack"></van-nav-bar>
<!-- 表单容器 --> <!-- 表单容器 -->
<van-form @submit="doSubmit" ref="formRef" class="form-container"> <van-form ref="formRef" class="form-container">
<!-- 协会信息 --> <!-- 协会信息 -->
<van-cell-group title="协会信息" class="form-section"> <van-cell-group title="协会信息" class="form-section">
<van-field <van-field
@@ -101,8 +38,8 @@ layout("/layouts/platform_h5.html"){
required required
is-link is-link
readonly readonly
name="clubName"
@click="showClubPopup = true" @click="showClubPopup = true"
class="club-field"
></van-field> ></van-field>
<van-popup v-model:show="showClubPopup" position="bottom"> <van-popup v-model:show="showClubPopup" position="bottom">
<van-picker <van-picker
@@ -191,8 +128,10 @@ layout("/layouts/platform_h5.html"){
</van-cell-group> </van-cell-group>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<div class="submit-btn"> <div class="submit-many-btn">
<van-button round block type="info">提交申请</van-button> <van-button native-type="button" @click="onSave" round type="info">保存申请</van-button>
<van-button native-type="submit" @click="onSubmit" round type="info" v-if="!taskId">提交申请</van-button>
<van-button native-type="submit" @click="onFinishTask" round type="info" v-else>提交申请</van-button>
</div> </div>
</van-form> </van-form>
</div> </div>
@@ -204,6 +143,8 @@ layout("/layouts/platform_h5.html"){
components: {}, components: {},
data() { data() {
return { return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: { formData: {
clubId: "", clubId: "",
clubName: "", clubName: "",
@@ -230,13 +171,55 @@ layout("/layouts/platform_h5.html"){
} }
}, },
methods: { methods: {
onClubConfirm(value, index) { onSave() {
this.formData.clubId = this.clubOptions[index].id; this.$dialog.confirm({
this.formData.clubName = value; title: "提示",
this.showClubPopup = false; message: "您确定保存吗?"
}).then(() => {
// 检查是否已申请该协会 this.$axios.post('/platform/club/join/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
this.checkApplyClub(this.formData.clubId); if (res.code === 0) {
this.$toast(res.msg);
this.$pjaxReplace("/platform/h5/club/mine")
}
})
})
},
async onSubmit() {
if (!this.isAgree) {
this.$toast.fail("请先阅读并同意协议");
return;
}
await this.$refs.formRef.validate()
this.$dialog.confirm({
title: "提示",
message: "您确定要提交申请吗?"
}).then(() => {
this.$axios.post("/platform/club/join/apply/submit", this.formData).then(res => {
if (res.code === 0) {
this.$toast(res.msg);
this.$pjaxReplace("/platform/h5/club/mine")
}
});
});
},
onFinishTask() {
this.$refs.formRef.validate((valid) => {
if (valid) {
if (!this.isAgree) {
this.$message.warning("请先阅读并同意协议")
return
}
this.$axios.post('/platform/club/join/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$toast(res.msg);
this.$pjaxReplace("/platform/h5/club/mine")
}
})
}
})
}, },
checkApplyClub(clubId) { checkApplyClub(clubId) {
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId }).then(res => { this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId }).then(res => {
@@ -247,6 +230,14 @@ layout("/layouts/platform_h5.html"){
} }
}); });
}, },
onClubConfirm(value, index) {
this.formData.clubId = this.clubOptions[index].id;
this.formData.clubName = value;
this.showClubPopup = false;
// 检查是否已申请该协会
this.checkApplyClub(this.formData.clubId);
},
listClub() { listClub() {
this.$axios.post("/platform/club/common/listClub").then(res => { this.$axios.post("/platform/club/common/listClub").then(res => {
if (res.code === 0) { if (res.code === 0) {
@@ -255,34 +246,36 @@ layout("/layouts/platform_h5.html"){
}); });
}, },
init() { init() {
const user = this.$store.state.user; this.bizId = GetQueryString("bizId")
this.formData.userId = user.id; if (GetQueryString("clubId")) {
this.formData.userName = user.username; this.$set(this.formData, "clubId", GetQueryString("clubId"))
this.formData.loginName = user.loginname;
this.formData.unitName = user.unit ? user.unit.name : null;
this.formData.unionName = user.union ? user.union.name : null;
this.formData.sex = user.sex;
this.formData.education = user.education;
this.formData.technicalTitle = user.technicalTitle;
this.formData.governmentPosition = user.governmentPosition;
},
doSubmit() {
if (!this.isAgree) {
this.$toast.fail("请先阅读并同意协议");
return;
} }
this.$dialog.confirm({ if (this.bizId) {
title: "提示", this.$axios.post("/platform/club/join/apply/info", { id: this.bizId }).then((res) => {
message: "您确定要提交申请吗?"
}).then(() => {
this.$axios.post("/platform/club/join/apply/submit", this.formData).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$toast(res.msg); this.formData = res.data
this.$pjaxReplace("/platform/club/join/mine") this.isAgree = true
} }
}); })
}); } else {
} const user = this.$store.state.user
this.$set(this.formData, "userId", user.id)
this.$set(this.formData, "userName", user.username)
this.$set(this.formData, "loginName", user.loginname)
this.$set(this.formData, "unitId", user.unit ? user.unit.id : null)
this.$set(this.formData, "unitName", user.unit ? user.unit.name : null)
this.$set(this.formData, "unionId", user.union ? user.union.id : null)
this.$set(this.formData, "unionName", user.union ? user.union.name : null)
this.$set(this.formData, "sex", user.sex)
this.$set(this.formData, "birthday", "${@auth.getPrincipalProperty('birthday'),'yyyy-MM-dd'}")
this.$set(this.formData, "nation", user.nation)
this.$set(this.formData, "political", user.political)
this.$set(this.formData, "education", user.education)
this.$set(this.formData, "technicalTitle", user.technicalTitle)
this.$set(this.formData, "position", user.position)
this.$set(this.formData, "academicDegree", user.academicDegree)
}
},
}, },
created() { created() {
this.listClub(); this.listClub();
@@ -39,8 +39,8 @@ const clubUserJoin = {
} }
}, },
methods: { methods: {
onOpen(id) { onOpen(row) {
this.$axios.post("/platform/club/join/common/info", { id }).then((res) => { this.$axios.post("/platform/club/join/mine/info", { id: row.id }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.viewData = res.data this.viewData = res.data
} }
@@ -10,7 +10,7 @@ layout("/layouts/platform_h5.html"){
<div id="app"> <div id="app">
<van-sticky> <van-sticky>
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="$pjaxReplace('/platform/h5/home')"></van-nav-bar> <van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack"></van-nav-bar>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false"> <van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item> <van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
@@ -18,30 +18,26 @@ layout("/layouts/platform_h5.html"){
<div> <div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData"> <van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div class="table-list"> <div class="list-card" v-for="row in tableData" :key="row.id">
<div class="table-card" v-for="row in tableData" :key="row.id"> <div class="list-card-body">
<van-cell title="姓名" :value="row.userName"></van-cell> <van-cell title="姓名" :value="row.userName"></van-cell>
<van-cell title="工号" :value="row.loginName"></van-cell> <van-cell title="工号" :value="row.loginName"></van-cell>
<van-cell title="协会名称" :value="row.clubName"></van-cell> <van-cell title="协会名称" :value="row.clubName"></van-cell>
<van-cell title="申请模式" :value="row.mode ? '加入' : '退出'"></van-cell> <van-cell title="申请模式" :value="row.mode ? '加入' : '退出'"></van-cell>
<van-cell title="申请时间" :value="row.applyDate"></van-cell> <van-cell title="申请时间" :value="row.applyDate"></van-cell>
<van-cell title="当前节点" :value="row.processInstanceNodeName"></van-cell> <van-cell title="当前节点" :value="row.taskName"></van-cell>
<van-cell class="table-card-footer"> <van-cell title="流程状态">
<van-button type="info" size="small" @click="onOpen(row)">查看</van-button> <enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" mode="h5" label_key="message" size="small"></enum-tag>
<van-button @click="openEdit(row)" v-if="[10,40,70].includes(row.processInstanceNodeCode)" size="small">编辑</van-button>
<van-button
@click="openRevoke(row)"
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
size="small"
type="danger"
>
撤销
</van-button>
<van-button v-if="[10].includes(row.processInstanceNodeCode)" @click="doDelete(row.id)" size="small" type="danger">
删除
</van-button>
</van-cell> </van-cell>
</div> </div>
<div class="list-card-footer">
<van-button type="info" size="small" @click="openView(row)">查看</van-button>
<van-button type="info" v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="small">编辑</van-button>
<van-button type="danger" v-if="row.canRevoke" @click="openRevoke(row)" size="small">撤销</van-button>
<van-button type="danger" v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="small" >
删除
</van-button>
</div>
</div> </div>
</van-list> </van-list>
<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>
@@ -59,7 +55,7 @@ layout("/layouts/platform_h5.html"){
<script> <script>
<!--#include('../common/clubUserJoin.js'){}#--> <!--#include('../common/clubUserJoin.js'){}#-->
const vue = new Vue({ new Vue({
el: "#app", el: "#app",
store, store,
components: { components: {
@@ -81,36 +77,29 @@ layout("/layouts/platform_h5.html"){
} }
}, },
methods: { methods: {
onOpen(row) { onRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
if (res.code === 0) {
this.$toast(res.msg);
this.pageData()
}
});
});
},
openView(row) {
this.viewShow = true this.viewShow = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.infoRef.onOpen(row.id) this.$refs.infoRef.onOpen(row)
}) })
}, },
doSearch() { onEdit(row) {
this.pageForm.pageNumber = 1 this.$pjaxReplace('/platform/h5/club/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
this.tableData = []
this.finished = false
this.pageData()
}, },
openRevoke(row) { onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤销申请吗?"
})
.then(() => {
this.$axios.post("/platform/club/join/mine/revokeApply", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
.catch(() => {})
},
doDelete(row) {
this.$dialog.confirm({ this.$dialog.confirm({
title: "提示", title: "提示",
message: "确定要删除此申请吗?" message: "确定要删除此申请吗?"
@@ -127,6 +116,12 @@ layout("/layouts/platform_h5.html"){
}) })
.catch(() => {}) .catch(() => {})
}, },
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() { pageData() {
this.tableLoading = true this.tableLoading = true
this.$axios.post("/platform/club/join/mine/pageData", this.pageForm).then((res) => { this.$axios.post("/platform/club/join/mine/pageData", this.pageForm).then((res) => {