活动- 文化活动、作品征集bug整改
This commit is contained in:
+77
-6
@@ -1,11 +1,20 @@
|
||||
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.SaMode;
|
||||
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.constant.RoleConstant;
|
||||
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.web.commons.auth.utils.AuthUtil;
|
||||
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.club.model.SysClub;
|
||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
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.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
@@ -41,6 +54,17 @@ import java.util.stream.Collectors;
|
||||
@At("/platform/activity/culture/applyActivity")
|
||||
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")
|
||||
@Ok("beetl:platform/zhgh/activity/culture/school/applyActivity/index.html")
|
||||
@SaCheckPermission("activity.culture.applyActivity.school")
|
||||
@@ -59,12 +83,6 @@ public class ActivityCultureApplyActivityController {
|
||||
public void clubIndex() {
|
||||
}
|
||||
|
||||
@Inject
|
||||
private ActivityCultureService activityCultureService;
|
||||
|
||||
@Inject
|
||||
private SysClubService sysClubService;
|
||||
|
||||
|
||||
/**
|
||||
* @param activityScopeGroupId
|
||||
@@ -94,6 +112,59 @@ public class ActivityCultureApplyActivityController {
|
||||
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)
|
||||
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);
|
||||
|
||||
if (tissue.getActivity_type() == 40002 || tissue.getActivity_type() == 40003){
|
||||
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
|
||||
@SLog(tag = "文化活动", msg = "编辑了一条文化活动记录", param = true, result = true)
|
||||
@SaCheckPermission(value = {"activity.culture.applyActivity.school", "activity.culture.applyActivity.union", "activity.culture.applyActivity.club"}, mode = SaMode.OR)
|
||||
|
||||
+35
-5
@@ -7,6 +7,7 @@ import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.model.Audit;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
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.zhgh.activity.culture.models.ActivityTissue;
|
||||
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.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ActivityCultureAuditActivityController
|
||||
* @Description TODO
|
||||
@@ -50,7 +53,7 @@ public class ActivityCultureAuditActivityController {
|
||||
|
||||
@At
|
||||
@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 name,
|
||||
String unionId,
|
||||
@@ -62,19 +65,46 @@ public class ActivityCultureAuditActivityController {
|
||||
tissue.*,
|
||||
uni.name unionname ,
|
||||
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
|
||||
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_club club ON club.id = tissue.clubId
|
||||
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
|
||||
""");
|
||||
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("tissue.unionId", "=", unionId);
|
||||
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)) {
|
||||
cnd.where().andLike("tissue.name", name);
|
||||
@@ -86,7 +116,7 @@ public class ActivityCultureAuditActivityController {
|
||||
} else {
|
||||
cnd.desc("tissue.startTime");
|
||||
}
|
||||
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(activityCultureService.listPageMap(page.getPageNumber(), page.getPageSize(), sql));
|
||||
}
|
||||
|
||||
+28
-7
@@ -133,17 +133,38 @@ public class ActivityCultureUserStatisticsController {
|
||||
@SaCheckPermission(value = {"activity.culture.userStatistics.school", "activity.culture.userStatistics.union", "activity.culture.userStatistics.club"}, mode = SaMode.OR)
|
||||
public Result getActivityByYearOrType(Integer year,
|
||||
@Valid Integer activity_type) {
|
||||
Cnd cnd = Cnd.where("activity_type", "=", activity_type);
|
||||
cnd.and("projectTypeCode", "!=", 50004);
|
||||
Sql sql = Sqls.create("""
|
||||
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())) {
|
||||
cnd.and("signUpMethod", "in", List.of(1, 2, 3));
|
||||
cnd.and("tissue.signUpMethod", "in", List.of(1, 2, 3));
|
||||
if (activity_type == 40002) {
|
||||
cnd.and("unionId", "=", SecurityUtil.getUnionId());
|
||||
cnd.and("tissue.unionId", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
}
|
||||
cnd.andEX("YEAR(startTime)", "=", year).desc("startTime");
|
||||
List<ActivityTissue> list = activityCultureApplyUserService.dao().query(ActivityTissue.class, cnd);
|
||||
return Result.success(list);
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
cnd.and("ins.state", "=", 20);
|
||||
cnd.andEX("YEAR(tissue.startTime)", "=", year).desc("tissue.startTime");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(activityCultureApplyUserService.list(sql));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -49,6 +49,7 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
|
||||
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
|
||||
@@ -56,16 +57,19 @@ public class ActivityCultureApplyUserServiceImpl extends BaseServiceImpl<Activit
|
||||
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
|
||||
$condition
|
||||
""").setParam("userId", SecurityUtil.getUserId());
|
||||
|
||||
if (Strings.isNotBlank(name)) {
|
||||
cnd.where().andLike("tissue.name", name);
|
||||
}
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
cnd.andEX("YEAR(tissue.startTime)", "=", year);
|
||||
cnd.andEX("tissue.isUnseal", "=", true);
|
||||
cnd.andEX("tissue.activity_type", "=", activity_type);
|
||||
cnd.andEX("tissue.state", "=", 3);
|
||||
cnd.and("tissue.isEnrollSystem", "=", 1);
|
||||
cnd.andEX("tissue.projectTypeCode", "!=", 50004);
|
||||
cnd.andEX("tissue.signUpMethod", "in", List.of(1, 2, 3));
|
||||
|
||||
+21
-2
@@ -58,7 +58,7 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
|
||||
gh.id,
|
||||
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
|
||||
|
||||
|
||||
FROM
|
||||
sys_union gh
|
||||
LEFT JOIN `vw_user` u ON u.unionid = gh.id
|
||||
@@ -85,12 +85,31 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
|
||||
tissue.*,
|
||||
uni.name unionname ,
|
||||
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
|
||||
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 `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
|
||||
""");
|
||||
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ public class ActivityWorksCollectionReadController {
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLUtil.encode("作品征集数据.zip"));
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("up.activityId", "=", pageForm.getActivityId());
|
||||
cnd.andEX("activityId", "=", pageForm.getActivityId());
|
||||
cnd.andEX("typeName", "=", pageForm.getTypeName());
|
||||
if (StrUtil.isAllNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
|
||||
+4
-1
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.activity.workscollection.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -26,6 +27,7 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -56,7 +58,7 @@ public class ActivityWorksCollectionUploadController {
|
||||
*/
|
||||
@At
|
||||
@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("""
|
||||
select
|
||||
up.*,
|
||||
@@ -72,6 +74,7 @@ public class ActivityWorksCollectionUploadController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("userId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("YEAR(co.startDateTime)","=",year);
|
||||
cnd.andEX("up.activityId", "=", activityId);
|
||||
cnd.andEX("up.subjectId", "=", subjectId);
|
||||
cnd.andEX("up.worksId", "=", worksId);
|
||||
|
||||
+4
@@ -9,7 +9,9 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -97,4 +99,6 @@ public class Activity_works_collection_upload extends BaseModel {
|
||||
@NotEmpty(message = "附件不能为空")
|
||||
private List<JSONObject> files;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
@At("/platform/unionReimburse/mine")
|
||||
@Api("工会报销我的")
|
||||
@Ok("json:full")
|
||||
public class UnionReimburseMineController {
|
||||
public class UnionReimburseMineController {
|
||||
|
||||
@Inject
|
||||
private UnionReimburseService unionReimburseService;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ public class H5ChildManageController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childmanage/")
|
||||
@SaCheckPermission("childManage.h5")
|
||||
@SaCheckPermission("h5.childManage")
|
||||
public void index() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
<el-form-item label="是否用于报名" prop="isEnrollSystem">
|
||||
<el-radio-group v-model="formData.isEnrollSystem" size="small">
|
||||
<el-radio border :label="true">活动报名</el-radio>
|
||||
<el-radio border :label="false">活动管理</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -529,6 +528,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
activeName: "1",
|
||||
@@ -613,7 +613,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
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) {
|
||||
this.$message.success("保存成功")
|
||||
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: GetQueryString("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) {
|
||||
if (query) {
|
||||
this.selectLoading = true
|
||||
|
||||
@@ -17,7 +17,7 @@ const ACTIVITY_CULTURE_APPLY_USER = {
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="活动时间">
|
||||
<search-item label="活动名称">
|
||||
<el-input clearable placeholder="请输入活动名称"
|
||||
v-model="pageForm.name"></el-input>
|
||||
</search-item>
|
||||
@@ -132,7 +132,7 @@ const ACTIVITY_CULTURE_APPLY_USER = {
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoActivity.findOne(row.id)
|
||||
this.$refs.infoActivity.onOpen(row)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
|
||||
@@ -38,7 +38,7 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<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>
|
||||
</el-radio-group>
|
||||
@@ -70,89 +70,62 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
||||
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40001">校工会</span>
|
||||
<template scope="{row}" v-else-if="column.prop=='curTaskName'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
{{row.curTaskName}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='state'">
|
||||
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
|
||||
<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 align="center" header-align="center" label="操作"
|
||||
prop="userOnline" width="150px">
|
||||
<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 :loading="row.loading" @click="openAudit(row)" size="mini"
|
||||
type="primary"
|
||||
v-if="row.state===1">
|
||||
审核
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
<template #edit>
|
||||
<activity-culture-info-activity handle label="校工会审核" ref="editInfo">
|
||||
<template #handle>
|
||||
<el-form :model="formData" label-position="right"
|
||||
label-width="120px"
|
||||
style="padding: 20px 0">
|
||||
<el-form-item class="view-header" label="审核信息" label-width="135px">
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</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>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</activity-culture-info-activity>
|
||||
</template>
|
||||
<template #view>
|
||||
<activity-culture-info-activity ref="infoActivity"></activity-culture-info-activity>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
`,
|
||||
props: {
|
||||
@@ -166,12 +139,13 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
return {
|
||||
subDis: false,
|
||||
unionList: [],
|
||||
showApprovalForm: false,
|
||||
auditList: [
|
||||
{ code: true, name: "已审核" },
|
||||
{ code: false, name: "未审核" }
|
||||
],
|
||||
pageForm: {
|
||||
state: false,
|
||||
approval: false,
|
||||
year: new Date().getFullYear() + ""
|
||||
},
|
||||
tableColumns: [
|
||||
@@ -181,7 +155,6 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
{ prop: "tussueName", label: "举办单位" },
|
||||
{ prop: "time", label: "活动日期" },
|
||||
{ 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
|
||||
},
|
||||
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) {
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editInfo.findOne(row.id)
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
username: this.$store.state.user.username,
|
||||
auditTime: this.$moment().format("YYYY-MM-DD")
|
||||
}
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.editInfo.onOpen(row)
|
||||
})
|
||||
|
||||
},
|
||||
openView(row) {
|
||||
const { id } = row
|
||||
this.$refs.guava.view()
|
||||
this.$refs.infoActivity.findOne(id)
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.editInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
@@ -233,9 +190,50 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
}
|
||||
})
|
||||
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() {
|
||||
// 根据 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.pageData()
|
||||
}
|
||||
|
||||
@@ -1,123 +1,129 @@
|
||||
const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-tabs tab-position="top" v-loading="loading" v-model="activeName">
|
||||
<el-tab-pane label="活动基础信息" name="1">
|
||||
<el-descriptions :column="3" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="活动名称" span="3">
|
||||
<span class="item-center"> {{ viewData.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="3" border class="margin-top" style="margin: 10px" title="">
|
||||
<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">
|
||||
{{ viewData.username }}
|
||||
({{ viewData.loginname }})</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
{{ viewData.mobile }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动编号">
|
||||
{{ viewData.activityCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动项目类型">
|
||||
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型" :span="2">
|
||||
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ? '分工会活动'
|
||||
:
|
||||
'协会/社团活动' }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="活动计划时间">-->
|
||||
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="活动时间">
|
||||
{{ viewData.startTime + ' - ' + viewData.endTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间" v-if="viewData.applyStartTime">
|
||||
{{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数">
|
||||
{{ viewData.peopleNum || '暂无' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地点">
|
||||
{{ viewData.address }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名方式">
|
||||
<span v-if="viewData.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
|
||||
<span v-else-if="!viewData.signUpMethod">无需报名</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否用于报名">
|
||||
<span v-if="viewData.isEnrollSystem">活动报名</span>
|
||||
<span v-else>活动管理</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null">
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
{{ viewData.mobile }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动编号">
|
||||
{{ viewData.activityCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动项目类型">
|
||||
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型" :span="2">
|
||||
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ?
|
||||
'分工会活动'
|
||||
:
|
||||
'协会/社团活动' }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="活动计划时间">-->
|
||||
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="活动时间">
|
||||
{{ viewData.startTime + ' - ' + viewData.endTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间" v-if="viewData.applyStartTime">
|
||||
{{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数">
|
||||
{{ viewData.peopleNum || '暂无' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地点">
|
||||
{{ viewData.address }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名方式">
|
||||
<span v-if="viewData.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
|
||||
<span v-else-if="!viewData.signUpMethod">无需报名</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否用于报名">
|
||||
<span v-if="viewData.isEnrollSystem">活动报名</span>
|
||||
<span v-else>活动管理</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null">
|
||||
<span v-if="viewData.userNumberLimit===1">总人数限制({{
|
||||
viewData.totalUserNumberLimit
|
||||
}}人)</span>
|
||||
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
|
||||
<span v-else-if="!viewData.userNumberLimit">不限制</span>
|
||||
</el-descriptions-item>
|
||||
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
|
||||
<span v-else-if="!viewData.userNumberLimit">不限制</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2">
|
||||
<el-table :data="viewData.unionUserNumberLimit" border height="500" size="small"
|
||||
stripe>
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="100">
|
||||
</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="limitNum"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2">
|
||||
<el-table :data="viewData.unionUserNumberLimit" border height="500" size="small"
|
||||
stripe>
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="100">
|
||||
</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="limitNum"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="封面图" span="3">
|
||||
<img :src="viewData.cover"
|
||||
class="avatar"
|
||||
style="height: 200px;width: auto" v-if="viewData.cover">
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="封面图" span="3">
|
||||
<img :src="viewData.cover"
|
||||
class="avatar"
|
||||
style="height: 200px;width: auto" v-if="viewData.cover">
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动内容" span="3">
|
||||
<div v-html="viewData.activityContent"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动费用" name="2" v-if="!viewData.isEnrollSystem">
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动总结" name="3" v-if="!viewData.isEnrollSystem">
|
||||
<el-form label-width="120px" ref="form">
|
||||
<el-form-item label="活动总结" prop="activitySummary">
|
||||
{{ viewData.activitySummary }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="审核信息" name="4" v-if="viewData.auditId">
|
||||
<el-form label-width="120px" ref="form">
|
||||
<el-descriptions-item label="活动内容" span="3">
|
||||
<div v-html="viewData.activityContent"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<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-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.audit.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.audit.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见:">
|
||||
{{ viewData.audit.auditOpinion }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="label" name="999" v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
styles: [
|
||||
`
|
||||
.item-center {
|
||||
@@ -127,20 +133,13 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
}
|
||||
`
|
||||
],
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: "审核"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
userData: [],
|
||||
viewData: {},
|
||||
row: null,
|
||||
doneTasks: [],
|
||||
loading: true,
|
||||
search: "",
|
||||
tableKey: "",
|
||||
@@ -148,15 +147,9 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hasPane(name) {
|
||||
if (!this.handle) {
|
||||
return true
|
||||
}
|
||||
return this.panes.includes(name)
|
||||
},
|
||||
async findOne(id) {
|
||||
async findOne() {
|
||||
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
|
||||
if (data) {
|
||||
data.billFiles = JSON.parse(data.billFiles)
|
||||
@@ -172,8 +165,28 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
this.viewData = {}
|
||||
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>
|
||||
|
||||
@@ -66,18 +66,23 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-switch>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
||||
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40001">校工会</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='state'">
|
||||
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
|
||||
<template scope="{row}" v-else-if="column.prop=='taskName'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
{{row.taskName}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</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 align="center" header-align="center" label="操作"
|
||||
prop="userOnline" width="150px">
|
||||
<template slot-scope="{row}">
|
||||
@@ -92,10 +97,15 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'edit',row}"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
:disabled="row.projectTypeCode==50004">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
<el-dropdown-item v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId" >
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'openCode',row}">
|
||||
@@ -155,9 +165,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
{prop: "time2", label: "报名日期", width: "300"},
|
||||
{prop: "applyTime", label: "创建时间", sortable: true},
|
||||
{prop: "isUnseal", label: "是否开启"},
|
||||
{prop: "state", label: "审核状态", sortable: true}
|
||||
|
||||
],
|
||||
],
|
||||
url: ""
|
||||
}
|
||||
},
|
||||
@@ -182,7 +190,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === "view") {
|
||||
this.openView(row)
|
||||
this.onView(row)
|
||||
} else if (type === "edit") {
|
||||
this.openEdit(row)
|
||||
} else if (type === "delete") {
|
||||
@@ -203,9 +211,9 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
this.$refs.applyActivity.openEdit(row.id)
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoActivity.findOne(row.id)
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.infoActivity.onOpen(row)
|
||||
})
|
||||
},
|
||||
doDelete(row) {
|
||||
@@ -222,6 +230,20 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
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() {
|
||||
this.tableLoading = true
|
||||
this.pageForm.activity_type = this.activity_type
|
||||
@@ -235,6 +257,13 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
// 根据 activity_type 动态添加流程相关列
|
||||
if (this.activity_type === 40002 || this.activity_type === 40003) {
|
||||
this.tableColumns.push(
|
||||
{prop: "taskName", label: "当前节点"},
|
||||
{prop: "instanceState", label: "流程状态"}
|
||||
);
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user