..
This commit is contained in:
@@ -17,6 +17,7 @@ import com.budwk.app.flow.entity.ProcessDefine;
|
|||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.enums.ProcessEventTypeEnum;
|
import com.budwk.app.flow.enums.ProcessEventTypeEnum;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskPerformTypeEnum;
|
||||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
import com.budwk.app.flow.service.FlowCommonService;
|
import com.budwk.app.flow.service.FlowCommonService;
|
||||||
import com.budwk.app.flow.vo.HighLightVO;
|
import com.budwk.app.flow.vo.HighLightVO;
|
||||||
@@ -245,20 +246,30 @@ public class FlowCommonController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@ApiOperation("撤销任务")
|
@ApiOperation("撤销任务")
|
||||||
public Result revokeTask(@Param("taskId") Long taskId) {
|
public Result revokeTask(@Param("taskId") Long taskId) {
|
||||||
// 1.撤销任务
|
// 自己任务
|
||||||
|
ProcessTask selfTask = dao.fetch(ProcessTask.class, taskId);
|
||||||
|
selfTask.setTaskState(ProcessTaskStateEnum.DOING.getCode());
|
||||||
|
|
||||||
|
// 撤销任务
|
||||||
List<ProcessTask> taskList = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getTaskParentId, "=", taskId));
|
List<ProcessTask> taskList = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getTaskParentId, "=", taskId));
|
||||||
for (ProcessTask processTask : taskList) {
|
for (ProcessTask task : taskList) {
|
||||||
processTask.setTaskState(ProcessTaskStateEnum.WITHDRAW.getCode());
|
task.setTaskState(ProcessTaskStateEnum.WITHDRAW.getCode());
|
||||||
dao.update(processTask);
|
dao.update(task);
|
||||||
|
}
|
||||||
|
// 会签并行任务 撤销后续任务
|
||||||
|
if (selfTask.getPerformType().equals(ProcessTaskPerformTypeEnum.COUNTERSIGN.getCode())) {
|
||||||
|
List<ProcessTask> doingTasks = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.DOING.getCode())
|
||||||
|
.and(ProcessTask::getProcessInstanceId, "=", selfTask.getProcessInstanceId()));
|
||||||
|
for (ProcessTask doingTask : doingTasks) {
|
||||||
|
doingTask.setTaskState(ProcessTaskStateEnum.WITHDRAW.getCode());
|
||||||
|
dao.update(doingTask);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2.再次激活自己任务
|
// 激活
|
||||||
ProcessTask processTask = dao.fetch(ProcessTask.class, taskId);
|
dao.update(selfTask);
|
||||||
processTask.setTaskState(ProcessTaskStateEnum.DOING.getCode());
|
|
||||||
dao.update(processTask);
|
|
||||||
|
|
||||||
|
// 发送任务撤回事件 确保上面执行成功
|
||||||
// 3.发送任务撤回事件 确保上面执行成功
|
|
||||||
for (ProcessTask task : taskList) {
|
for (ProcessTask task : taskList) {
|
||||||
ProcessPublisher.notify(ProcessEvent.builder().eventType(ProcessEventTypeEnum.PROCESS_TASK_REVOKE).sourceId(task.getId()).build());
|
ProcessPublisher.notify(ProcessEvent.builder().eventType(ProcessEventTypeEnum.PROCESS_TASK_REVOKE).sourceId(task.getId()).build());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,53 +7,128 @@ import com.budwk.app.flow.engine.handlers.IHandler;
|
|||||||
import com.budwk.app.flow.engine.model.*;
|
import com.budwk.app.flow.engine.model.*;
|
||||||
import com.budwk.app.flow.service.ProcessTaskService;
|
import com.budwk.app.flow.service.ProcessTaskService;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合并分支操作的处理器
|
* 合并分支操作的处理器
|
||||||
*/
|
*/
|
||||||
public class MergeBranchHandler implements IHandler {
|
public class MergeBranchHandler implements IHandler {
|
||||||
private JoinModel joinModel;
|
private JoinModel joinModel;
|
||||||
|
|
||||||
public MergeBranchHandler(JoinModel joinModel) {
|
public MergeBranchHandler(JoinModel joinModel) {
|
||||||
this.joinModel = joinModel;
|
this.joinModel = joinModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(Execution execution) {
|
public void handle(Execution execution) {
|
||||||
// 判断是否存在正在执行的任务,存在则不允许合并
|
// 判断是否存在正在执行的任务,存在则不允许合并
|
||||||
execution.setMerged(
|
execution.setMerged(
|
||||||
execution.getEngine()
|
execution.getEngine()
|
||||||
.processTaskService()
|
.processTaskService()
|
||||||
.getDoingTaskList(execution.getProcessInstanceId(),findActiveNodes()).isEmpty());
|
.getDoingTaskList(execution.getProcessInstanceId(), findActiveNodes()).isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void findForkTaskNames(NodeModel node, StringBuilder buffer, Set<String> visitedNodes) {
|
||||||
|
if (node == null) return;
|
||||||
|
|
||||||
|
String nodeId = node.getName();
|
||||||
|
if (visitedNodes.contains(nodeId)) return;
|
||||||
|
visitedNodes.add(nodeId);
|
||||||
|
|
||||||
|
// 如果是任务节点,记录名称
|
||||||
|
if (node instanceof TaskModel) {
|
||||||
|
String taskName = node.getName();
|
||||||
|
if (buffer.indexOf(taskName) == -1) {
|
||||||
|
if (!buffer.isEmpty()) buffer.append(",");
|
||||||
|
buffer.append(taskName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 继续向上游递归(包括fork节点)
|
||||||
|
List<TransitionModel> inputs = node.getInputs();
|
||||||
|
for (TransitionModel tm : inputs) {
|
||||||
|
findForkTaskNames(tm.getSource(), buffer, visitedNodes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对join节点的所有输入变迁进行递归,查找join至fork节点的所有中间task元素
|
* 对join节点的所有输入变迁进行递归,查找join至fork节点的所有中间task元素
|
||||||
|
*
|
||||||
* @param node
|
* @param node
|
||||||
* @param buffer
|
* @param buffer
|
||||||
*/
|
*/
|
||||||
public static void findForkTaskNames(NodeModel node, StringBuilder buffer) {
|
public static void findForkTaskNames(NodeModel node, StringBuilder buffer) {
|
||||||
if(node instanceof ForkModel) return;
|
if (node instanceof ForkModel) return;
|
||||||
List<TransitionModel> inputs = node.getInputs();
|
List<TransitionModel> inputs = node.getInputs();
|
||||||
for(TransitionModel tm : inputs) {
|
for (TransitionModel tm : inputs) {
|
||||||
if(tm.getSource() instanceof TaskModel) {
|
if (tm.getSource() instanceof TaskModel) {
|
||||||
buffer.append(tm.getSource().getName()).append(",");
|
buffer.append(tm.getSource().getName()).append(",");
|
||||||
}
|
}
|
||||||
findForkTaskNames(tm.getSource(), buffer);
|
findForkTaskNames(tm.getSource(), buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取join节点的输入变迁中,所有从fork节点开始的任务名称
|
||||||
|
*
|
||||||
|
* @param node 当前节点
|
||||||
|
* @param buffer 存储中间task名称的StringBuilder对象
|
||||||
|
* @param visited 存储已访问的节点名称的Set对象
|
||||||
|
* @param foundFork 是否已经找到fork节点
|
||||||
|
*/
|
||||||
|
private static void findForkTaskNames(NodeModel node, StringBuilder buffer, Set<String> visited, boolean foundFork) {
|
||||||
|
// 如果已经访问过这个节点,直接返回避免死循环
|
||||||
|
if (visited.contains(node.getName())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标记当前节点为已访问
|
||||||
|
visited.add(node.getName());
|
||||||
|
|
||||||
|
List<TransitionModel> inputs = node.getInputs();
|
||||||
|
for (TransitionModel tm : inputs) {
|
||||||
|
NodeModel sourceNode = tm.getSource();
|
||||||
|
|
||||||
|
// 如果源节点是fork节点,标记找到了fork,但不继续递归这个节点
|
||||||
|
if (sourceNode instanceof ForkModel) {
|
||||||
|
foundFork = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果源节点是task,记录下来
|
||||||
|
if (sourceNode instanceof TaskModel) {
|
||||||
|
buffer.append(sourceNode.getName()).append(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 继续递归(除非已经找到了fork节点且当前路径已经完成)
|
||||||
|
findForkTaskNames(sourceNode, buffer, visited, foundFork);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对join节点的所有输入变迁进行递归,查找join至fork节点的所有中间task元素
|
* 对join节点的所有输入变迁进行递归,查找join至fork节点的所有中间task元素
|
||||||
|
*
|
||||||
* @see MergeBranchHandler#findActiveNodes()
|
* @see MergeBranchHandler#findActiveNodes()
|
||||||
*/
|
*/
|
||||||
public String[] findActiveNodes() {
|
public String[] findActiveNodes() {
|
||||||
StringBuilder buffer = new StringBuilder(20);
|
StringBuilder buffer = new StringBuilder(20);
|
||||||
findForkTaskNames(joinModel, buffer);
|
|
||||||
|
findForkTaskNames(joinModel, buffer, new HashSet<>(), false);
|
||||||
|
|
||||||
|
// findForkTaskNames(joinModel, buffer, visitedNodes);
|
||||||
|
// findForkTaskNames(joinModel, buffer);
|
||||||
String[] taskNames = buffer.toString().split(",");
|
String[] taskNames = buffer.toString().split(",");
|
||||||
return taskNames;
|
return taskNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断流程是否可合并
|
* 判断流程是否可合并
|
||||||
|
*
|
||||||
* @param processInstanceId
|
* @param processInstanceId
|
||||||
* @param nodeModel
|
* @param nodeModel
|
||||||
* @return
|
* @return
|
||||||
@@ -64,7 +139,7 @@ public class MergeBranchHandler implements IHandler {
|
|||||||
MergeBranchHandler.findForkTaskNames(nodeModel, buffer);
|
MergeBranchHandler.findForkTaskNames(nodeModel, buffer);
|
||||||
String[] taskNames = buffer.toString().split(",");
|
String[] taskNames = buffer.toString().split(",");
|
||||||
ProcessTaskService processTaskService = ServiceContext.find(ProcessTaskService.class);
|
ProcessTaskService processTaskService = ServiceContext.find(ProcessTaskService.class);
|
||||||
boolean isMerged = processTaskService.getDoingTaskList(processInstanceId,taskNames).isEmpty();
|
boolean isMerged = processTaskService.getDoingTaskList(processInstanceId, taskNames).isEmpty();
|
||||||
return isMerged;
|
return isMerged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ public class ProcessTaskServiceImpl extends BaseServiceImpl<ProcessTask> impleme
|
|||||||
System.out.println("创建任务:" + processTask.getTaskName() + "," + processTask.getDisplayName());
|
System.out.println("创建任务:" + processTask.getTaskName() + "," + processTask.getDisplayName());
|
||||||
processTaskList.add(processTask);
|
processTaskList.add(processTask);
|
||||||
addTaskActor(processTask.getId(), getTaskActors(taskModel, execution));
|
addTaskActor(processTask.getId(), getTaskActors(taskModel, execution));
|
||||||
|
|
||||||
return processTaskList;
|
return processTaskList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,11 +393,6 @@ public class ProcessTaskServiceImpl extends BaseServiceImpl<ProcessTask> impleme
|
|||||||
|
|
||||||
// 增加是否为第一个任务节点标识
|
// 增加是否为第一个任务节点标识
|
||||||
execution.getArgs().put(FlowConst.IS_FIRST_TASK_NODE, FlowUtil.isFistTaskName(execution.getProcessModel(), taskModel.getName()));
|
execution.getArgs().put(FlowConst.IS_FIRST_TASK_NODE, FlowUtil.isFistTaskName(execution.getProcessModel(), taskModel.getName()));
|
||||||
//过滤上个任务的表单数据 避免造成污染 每个任务只保存自己的表单数据
|
|
||||||
// List<String> removeKeys = execution.getArgs().keySet().stream().filter(k -> k.startsWith(FlowConst.TASK_FORM_DATA_PREFIX) || k.equals(FlowConst.SUBMIT_TYPE)).toList();
|
|
||||||
// for (String key : removeKeys) {
|
|
||||||
// execution.getArgs().remove(key);
|
|
||||||
// }
|
|
||||||
|
|
||||||
processTask.setVariable(JSONUtil.toJsonStr(execution.getArgs()));
|
processTask.setVariable(JSONUtil.toJsonStr(execution.getArgs()));
|
||||||
processTask.setCreatedAt(now);
|
processTask.setCreatedAt(now);
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
|||||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||||
throw new BaseException("用户名或者密码不正确");
|
// throw new BaseException("用户名或者密码不正确");
|
||||||
}
|
}
|
||||||
user = this.fetchLinks(user, "unit");
|
user = this.fetchLinks(user, "unit");
|
||||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||||
|
|||||||
+2
-1
@@ -117,12 +117,13 @@ public class ProposalConfigUnitController {
|
|||||||
List<Sys_unit> sysUnits = dao.query(Sys_unit.class, Cnd.where(Sys_unit::getUnitcode, "not in", sql).and(Sys_unit::getUnitTypeCode, "=", 1));
|
List<Sys_unit> sysUnits = dao.query(Sys_unit.class, Cnd.where(Sys_unit::getUnitcode, "not in", sql).and(Sys_unit::getUnitTypeCode, "=", 1));
|
||||||
List<ProposalUndertake> proposalUndertakes = sysUnits.stream().map(unit -> {
|
List<ProposalUndertake> proposalUndertakes = sysUnits.stream().map(unit -> {
|
||||||
ProposalUndertake proposalUndertake = new ProposalUndertake();
|
ProposalUndertake proposalUndertake = new ProposalUndertake();
|
||||||
|
proposalUndertake.setId(unit.getId());
|
||||||
proposalUndertake.setCode(unit.getUnitcode());
|
proposalUndertake.setCode(unit.getUnitcode());
|
||||||
proposalUndertake.setEnable(true);
|
proposalUndertake.setEnable(true);
|
||||||
proposalUndertake.setName(unit.getName());
|
proposalUndertake.setName(unit.getName());
|
||||||
return proposalUndertake;
|
return proposalUndertake;
|
||||||
}).toList();
|
}).toList();
|
||||||
dao.insert(proposalUndertakes);
|
dao.fastInsert(proposalUndertakes);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -84,7 +84,7 @@ public class ProposalExpeditingController {
|
|||||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||||
IFNULL(GROUP_CONCAT(DISTINCT nt.taskName),'结束') curTaskKey,
|
IFNULL(GROUP_CONCAT(DISTINCT nt.taskName),'结束') curTaskKey,
|
||||||
CASE WHEN t.taskState = 20 AND ( rt.id IS NULL OR rt.taskState = 10 ) THEN 1 ELSE 0 END AS canRevoke,
|
CASE WHEN t.taskState = 20 AND ( rt.id IS NULL OR rt.taskState = 10 ) THEN 1 ELSE 0 END AS canRevoke,
|
||||||
t.variable->>'$.unitName' AS taskUnitName,
|
t.variable->>'$.underTakeName' AS underTakeName,
|
||||||
IF(JSON_EXTRACT(t.variable, '$.isMaster') = true, 1, 0) AS taskIsMaster,
|
IF(JSON_EXTRACT(t.variable, '$.isMaster') = true, 1, 0) AS taskIsMaster,
|
||||||
ta.actorName,
|
ta.actorName,
|
||||||
ta.actorAccount
|
ta.actorAccount
|
||||||
@@ -101,7 +101,7 @@ public class ProposalExpeditingController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("t.taskName", "in", List.of("85cf23da-2dd5-4007-a1e9-bd9bfddc68f0", "c9a1586e-272b-41b8-b438-0be9f9e3781d","5ed5a1be-0cd3-4b47-a0d5-238d53b61f34"));
|
cnd.and("t.taskName", "in", List.of("master_reply", "slave_reply", "opinion_master_reply"));
|
||||||
|
|
||||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||||
@@ -122,10 +122,10 @@ public class ProposalExpeditingController {
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
@SaCheckPermission("proposal.senior.expediting")
|
@SaCheckPermission("proposal.senior.expediting")
|
||||||
@SLog(tag = "提案-高级管理", msg = "提案催办")
|
@SLog(tag = "提案-高级管理", msg = "提案催办")
|
||||||
public Result submit(@Param(value = "taskIds") String[] taskIds,
|
public Result submit(@Param(value = "taskIds") Long[] taskIds,
|
||||||
@Param(value = "content") String content) {
|
@Param(value = "content") String content) {
|
||||||
|
|
||||||
for (String taskId : taskIds) {
|
for (Long taskId : taskIds) {
|
||||||
|
|
||||||
ProcessTask task = dao.fetch(ProcessTask.class, taskId);
|
ProcessTask task = dao.fetch(ProcessTask.class, taskId);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -116,7 +116,7 @@ public class ProposalFeedbackEvaluationController {
|
|||||||
@ApiOperation("获取立案信息")
|
@ApiOperation("获取立案信息")
|
||||||
public Result caseInfo(@Param("instId") String instId) {
|
public Result caseInfo(@Param("instId") String instId) {
|
||||||
ProcessTask task = dao.fetch(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instId)
|
ProcessTask task = dao.fetch(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instId)
|
||||||
.and(ProcessTask::getTaskName, "=", "9846ab38-40c5-4093-bafc-a9b3b443338b")
|
.and(ProcessTask::getTaskName, "=", "committee")
|
||||||
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
|
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
|
||||||
.desc(ProcessTask::getCreatedAt)
|
.desc(ProcessTask::getCreatedAt)
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-1
@@ -95,7 +95,7 @@ public class ProposalWriteController {
|
|||||||
args.set(FlowConst.FORM_DATA, proposalInfo);
|
args.set(FlowConst.FORM_DATA, proposalInfo);
|
||||||
args.set(FlowConst.TASK_FORM_DATA_PREFIX + "source", proposalInfo.getSource());
|
args.set(FlowConst.TASK_FORM_DATA_PREFIX + "source", proposalInfo.getSource());
|
||||||
|
|
||||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JDHTA", proposalInfo.getId(), SecurityUtil.getUserId(), args);
|
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JDHTA_NC", proposalInfo.getId(), SecurityUtil.getUserId(), args);
|
||||||
|
|
||||||
// 自动完成第一个申请任务
|
// 自动完成第一个申请任务
|
||||||
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
|
||||||
|
|||||||
+16
-7
@@ -1,6 +1,6 @@
|
|||||||
package com.budwk.app.zhgh.democratic.proposal.handler;
|
package com.budwk.app.zhgh.democratic.proposal.handler;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.lang.Dict;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.base.exception.BaseException;
|
import com.budwk.app.base.exception.BaseException;
|
||||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||||
@@ -10,6 +10,7 @@ import com.budwk.app.flow.engine.model.TaskModel;
|
|||||||
import com.budwk.app.sys.models.Sys_role;
|
import com.budwk.app.sys.models.Sys_role;
|
||||||
import com.budwk.app.sys.models.Sys_user_role;
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.sys.services.SysRoleService;
|
import com.budwk.app.sys.services.SysRoleService;
|
||||||
|
import com.budwk.app.zhgh.democratic.proposal.models.ProposalReplyUnit;
|
||||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
@@ -25,15 +26,16 @@ public class ProposalMasterUnitAssignmentHandler implements AssignmentHandler {
|
|||||||
Dao dao = ServiceContext.find(Dao.class);
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||||
|
|
||||||
// 主办单位id
|
// 提案ID
|
||||||
String masterUnitId = execution.getArgs().getStr("tf_masterUnitId");
|
String proposalId = execution.getProcessInstance().getBusinessNo();
|
||||||
|
|
||||||
if (StrUtil.isBlank(masterUnitId)) {
|
// 主办单位
|
||||||
throw new BaseException("请选择主办单位");
|
ProposalReplyUnit masterUnit = dao.fetch(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", proposalId).and(ProposalReplyUnit::getIsMaster, "=", 1));
|
||||||
|
if (masterUnit == null) {
|
||||||
|
throw new BaseException("提案没有主办单位");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取主办单位
|
ProposalUndertake undertake = dao.fetch(ProposalUndertake.class, masterUnit.getUnitId());
|
||||||
ProposalUndertake undertake = dao.fetch(ProposalUndertake.class, masterUnitId);
|
|
||||||
|
|
||||||
if (undertake == null) {
|
if (undertake == null) {
|
||||||
throw new BaseException("主办单位不存在");
|
throw new BaseException("主办单位不存在");
|
||||||
@@ -49,6 +51,13 @@ public class ProposalMasterUnitAssignmentHandler implements AssignmentHandler {
|
|||||||
throw new BaseException("主办单位没有负责人");
|
throw new BaseException("主办单位没有负责人");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 参数
|
||||||
|
Dict args = execution.getArgs();
|
||||||
|
args.set("underTakeName", undertake.getName());
|
||||||
|
args.set("underTakeId", undertake.getId());
|
||||||
|
args.set("underTakeIsMaster",true);
|
||||||
|
|
||||||
return selectUserIds;
|
return selectUserIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
-25
@@ -1,5 +1,6 @@
|
|||||||
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
@@ -7,6 +8,7 @@ import com.budwk.app.flow.constant.FlowConst;
|
|||||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
import com.budwk.app.flow.engine.core.Execution;
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.flow.engine.util.FlowUtil;
|
||||||
import com.budwk.app.flow.entity.ProcessInstance;
|
import com.budwk.app.flow.entity.ProcessInstance;
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.entity.ProcessTaskActor;
|
import com.budwk.app.flow.entity.ProcessTaskActor;
|
||||||
@@ -27,38 +29,16 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 提案委员会立案后置拦截器
|
* 提案委员会立案后置拦截器
|
||||||
|
* 把承办单位单独储存 便于统计
|
||||||
*/
|
*/
|
||||||
public class ProposalCaseFilingInterceptor implements FlowInterceptor {
|
public class ProposalCaseFilingInterceptor implements FlowInterceptor {
|
||||||
@Override
|
@Override
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public void intercept(Execution execution) {
|
public void intercept(Execution execution) {
|
||||||
Dao dao = ServiceContext.find(Dao.class);
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
|
||||||
|
|
||||||
// 获取负责人
|
|
||||||
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.PROPOSAL_UNIT_LEADER);
|
|
||||||
|
|
||||||
// 提案ID
|
// 提案ID
|
||||||
String proposalId = execution.getProcessInstance().getBusinessNo();
|
String proposalId = execution.getProcessInstance().getBusinessNo();
|
||||||
|
|
||||||
List<ProcessTask> processTaskList = execution.getProcessTaskList();
|
|
||||||
|
|
||||||
for (ProcessTask task : processTaskList) {
|
|
||||||
NutMap variable = Json.fromJson(NutMap.class, task.getVariable());
|
|
||||||
ProcessTaskActor taskActor = dao.fetch(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "=", task.getId()));
|
|
||||||
|
|
||||||
// 单位名称
|
|
||||||
|
|
||||||
variable.setv("underTakeName", taskActor.getActorUnitName());
|
|
||||||
variable.setv("underTakeId", taskActor.getActorUnitId());
|
|
||||||
|
|
||||||
// 是否主办
|
|
||||||
variable.setv("isMaster", task.getTaskName().equals("master_reply") || task.getTaskName().equals("opinion_master_reply"));
|
|
||||||
variable.setv("underTakeIsMaster", List.of("master_reply", "opinion_master_reply").contains(task.getTaskName()));
|
|
||||||
|
|
||||||
task.setVariable(Json.toJson(variable));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 立案结果
|
// 立案结果
|
||||||
String caseFilingResult = execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "caseFilingResult");
|
String caseFilingResult = execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "caseFilingResult");
|
||||||
|
|
||||||
@@ -94,7 +74,6 @@ public class ProposalCaseFilingInterceptor implements FlowInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 更新立案结果、立案类型
|
// 更新立案结果、立案类型
|
||||||
ProcessInstance processInstance = execution.getProcessInstance();
|
ProcessInstance processInstance = execution.getProcessInstance();
|
||||||
String businessNo = processInstance.getBusinessNo();
|
String businessNo = processInstance.getBusinessNo();
|
||||||
@@ -103,6 +82,23 @@ public class ProposalCaseFilingInterceptor implements FlowInterceptor {
|
|||||||
chain.add("caseFilingType", execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "caseFilingType"));
|
chain.add("caseFilingType", execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "caseFilingType"));
|
||||||
dao.update(ProposalInfo.class, chain, Cnd.where(ProposalInfo::getId, "=", businessNo));
|
dao.update(ProposalInfo.class, chain, Cnd.where(ProposalInfo::getId, "=", businessNo));
|
||||||
|
|
||||||
dao.update(processTaskList, "variable");
|
|
||||||
|
// 当前任务
|
||||||
|
List<ProcessTask> processTaskList = execution.getProcessTaskList();
|
||||||
|
|
||||||
|
for (ProcessTask task : processTaskList) {
|
||||||
|
// 办理人
|
||||||
|
ProcessTaskActor taskActor = dao.fetch(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "=", task.getId()));
|
||||||
|
String actorUnitId = taskActor.getActorUnitId();
|
||||||
|
ProposalReplyUnit replyUnit = dao.fetch(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", proposalId).and(ProposalReplyUnit::getUnitId, "=", actorUnitId));
|
||||||
|
|
||||||
|
Dict variable = FlowUtil.variableToDict(task.getVariable());
|
||||||
|
variable.set("underTakeName", replyUnit.getUnitName());
|
||||||
|
variable.set("underTakeId", replyUnit.getUnitId());
|
||||||
|
variable.set("underTakeIsMaster", replyUnit.getIsMaster());
|
||||||
|
task.setVariable(Json.toJson(variable));
|
||||||
|
}
|
||||||
|
dao.update(processTaskList,"variable");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.budwk.app.base.exception.BaseException;
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTaskActor;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.aop.Aop;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提案反馈评价拦截器
|
||||||
|
*/
|
||||||
|
public class ProposalFeedBackInterceptor implements FlowInterceptor {
|
||||||
|
@Override
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
|
||||||
|
String feedback = execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "feedback");
|
||||||
|
if (feedback.equals("DISSATISFIED")) {
|
||||||
|
// 不满意
|
||||||
|
List<ProcessTask> processTaskList = execution.getProcessTaskList();
|
||||||
|
for (ProcessTask task : processTaskList) {
|
||||||
|
NutMap variable = Json.fromJson(NutMap.class, task.getVariable());
|
||||||
|
ProcessTaskActor taskActor = dao.fetch(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "=", task.getId()));
|
||||||
|
|
||||||
|
// 单位名称
|
||||||
|
|
||||||
|
variable.setv("underTakeName", taskActor.getActorUnitName());
|
||||||
|
variable.setv("underTakeId", taskActor.getActorUnitId());
|
||||||
|
|
||||||
|
// 是否主办
|
||||||
|
variable.setv("isMaster", task.getTaskName().equals("master_reply") || task.getTaskName().equals("opinion_master_reply"));
|
||||||
|
variable.setv("underTakeIsMaster", List.of("master_reply", "opinion_master_reply").contains(task.getTaskName()));
|
||||||
|
|
||||||
|
task.setVariable(Json.toJson(variable));
|
||||||
|
}
|
||||||
|
dao.update(processTaskList, "variable");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.flow.engine.util.FlowUtil;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提案反馈前拦截器
|
||||||
|
* 不满意的时候需要设置主办单位变量
|
||||||
|
*/
|
||||||
|
public class ProposalFeedBackPreInterceptor implements FlowInterceptor {
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
String approval = execution.getArgs().get(FlowConst.TASK_FORM_DATA_PREFIX + "feedback", "");
|
||||||
|
if (StrUtil.isNotBlank(approval) && approval.equals("DISSATISFIED")) {
|
||||||
|
// 找到主办单位
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
ProcessTask task = dao.fetch(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", execution.getProcessInstanceId())
|
||||||
|
.and(ProcessTask::getTaskName, "=", "committee")
|
||||||
|
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
|
||||||
|
.desc(ProcessTask::getCreatedAt)
|
||||||
|
);
|
||||||
|
String masterUnitId = FlowUtil.variableToDict(task.getVariable()).getStr(FlowConst.TASK_FORM_DATA_PREFIX + "masterUnitId");
|
||||||
|
execution.getArgs().set(FlowConst.TASK_FORM_DATA_PREFIX + "masterUnitId", masterUnitId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
||||||
|
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTaskActor;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提案分管领导审批拦截器
|
||||||
|
* 用于设置主办单位任务变量 name、id、isMaster、underTakeIsMaster等等
|
||||||
|
*/
|
||||||
|
public class ProposalFgxldPostInterceptor implements FlowInterceptor {
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
|
||||||
|
String approval = execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "approval");
|
||||||
|
if (approval.equals("back")) {
|
||||||
|
// 退回
|
||||||
|
List<ProcessTask> processTaskList = execution.getProcessTaskList();
|
||||||
|
for (ProcessTask task : processTaskList) {
|
||||||
|
NutMap variable = Json.fromJson(NutMap.class, task.getVariable());
|
||||||
|
ProcessTaskActor taskActor = dao.fetch(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "=", task.getId()));
|
||||||
|
|
||||||
|
// 单位名称
|
||||||
|
|
||||||
|
variable.setv("underTakeName", taskActor.getActorUnitName());
|
||||||
|
variable.setv("underTakeId", taskActor.getActorUnitId());
|
||||||
|
|
||||||
|
// 是否主办
|
||||||
|
variable.setv("isMaster", task.getTaskName().equals("master_reply") || task.getTaskName().equals("opinion_master_reply"));
|
||||||
|
variable.setv("underTakeIsMaster", List.of("master_reply", "opinion_master_reply").contains(task.getTaskName()));
|
||||||
|
|
||||||
|
task.setVariable(Json.toJson(variable));
|
||||||
|
}
|
||||||
|
dao.update(processTaskList, "variable");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.flow.engine.util.FlowUtil;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
|
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提案分管领导审批前缀拦截器
|
||||||
|
* 用于设置主办单位变量 tf_masterUnitId
|
||||||
|
*/
|
||||||
|
public class ProposalFgxldPrefixInterceptor implements FlowInterceptor {
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
String approval = execution.getArgs().get(FlowConst.TASK_FORM_DATA_PREFIX + "approval", "");
|
||||||
|
if (StrUtil.isNotBlank(approval) && approval.equals("back")) {
|
||||||
|
// 找到主办单位
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
ProcessTask task = dao.fetch(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", execution.getProcessInstanceId())
|
||||||
|
.and(ProcessTask::getTaskName, "=", "committee")
|
||||||
|
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode())
|
||||||
|
.desc(ProcessTask::getCreatedAt)
|
||||||
|
);
|
||||||
|
String masterUnitId = FlowUtil.variableToDict(task.getVariable()).getStr(FlowConst.TASK_FORM_DATA_PREFIX + "masterUnitId");
|
||||||
|
execution.getArgs().set(FlowConst.TASK_FORM_DATA_PREFIX + "masterUnitId", masterUnitId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
|
||||||
|
|
||||||
import com.budwk.app.flow.constant.FlowConst;
|
|
||||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
|
||||||
import com.budwk.app.flow.engine.core.Execution;
|
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 提案分管领导审批拦截器
|
|
||||||
*/
|
|
||||||
@IocBean
|
|
||||||
public class ProposalSchoolLeaderApprovalInterceptor implements FlowInterceptor {
|
|
||||||
@Override
|
|
||||||
public void intercept(Execution execution) {
|
|
||||||
Integer submitType = execution.getArgs().getInt(FlowConst.SUBMIT_TYPE);
|
|
||||||
|
|
||||||
// 退回到承办单位答复 需要设置退回节点及单位ID
|
|
||||||
if (Objects.equals(submitType, ProcessSubmitTypeEnum.JUMP.getCode())) {
|
|
||||||
// execution.getArgs().set(FlowConst.TASK_FORM_DATA_PREFIX + "hostUnitId", "da59e22f2a744a128b4f71c037c8d32e");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+45
@@ -0,0 +1,45 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.proposal.interceptor;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Dict;
|
||||||
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.flow.engine.util.FlowUtil;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
|
import com.budwk.app.flow.entity.ProcessTaskActor;
|
||||||
|
import com.budwk.app.zhgh.democratic.proposal.models.ProposalReplyUnit;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提案承办单位答复任务设置信息拦截器
|
||||||
|
* 承办单位名称、ID、是否主办等信息
|
||||||
|
*/
|
||||||
|
public class ProposalUnderTakeInfoInterceptor implements FlowInterceptor {
|
||||||
|
@Override
|
||||||
|
public void intercept(Execution execution) {
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
|
||||||
|
// 提案ID
|
||||||
|
String proposalId = execution.getProcessInstance().getBusinessNo();
|
||||||
|
// 当前任务
|
||||||
|
List<ProcessTask> processTaskList = execution.getProcessTaskList();
|
||||||
|
|
||||||
|
for (ProcessTask task : processTaskList) {
|
||||||
|
// 办理人
|
||||||
|
ProcessTaskActor taskActor = dao.fetch(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "=", task.getId()));
|
||||||
|
String actorUnitId = taskActor.getActorUnitId();
|
||||||
|
ProposalReplyUnit replyUnit = dao.fetch(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", proposalId).and(ProposalReplyUnit::getUnitId, "=", actorUnitId));
|
||||||
|
|
||||||
|
Dict variable = FlowUtil.variableToDict(task.getVariable());
|
||||||
|
variable.set("underTakeName", replyUnit.getUnitName());
|
||||||
|
variable.set("underTakeId", replyUnit.getUnitId());
|
||||||
|
variable.set("underTakeIsMaster", replyUnit.getIsMaster());
|
||||||
|
task.setVariable(Json.toJson(variable));
|
||||||
|
}
|
||||||
|
dao.update(processTaskList,"variable");
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -18,6 +18,16 @@ public class ProposalConsolidation extends BaseModel {
|
|||||||
@Comment("id")
|
@Comment("id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("分组id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||||
|
private Integer groupId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("提案id")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String proposalId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
@Comment("并案id")
|
@Comment("并案id")
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ public class ProposalUndertake extends BaseModel {
|
|||||||
@Name
|
@Name
|
||||||
@Comment("id")
|
@Comment("id")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@PrevInsert(uu32 = true)
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
|
|||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.models.GuildHall;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.models.GuildHallSeat;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.service.GuildHallService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
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.ioc.aop.Aop;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Api("会议厅管理")
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/guildHall")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class GuildHallController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private GuildHallService guildHallService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/teachercongress/guildhall/index.html")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@ApiOperation("会议厅列表")
|
||||||
|
public Result pageData(PageForm pageForm) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.asc(GuildHall::getSortCode);
|
||||||
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
|
cnd.where().andLike(GuildHall::getName, pageForm.getSearchKeyword());
|
||||||
|
}
|
||||||
|
Pagination pagination = guildHallService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@SLog(tag = "会议厅", msg = "保存会议厅")
|
||||||
|
@ApiOperation("保存会议厅")
|
||||||
|
public Result save(GuildHall guildHall) {
|
||||||
|
dao.insert(guildHall);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@SLog(tag = "会议厅", msg = "修改会议厅")
|
||||||
|
@ApiOperation("修改会议厅")
|
||||||
|
public Result update(GuildHall guildHall) {
|
||||||
|
dao.update(guildHall);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@SLog(tag = "会议厅", msg = "删除会议厅")
|
||||||
|
@ApiOperation("删除会议厅")
|
||||||
|
public Result delete(String id) {
|
||||||
|
dao.delete(GuildHall.class, id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@ApiOperation("查询会议厅")
|
||||||
|
public Result selectOne(String id) {
|
||||||
|
return Result.success(dao.fetch(GuildHall.class, id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@ApiOperation("查询座位")
|
||||||
|
public Result selectSeat(String hallId) {
|
||||||
|
List<GuildHallSeat> list = dao.query(GuildHallSeat.class, Cnd.where(GuildHallSeat::getHallId, "=", hallId)
|
||||||
|
.asc(GuildHallSeat::getRowNumber).asc(GuildHallSeat::getColNumber));
|
||||||
|
|
||||||
|
// 先按行号升序,再按列号升序
|
||||||
|
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.management")
|
||||||
|
@ApiOperation("保存座位")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
|
public Result saveSeat(String hallId, @Param("seats") GuildHallSeat[] seats) {
|
||||||
|
dao.clear(GuildHallSeat.class, Cnd.where(GuildHallSeat::getHallId, "=", hallId));
|
||||||
|
for (GuildHallSeat seat : seats) {
|
||||||
|
seat.setHallId(hallId);
|
||||||
|
}
|
||||||
|
dao.insert(seats);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.budwk.app.base.annotation.SLog;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.models.GuildHallMeeting;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.service.GuildHallMeetingService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.mvc.annotation.At;
|
||||||
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
|
@Api("会议厅会议")
|
||||||
|
@IocBean
|
||||||
|
@At("/platform/guildHall/meeting")
|
||||||
|
@Ok("json:full")
|
||||||
|
public class GuildHallMeetingController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Dao dao;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private GuildHallMeetingService guildHallMeetingService;
|
||||||
|
|
||||||
|
@At("")
|
||||||
|
@SaCheckPermission("guildHall.meeting")
|
||||||
|
@Ok("beetl:/platform/zhgh/democratic/teachercongress/guildhall/meeting/index.html")
|
||||||
|
public void index() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.meeting")
|
||||||
|
@ApiOperation("会议厅会议列表")
|
||||||
|
public Result pageData(PageForm pageForm, Integer year) {
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.andEX(GuildHallMeeting::getYear, "=", year);
|
||||||
|
cnd.desc(GuildHallMeeting::getStartTime);
|
||||||
|
Pagination pagination = guildHallMeetingService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||||
|
return Result.success(pagination);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.meeting")
|
||||||
|
@SLog(tag = "会议厅会议", msg = "保存会议厅会议")
|
||||||
|
@ApiOperation("保存会议厅会议")
|
||||||
|
public Result save(GuildHallMeeting meeting) {
|
||||||
|
dao.insert(meeting);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.meeting")
|
||||||
|
@SLog(tag = "会议厅会议", msg = "修改会议厅会议")
|
||||||
|
@ApiOperation("修改会议厅会议")
|
||||||
|
public Result update(GuildHallMeeting meeting) {
|
||||||
|
dao.update(meeting);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("guildHall.meeting")
|
||||||
|
@SLog(tag = "会议厅会议", msg = "删除会议厅会议")
|
||||||
|
@ApiOperation("删除会议厅会议")
|
||||||
|
public Result delete(String id) {
|
||||||
|
dao.delete(GuildHallMeeting.class, id);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.models;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("guild_hall")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("会议厅")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class GuildHall extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("地址")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("封面")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||||
|
private String cover;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("排序字段")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
@Default(value = "0")
|
||||||
|
private Integer sortCode;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否启用")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("1")
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("描述")
|
||||||
|
@ColDefine(type = ColType.TEXT)
|
||||||
|
private String introduce;
|
||||||
|
}
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.models;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("guild_hall_meeting")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("会厅会议")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class GuildHallMeeting extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("名称")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("年份")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("开始时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@NotNull(message = "开始时间不能为空")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("结束时间")
|
||||||
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
@NotNull(message = "开始时间不能为空")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("内容")
|
||||||
|
@ColDefine(type = ColType.TEXT)
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("参与活动组别")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer groupId;
|
||||||
|
|
||||||
|
}
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.models;
|
||||||
|
|
||||||
|
import com.budwk.app.base.model.BaseModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.nutz.dao.entity.annotation.*;
|
||||||
|
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table("guild_hall_seat")
|
||||||
|
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||||
|
@Comment("会议厅座位")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableIndexes(value = {
|
||||||
|
@Index(name = "INDEX_GUILD_HALL_SEAT_HALL_ID", fields = "hallId",unique = false)
|
||||||
|
})
|
||||||
|
public class GuildHallSeat extends BaseModel {
|
||||||
|
|
||||||
|
@Name
|
||||||
|
@PrevInsert(uu32 = true)
|
||||||
|
@Comment("ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("会议厅ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String hallId;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("排号")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer rowNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("列号")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer colNumber;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否启用")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("1")
|
||||||
|
private Boolean enable;
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.models.GuildHallMeeting;
|
||||||
|
|
||||||
|
public interface GuildHallMeetingService extends BaseService<GuildHallMeeting> {
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.models.GuildHall;
|
||||||
|
|
||||||
|
public interface GuildHallService extends BaseService<GuildHall> {
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.models.GuildHallMeeting;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.service.GuildHallMeetingService;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class GuildHallMeetingServiceImpl extends BaseServiceImpl<GuildHallMeeting> implements GuildHallMeetingService {
|
||||||
|
public GuildHallMeetingServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.budwk.app.zhgh.democratic.teachercongress.guildhall.service.impl;
|
||||||
|
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.models.GuildHall;
|
||||||
|
import com.budwk.app.zhgh.democratic.teachercongress.guildhall.service.GuildHallService;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class GuildHallServiceImpl extends BaseServiceImpl<GuildHall> implements GuildHallService {
|
||||||
|
public GuildHallServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -337,8 +337,13 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app))
|
window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app))
|
||||||
// 储存到div中
|
// 储存到div中
|
||||||
document.getElementById("sub-app-id").innerText = app.id
|
document.getElementById("sub-app-id").innerText = app.id
|
||||||
|
try {
|
||||||
|
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
|
||||||
|
$("#sub-app-container #sidebar-menu .menu-header .menu-title").text(app?.name)
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// document.querySelector("#sub-app-container .content-title").innerText = app.name
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 菜单回显
|
// 菜单回显
|
||||||
@@ -350,7 +355,8 @@ layout("/layouts/v4/baseLayout.html"){
|
|||||||
console.log(this.openedMenus)
|
console.log(this.openedMenus)
|
||||||
console.log(this.activeMenuIndex)
|
console.log(this.activeMenuIndex)
|
||||||
|
|
||||||
if (!this.activeMenuIndex && '/platform/v4/subApp' === window.location.pathname) {
|
// !this.activeMenuIndex &&
|
||||||
|
if ('/platform/v4/subApp' === window.location.pathname) {
|
||||||
this.defaultSelect()
|
this.defaultSelect()
|
||||||
} else {
|
} else {
|
||||||
this.hrefSelect()
|
this.hrefSelect()
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ layout("/layouts/platform.html"){
|
|||||||
<tree @node-click="treeNodeClick" ref="treeRef"></tree>
|
<tree @node-click="treeNodeClick" ref="treeRef"></tree>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<el-card shadow="never" style="height: 100%">
|
<el-card shadow="never" style="height: 100%" :body-style="{ height: '100%' , display: 'flex' , 'flex-direction': 'column' }">
|
||||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter)">
|
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter);flex-shrink: 0">
|
||||||
<el-row type="flex" :gutter="20">
|
<el-row type="flex" :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入关键字"></el-input>
|
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入关键字"></el-input>
|
||||||
@@ -19,11 +19,11 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter)">
|
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter);flex: 1;" :body-style="{ height: '100%', display: 'flex' , 'flex-direction': 'column' }">
|
||||||
<table-tool>
|
<table-tool>
|
||||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="syncSysUnit">同步系统单位</el-button>
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="syncSysUnit">同步系统单位</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" border ref="tableRef" height="calc(100vh - 400px)">
|
<el-table :data="tableData" border ref="tableRef" height="100%">
|
||||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||||
<el-table-column prop="name" label="单位名称" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="name" label="单位名称" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="code" label="单位编码" width="150px"></el-table-column>
|
<el-table-column prop="code" label="单位编码" width="150px"></el-table-column>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
const TREE_COMPONENT = {
|
const TREE_COMPONENT = {
|
||||||
template: `
|
template: `
|
||||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
<el-card shadow="never" style="height: 100%" :body-style="{ height: '100%' }">
|
||||||
<el-input placeholder="输入关键字进行查找" v-model="name" clearable class="mb10">
|
<el-input placeholder="输入关键字进行查找" v-model="name" clearable class="mb10">
|
||||||
</el-input>
|
</el-input>
|
||||||
<div style="max-height: calc(100vh - 200px);overflow-y: auto">
|
<div style="max-height: calc(100% - 50px);overflow-y: auto">
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
|
|||||||
+1
-1
@@ -146,7 +146,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'delegationName', label: '代表团'},
|
{prop: 'delegationName', label: '代表团'},
|
||||||
{prop: 'caseFilingResult', label: '立案结果'},
|
{prop: 'caseFilingResult', label: '立案结果'},
|
||||||
{prop: 'curTaskName', label: '当前节点'},
|
{prop: 'curTaskName', label: '当前节点'},
|
||||||
{prop: 'taskUnitName', label: '承办单位'},
|
{prop: 'underTakeName', label: '承办单位'},
|
||||||
{prop: 'taskName', label: '承办类型'},
|
{prop: 'taskName', label: '承办类型'},
|
||||||
{prop: 'actorName', label: '负责人'},
|
{prop: 'actorName', label: '负责人'},
|
||||||
{prop: 'instanceState', label: '流程状态'},
|
{prop: 'instanceState', label: '流程状态'},
|
||||||
|
|||||||
+27
-2
@@ -44,12 +44,14 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<table-tool>
|
<table-tool>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge">并案审核</el-button>
|
||||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||||
<el-radio-button :label="true">已审核</el-radio-button>
|
<el-radio-button :label="true">已审核</el-radio-button>
|
||||||
<el-radio-button :label="false">未审核</el-radio-button>
|
<el-radio-button :label="false">未审核</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" ref="tableRef" row-key="id" style="width: 100%">
|
||||||
|
<el-table-column type="selection"></el-table-column>
|
||||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||||
<el-table-column label="提案编号" prop="code"></el-table-column>
|
<el-table-column label="提案编号" prop="code"></el-table-column>
|
||||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||||
@@ -144,11 +146,16 @@ layout("/layouts/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
</proposal-info>
|
</proposal-info>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #public>
|
||||||
|
<merge ref="mergeRef"></merge>
|
||||||
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
<!--#include('../../common/info.js'){}#-->
|
<!--#include('../../common/info.js'){}#-->
|
||||||
|
<!--#include('merge.js'){}#-->
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
@@ -156,7 +163,8 @@ layout("/layouts/platform.html"){
|
|||||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
"proposal-info": PROPOSAL_INFO
|
"proposal-info": PROPOSAL_INFO,
|
||||||
|
merge
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -199,6 +207,7 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = createLoading('提交中')
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
...this.formData,
|
...this.formData,
|
||||||
@@ -213,10 +222,26 @@ layout("/layouts/platform.html"){
|
|||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 打开并案审核
|
||||||
|
openMerge() {
|
||||||
|
const selection = this.$refs.tableRef.selection
|
||||||
|
console.log(selection)
|
||||||
|
if (selection.length < 2) {
|
||||||
|
this.$message.warning('请先勾选需要并案审核的提案,至少需要两条提案')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$refs.guava.public(() => {
|
||||||
|
this.$refs.mergeRef.onOpen(selection)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
onRevoke(row) {
|
onRevoke(row) {
|
||||||
this.$confirm("您确定要撤回吗?", "提示", {
|
this.$confirm("您确定要撤回吗?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
|
|||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
const merge = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<div>
|
||||||
|
<div class="process-title">
|
||||||
|
预选并案提案
|
||||||
|
</div>
|
||||||
|
<el-table :data="selection" ref="tableRef" row-key="id" style="width: 100%">
|
||||||
|
<el-table-column label="序号" width="50" type="index"></el-table-column>
|
||||||
|
<el-table-column label="提案编号" prop="code"></el-table-column>
|
||||||
|
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="提案类别" prop="typeName"></el-table-column>
|
||||||
|
<el-table-column label="届次" prop="sessionName"></el-table-column>
|
||||||
|
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="100px">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-button @click="onRemove(scope.$index)" size="mini" type="danger">移除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selection: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(selection) {
|
||||||
|
this.selection = selection
|
||||||
|
},
|
||||||
|
// 移除
|
||||||
|
onRemove(index) {
|
||||||
|
if (this.selection.length === 2) {
|
||||||
|
this.$message.warning("并案审核至少两条提案")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.selection.splice(index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+1
-1
@@ -172,7 +172,7 @@ layout("/layouts/platform.html"){
|
|||||||
// 不满意
|
// 不满意
|
||||||
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
||||||
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
||||||
formData.tf_hostUnitId = caseInfo.tf_hostUnitId
|
formData.tf_masterUnitId = caseInfo.tf_masterUnitId
|
||||||
}
|
}
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
data: JSON.stringify(formData)
|
data: JSON.stringify(formData)
|
||||||
|
|||||||
+65
-56
@@ -2,69 +2,78 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
|||||||
/*language=HTML*/
|
/*language=HTML*/
|
||||||
template: `
|
template: `
|
||||||
<div>
|
<div>
|
||||||
<el-row type="flex" style="column-gap: 10px;">
|
<search @search="doSearch">
|
||||||
<el-col :span="6">
|
<search-item label="关键字">
|
||||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
|
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
</el-col>
|
</search-item>
|
||||||
<el-col :span="6">
|
<search-item label="代表团">
|
||||||
<el-select clearable filterable placeholder="所属代表团" v-model="pageForm.delegationId"
|
<el-select clearable filterable placeholder="所属代表团" v-model="pageForm.delegationId"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||||
v-for="item in delegationOptions"></el-option>
|
v-for="item in delegationOptions"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</search-item>
|
||||||
<el-col :span="4">
|
</search>
|
||||||
<el-button icon="el-icon-search" type="primary" @click="doSearch">查询</el-button>
|
|
||||||
</el-col>
|
<div style="display: flex;column-gap: 50px;">
|
||||||
</el-row>
|
<div style="flex: 1">
|
||||||
<el-divider class="mt10 mb10"></el-divider>
|
<el-divider class="mt10 mb10"></el-divider>
|
||||||
<div>
|
<div>
|
||||||
<table-tool label="代表数据">
|
<table-tool label="代表数据">
|
||||||
<!-- <el-button size="small" @click="invite" type="primary" icon="el-icon-plus"-->
|
<!-- <el-button size="small" @click="invite" type="primary" icon="el-icon-plus"-->
|
||||||
<!-- :disabled="pageForm.isInvite">邀请-->
|
<!-- :disabled="pageForm.isInvite">邀请-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<el-radio-group v-model="pageForm.isInvite" @change="doSearch" size="small"
|
<el-radio-group v-model="pageForm.isInvite" @change="doSearch" size="small"
|
||||||
style="margin-left: 5px;">
|
style="margin-left: 5px;">
|
||||||
<el-radio-button :label="true">已邀请</el-radio-button>
|
<el-radio-button :label="true">已邀请</el-radio-button>
|
||||||
<el-radio-button :label="false">可邀请</el-radio-button>
|
<el-radio-button :label="false">可邀请</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" ref="tableRef" @sort-change="pageOrder" header-align="center"
|
<el-table :data="tableData" ref="tableRef" @sort-change="pageOrder" header-align="center"
|
||||||
style="width: 100%" :row-key="getRowKey">
|
style="width: 100%" :row-key="getRowKey">
|
||||||
<el-table-column type="selection" reserve-selection v-if="!pageForm.isInvite"></el-table-column>
|
<el-table-column type="selection" reserve-selection
|
||||||
<el-table-column label="序号" width="50px" type="index" :index="indexMethod"></el-table-column>
|
v-if="!pageForm.isInvite"></el-table-column>
|
||||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
<el-table-column label="序号" width="50px" type="index"
|
||||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
:index="indexMethod"></el-table-column>
|
||||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||||
<!-- <el-table-column label="操作" width="150px">-->
|
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||||
<!-- <template scope="{row}">-->
|
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||||
<!-- <el-button size="mini" type="primary" @click="invite(row)">邀请</el-button>-->
|
<el-table-column label="分工会" prop="unionName"></el-table-column>
|
||||||
<!-- </template>-->
|
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||||
<!-- </el-table-column>-->
|
<!-- <el-table-column label="操作" width="150px">-->
|
||||||
</el-table>
|
<!-- <template scope="{row}">-->
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
<!-- <el-button size="mini" type="primary" @click="invite(row)">邀请</el-button>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
</el-table>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="flex: 1">
|
||||||
|
<el-divider class="mt10 mb10"></el-divider>
|
||||||
|
<div v-if="$refs.tableRef">
|
||||||
|
<table-tool label="当前已选择"></table-tool>
|
||||||
|
|
||||||
|
<el-table :data="$refs.tableRef.selection">
|
||||||
|
<el-table-column label="序号" width="50px" type="index"></el-table-column>
|
||||||
|
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||||
|
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||||
|
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||||
|
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||||
|
<el-table-column label="分工会" prop="unionName"></el-table-column>
|
||||||
|
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-row type="flex" justify="center" class="p10">
|
||||||
|
<el-button @click="">取消</el-button>
|
||||||
|
<el-button @click="invite" type="primary">邀请</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-divider class="mt10 mb10"></el-divider>
|
|
||||||
<div v-if="$refs.tableRef">
|
|
||||||
<table-tool label="当前已选择"></table-tool>
|
|
||||||
|
|
||||||
<el-table :data="$refs.tableRef.selection">
|
|
||||||
<el-table-column label="序号" width="50px" type="index"></el-table-column>
|
|
||||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
|
||||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
|
||||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
|
||||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<el-row type="flex" justify="center" class="p10">
|
|
||||||
<el-button @click="">取消</el-button>
|
|
||||||
<el-button @click="invite" type="primary">邀请</el-button>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
@@ -75,7 +84,7 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
|||||||
record: {},
|
record: {},
|
||||||
pageForm: {
|
pageForm: {
|
||||||
isInvite: false,
|
isInvite: false,
|
||||||
pageSize: 5
|
pageSize: 10
|
||||||
},
|
},
|
||||||
config: {},
|
config: {},
|
||||||
delegationOptions: []
|
delegationOptions: []
|
||||||
|
|||||||
+7
-10
@@ -57,7 +57,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column label="届次" prop="sessionName"></el-table-column>
|
<el-table-column label="届次" prop="sessionName"></el-table-column>
|
||||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="承办类型"></el-table-column>
|
|
||||||
<el-table-column prop="instanceState" label="流程状态">
|
<el-table-column prop="instanceState" label="流程状态">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||||
@@ -91,9 +90,9 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
<el-button @click="handleTaskAction(4)" size="small" type="danger">退回重新答复
|
<el-button @click="handleTaskAction('back')" size="small" type="danger">退回重新答复
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意答复</el-button>
|
<el-button @click="handleTaskAction('agree')" size="small" type="primary">同意答复</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</proposal-info>
|
</proposal-info>
|
||||||
@@ -150,13 +149,11 @@ layout("/layouts/platform.html"){
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
const formData = {
|
const formData = {
|
||||||
...this.formData,
|
...this.formData,
|
||||||
submitType: val
|
tf_approval: val
|
||||||
}
|
|
||||||
// 退回
|
|
||||||
if(val === 4){
|
|
||||||
formData.taskName = "85cf23da-2dd5-4007-a1e9-bd9bfddc68f0"
|
|
||||||
formData.tf_hostUnitId = "da59e22f2a744a128b4f71c037c8d32e"
|
|
||||||
}
|
}
|
||||||
|
delete formData.taskKey
|
||||||
|
delete formData.taskName
|
||||||
|
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
data: JSON.stringify(formData)
|
data: JSON.stringify(formData)
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@@ -187,7 +184,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
// 教代会
|
// 教代会
|
||||||
async meetingChange(val) {
|
async meetingChange(val) {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询开启的教代会
|
// 查询开启的教代会
|
||||||
|
|||||||
+9
-2
@@ -126,7 +126,8 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="转交" prop="transfer" v-if="pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')">
|
<el-table-column label="转交" prop="transfer"
|
||||||
|
v-if="pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
{{row.transferUserName}}
|
{{row.transferUserName}}
|
||||||
</template>
|
</template>
|
||||||
@@ -140,7 +141,9 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||||
</el-button>
|
</el-button>
|
||||||
<!--承办单位领导、超级管理员才能转办-->
|
<!--承办单位领导、超级管理员才能转办-->
|
||||||
<el-button v-if="!pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')" @click="openTransfer(row)" size="mini" type="primary">转交</el-button>
|
<el-button v-if="!pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')"
|
||||||
|
@click="openTransfer(row)" size="mini" type="primary">转交
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -289,6 +292,8 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = createLoading('提交中')
|
||||||
|
|
||||||
delete this.formData.underTakeIsMaster
|
delete this.formData.underTakeIsMaster
|
||||||
delete this.formData.underTakeName
|
delete this.formData.underTakeName
|
||||||
|
|
||||||
@@ -303,6 +308,8 @@ layout("/layouts/platform.html"){
|
|||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+11
-10
@@ -1,6 +1,6 @@
|
|||||||
var AddForm = {
|
var AddForm = {
|
||||||
template: `
|
template: `
|
||||||
<el-dialog title="新增代表" :visible.sync="dialogFormVisible" width="1000px" :close-on-click-modal="false">
|
<el-dialog title="新增代表" :visible.sync="dialogFormVisible" width="70%" :close-on-click-modal="false">
|
||||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules">
|
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules">
|
||||||
<el-form-item prop="sessionId" label="届次">
|
<el-form-item prop="sessionId" label="届次">
|
||||||
<el-select v-model="formData.sessionId"
|
<el-select v-model="formData.sessionId"
|
||||||
@@ -56,10 +56,10 @@
|
|||||||
roleId: null
|
roleId: null
|
||||||
},
|
},
|
||||||
formRules: {
|
formRules: {
|
||||||
sessionId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
sessionId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
delegationId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
delegationId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
roleId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
roleId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
userIds: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
userIds: [{required: true, message: "必填", trigger: ["change", "blur"]}]
|
||||||
},
|
},
|
||||||
sessionOptions: [],
|
sessionOptions: [],
|
||||||
delegationOptions: [],
|
delegationOptions: [],
|
||||||
@@ -67,14 +67,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onOpen(sessionId) {
|
onOpen(sessionId, delegationId = null) {
|
||||||
if (!sessionId) {
|
if (!sessionId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.formData = {
|
this.formData = {
|
||||||
userIds: [],
|
userIds: [],
|
||||||
sessionId: sessionId,
|
sessionId: sessionId,
|
||||||
delegationId: null,
|
delegationId: delegationId,
|
||||||
roleId: null
|
roleId: null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
listDelegation(sessionId) {
|
listDelegation(sessionId) {
|
||||||
this.$axios.post("/platform/teacherCongress/common/listDelegation", { sessionId }).then((res) => {
|
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.delegationOptions = res.data
|
this.delegationOptions = res.data
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
doSubmit() {
|
doSubmit() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.$refs.formRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$axios.post("/platform/teacherCongress/delegate/manage/insert", { data: JSON.stringify(this.formData) }).then((res) => {
|
this.$axios.post("/platform/teacherCongress/delegate/manage/insert", {data: JSON.stringify(this.formData)}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
@@ -132,5 +132,6 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {}
|
created() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<table-tool>
|
<table-tool>
|
||||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="excelImportDialog = true">导入代表</el-button>
|
<el-button size="small" type="primary" icon="el-icon-plus" @click="excelImportDialog = true">导入代表</el-button>
|
||||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="$refs.addFormRef.onOpen(pageForm.sessionId)">新增代表</el-button>
|
<el-button size="small" type="primary" icon="el-icon-plus" @click="$refs.addFormRef.onOpen(pageForm.sessionId,pageForm.delegationId)">新增代表</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
|
|||||||
+6
-6
@@ -3,24 +3,24 @@ layout("/layouts/platform.html"){
|
|||||||
#-->
|
#-->
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<el-row :gutter="10" style="height: calc(100vh - 126px)" type="flex">
|
<el-row :gutter="10" style="height: calc(100vh - 84px)" type="flex">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<tree @node-click="treeNodeClick" @session-change="sessionChange" ref="treeRef"></tree>
|
<tree @node-click="treeNodeClick" @session-change="sessionChange" ref="treeRef"></tree>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<el-card shadow="never" style="height: 100%">
|
<el-card shadow="never" style="height: 100%;" :body-style="{ height: '100%' , display: 'flex' , 'flex-direction': 'column' }">
|
||||||
<template v-if="!currentTreeNode || (currentTreeNode && currentTreeNode.level===1)">
|
<template v-if="!currentTreeNode || (currentTreeNode && currentTreeNode.level===1)">
|
||||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter)">
|
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter);flex-shrink: 0;">
|
||||||
<el-row type="flex">
|
<el-row type="flex">
|
||||||
<el-input clearable placeholder="请输入代表团名称" style="width: 220px" v-model="pageForm.searchKeyword"></el-input>
|
<el-input clearable placeholder="请输入代表团名称" style="width: 220px" v-model="pageForm.searchKeyword"></el-input>
|
||||||
<el-button @click="doSearch" class="ml5" icon="el-icon-search" size="small" type="primary"></el-button>
|
<el-button @click="doSearch" class="ml5" icon="el-icon-search" size="small" type="primary"></el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter)">
|
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter);flex: 1" :body-style="{ height: '100%', display: 'flex' , 'flex-direction': 'column' }">
|
||||||
<table-tool label="代表团">
|
<table-tool label="代表团">
|
||||||
<el-button @click="$refs.auFormRef.onOpen()" icon="el-icon-plus" size="small" type="primary">新增</el-button>
|
<el-button @click="$refs.auFormRef.onOpen()" icon="el-icon-plus" size="small" type="primary">新增</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" border header-align="center" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" border header-align="center" height="100%" style="width: 100%">
|
||||||
<el-table-column :index="indexMethod" label="序号" type="index" width="100px"></el-table-column>
|
<el-table-column :index="indexMethod" label="序号" type="index" width="100px"></el-table-column>
|
||||||
<el-table-column label="名称" prop="name"></el-table-column>
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
<el-table-column label="编码" prop="code" width="150px"></el-table-column>
|
<el-table-column label="编码" prop="code" width="150px"></el-table-column>
|
||||||
@@ -115,7 +115,7 @@ layout("/layouts/platform.html"){
|
|||||||
if (this.$refs.headTableRef) {
|
if (this.$refs.headTableRef) {
|
||||||
this.$refs.headTableRef.pageData()
|
this.$refs.headTableRef.pageData()
|
||||||
}
|
}
|
||||||
this.doSearch()
|
this.pageData()
|
||||||
},
|
},
|
||||||
|
|
||||||
sessionChange(id) {
|
sessionChange(id) {
|
||||||
|
|||||||
+17
-15
@@ -1,21 +1,22 @@
|
|||||||
const TREE_TEMPLATE = {
|
const TREE_TEMPLATE = {
|
||||||
template: `
|
template: /*language=HTML*/ `
|
||||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
<el-card shadow="never" style="height: 100%" :body-style="{ height: '100%' }">
|
||||||
<el-select placeholder="输入关键字进行查找" v-model="sessionId" clearable class="mb10">
|
<el-select placeholder="输入关键字进行查找" v-model="sessionId" clearable class="mb10">
|
||||||
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id" :key="item.id"></el-option>
|
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
|
||||||
</el-select>
|
:key="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<div style="height: calc(100% - 50px);overflow-y: auto">
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:props="{
|
:props="{
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
}"
|
}"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
@node-click="treeNodeClick"
|
@node-click="treeNodeClick"
|
||||||
:filter-node-method="filterNode"
|
:filter-node-method="filterNode"
|
||||||
>
|
>
|
||||||
<template slot-scope="{ node, data }">
|
<template slot-scope="{ node, data }">
|
||||||
<span class="el-tree-node__label">
|
<span class="el-tree-node__label">
|
||||||
@@ -25,8 +26,9 @@ const TREE_TEMPLATE = {
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-card>
|
</div>
|
||||||
`,
|
</el-card>
|
||||||
|
`,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentTreeNode: null,
|
currentTreeNode: null,
|
||||||
|
|||||||
+295
@@ -0,0 +1,295 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.card-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guild-hall-card {
|
||||||
|
background: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border: 1px solid #e8e8e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-image img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guild-hall-card:hover .card-image img {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
padding: 16px 16px 10px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.4;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-info {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item i {
|
||||||
|
margin-right: 6px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding-top: 8px;
|
||||||
|
border-top: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
padding: 6px 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-item:hover {
|
||||||
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-item.danger:hover {
|
||||||
|
color: var(--color-danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-item i {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-divider {
|
||||||
|
width: 1px;
|
||||||
|
height: 16px;
|
||||||
|
background: #e8e8e8;
|
||||||
|
margin: 0 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="名称">
|
||||||
|
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool>
|
||||||
|
<el-button size="small" type="primary" icon="el-icon-plus" @click="onAdd()">新增</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<div class="card-container">
|
||||||
|
<div class="guild-hall-card" v-for="(item, index) in tableData" :key="item.id">
|
||||||
|
<div class="card-image">
|
||||||
|
<img :src="item.cover" :alt="item.name" v-if="item.cover"/>
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">{{ item.name }}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-info">
|
||||||
|
<div class="info-item">
|
||||||
|
<i class="el-icon-location-outline"></i>
|
||||||
|
<span>{{ item.address }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-actions">
|
||||||
|
<div class="action-item" @click="onEdit(item)">
|
||||||
|
<i class="el-icon-edit"></i>
|
||||||
|
<span>编辑</span>
|
||||||
|
</div>
|
||||||
|
<div class="action-divider"></div>
|
||||||
|
<div class="action-item" @click="onSeat(item)">
|
||||||
|
<i class="el-icon-s-custom"></i>
|
||||||
|
<span>座位</span>
|
||||||
|
</div>
|
||||||
|
<div class="action-divider"></div>
|
||||||
|
<div class="action-item danger" @click="onDelete(item.id)">
|
||||||
|
<i class="el-icon-delete"></i>
|
||||||
|
<span>删除</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="70%">
|
||||||
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
||||||
|
<el-form-item label="名称" prop="name">
|
||||||
|
<el-input v-model="formData.name" placeholder="请输入名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地址" prop="address">
|
||||||
|
<el-input v-model="formData.address" placeholder="请输入地址"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="封面图" prop="cover">
|
||||||
|
<file-upload
|
||||||
|
style="--upload-width: 250px; --upload-height: 120px;"
|
||||||
|
:value.sync="formData.cover"
|
||||||
|
:upload_number="1"
|
||||||
|
upload_mode="image"
|
||||||
|
upload_result_category="interval"
|
||||||
|
upload_result_type="url"
|
||||||
|
></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述" prop="introduce">
|
||||||
|
<text-editor v-model="formData.introduce"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sortCode">
|
||||||
|
<el-input-number v-model="formData.sortCode" :min="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="enabled">
|
||||||
|
<el-switch v-model="formData.enabled"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="onSave">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<seat ref="seatRef"></seat>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<!--#include('seat.js'){}#-->
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {
|
||||||
|
seat
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
formRules: {
|
||||||
|
name: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||||
|
address: [{required: true, message: '请输入地址', trigger: 'blur'}],
|
||||||
|
cover: [{required: true, message: '请上传封面图', trigger: 'blur'}],
|
||||||
|
introduce: [{required: true, message: '请输入描述', trigger: 'blur'}],
|
||||||
|
sortCode: [{required: true, message: '请输入排序', trigger: 'blur'}],
|
||||||
|
enabled: [{required: true, message: '请选择状态', trigger: 'blur'}]
|
||||||
|
},
|
||||||
|
pageForm: {
|
||||||
|
pageSize: 4,
|
||||||
|
totalCount: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onDelete(id) {
|
||||||
|
this.$confirm('您确定要删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/guildHall/delete', {id}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onAdd() {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.formData = {
|
||||||
|
id: null,
|
||||||
|
name: null,
|
||||||
|
address: null,
|
||||||
|
cover: null,
|
||||||
|
description: null,
|
||||||
|
sortCode: null,
|
||||||
|
enabled: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.formData = {...row}
|
||||||
|
},
|
||||||
|
onSave() {
|
||||||
|
this.$refs.formRef.validate(valid => {
|
||||||
|
if (!valid) return
|
||||||
|
this.$confirm('您确定要提交吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/guildHall/' + (this.formData.id ? 'update' : 'save'), this.formData).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSeat(row) {
|
||||||
|
this.$refs.seatRef.onOpen(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.pageData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
+156
@@ -0,0 +1,156 @@
|
|||||||
|
<!--#
|
||||||
|
layout("/layouts/platform.html"){
|
||||||
|
#-->
|
||||||
|
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<search @search="doSearch">
|
||||||
|
<search-item label="名称">
|
||||||
|
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||||
|
</search-item>
|
||||||
|
<search-item label="年度">
|
||||||
|
<el-date-picker v-model="pageForm.year" type="year" placeholder="选择年度"></el-date-picker>
|
||||||
|
</search-item>
|
||||||
|
</search>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never">
|
||||||
|
<table-tool>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" size="small" @click="onAdd">新增</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table :data="tableData" ref="tableRef" @sort-change="pageOrder">
|
||||||
|
<el-table-column type="index" :index="indexMethod" width="50" label="序号"></el-table-column>
|
||||||
|
<el-table-column prop="name" label="名称"></el-table-column>
|
||||||
|
<el-table-column prop="year" label="年度"></el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="开始时间"></el-table-column>
|
||||||
|
<el-table-column prop="endTime" label="结束时间"></el-table-column>
|
||||||
|
<el-table-column label="操作" width="200px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="primary" size="mini" @click="onEdit(scope.row)">编辑</el-button>
|
||||||
|
<el-button type="danger" size="mini" @click="onDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="70%">
|
||||||
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
||||||
|
<el-form-item label="名称" prop="name">
|
||||||
|
<el-input v-model="formData.name" placeholder="请输入名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="年度" prop="year">
|
||||||
|
<el-date-picker v-model="formData.year" type="year" value-format="yyyy"
|
||||||
|
placeholder="选择年度"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.startTime"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择开始时间"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%;">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束时间" prop="endTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.endTime"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择结束时间"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%;">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="内容" prop="content">
|
||||||
|
<text-editor v-model="formData.content"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参与组别" prop="groupId">
|
||||||
|
<permission-group :value.sync="formData.groupId"></permission-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="onSave">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const vue = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
formRules: {
|
||||||
|
name: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||||
|
year: [{required: true, message: '请选择年度', trigger: 'change'}],
|
||||||
|
startTime: [{required: true, message: '请选择开始时间', trigger: 'change'}],
|
||||||
|
endTime: [{required: true, message: '请选择结束时间', trigger: 'change'}],
|
||||||
|
content: [{required: true, message: '请输入内容', trigger: 'blur'}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onAdd() {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.formData = {
|
||||||
|
id: null,
|
||||||
|
name: null,
|
||||||
|
year: null,
|
||||||
|
startTime: null,
|
||||||
|
endTime: null,
|
||||||
|
content: null,
|
||||||
|
groupId: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onEdit(row) {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.formData = {...row}
|
||||||
|
},
|
||||||
|
onSave() {
|
||||||
|
this.$refs.formRef.validate(valid => {
|
||||||
|
if (!valid) return
|
||||||
|
this.$confirm('您确定要提交吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/guildHall/meeting/' + (this.formData.id ? 'update' : 'save'), this.formData).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onDelete(row) {
|
||||||
|
this.$confirm('您确定要删除吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/guildHall/meeting/delete', {id: row.id}).then(res => {
|
||||||
|
this.doSearch();
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.doSearch();
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log(this.$refs.tableRef.columns)
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
@@ -0,0 +1,313 @@
|
|||||||
|
const seat = {
|
||||||
|
template: /*language=HTML*/ `
|
||||||
|
<el-dialog :visible.sync="dialogVisible" title="座位设置" width="90%">
|
||||||
|
<div class="seat-layout">
|
||||||
|
<!-- 控制面板 -->
|
||||||
|
<div class="control-panel">
|
||||||
|
<div class="panel-section">
|
||||||
|
<h4>座位设置</h4>
|
||||||
|
<div class="control-group">
|
||||||
|
<label>行数:</label>
|
||||||
|
<el-input-number v-model="seatConfig.rows" :min="1" :max="20"
|
||||||
|
size="small"></el-input-number>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label>列数:</label>
|
||||||
|
<el-input-number v-model="seatConfig.cols" :min="1" :max="30"
|
||||||
|
size="small"></el-input-number>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<el-button type="primary" size="small" @click="generateSeats">生成座位</el-button>
|
||||||
|
<el-button type="success" size="small" @click="saveSeats">保存</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-section">
|
||||||
|
<h4>操作说明</h4>
|
||||||
|
<div class="legend">
|
||||||
|
<div class="legend-item">
|
||||||
|
<div class="seat-icon enabled" v-html="getSeatSvg(true)"></div>
|
||||||
|
<span>启用座位</span>
|
||||||
|
</div>
|
||||||
|
<div class="legend-item">
|
||||||
|
<div class="seat-icon disabled" v-html="getSeatSvg(false)"></div>
|
||||||
|
<span>禁用座位</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p class="tip">点击座位可切换启用/禁用状态</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 座位区域 -->
|
||||||
|
<div class="seat-area">
|
||||||
|
<div class="seat-grid" :style="gridStyle">
|
||||||
|
<div
|
||||||
|
v-for="seat in seats"
|
||||||
|
:key="seat.id"
|
||||||
|
class="seat-item"
|
||||||
|
:class="{ 'enabled': seat.enable, 'disabled': !seat.enable }"
|
||||||
|
@click="toggleSeat(seat)"
|
||||||
|
:title="'第' + seat.rowNumber + '排第' + seat.colNumber + '列'"
|
||||||
|
>
|
||||||
|
<div class="seat-svg" v-html="getSeatSvg(seat.enable)"></div>
|
||||||
|
<div class="seat-label">{{ seat.rowNumber }}-{{ seat.colNumber }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
`,
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
row: {},
|
||||||
|
seatConfig: {
|
||||||
|
rows: 8,
|
||||||
|
cols: 12
|
||||||
|
},
|
||||||
|
seats: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
gridStyle() {
|
||||||
|
return {
|
||||||
|
'grid-template-columns': 'repeat(' + this.seatConfig.cols + ', 1fr)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen(row) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.row = row
|
||||||
|
this.seats = []
|
||||||
|
this.loadSeats()
|
||||||
|
},
|
||||||
|
|
||||||
|
getSeatSvg(enabled) {
|
||||||
|
const color = enabled ? '#409eff' : '#dcdfe6'
|
||||||
|
const strokeColor = enabled ? '#337ecc' : '#c0c4cc'
|
||||||
|
|
||||||
|
return '<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">' +
|
||||||
|
'<!-- 座椅靠背 -->' +
|
||||||
|
'<rect x="4" y="6" width="24" height="16" rx="2" ry="2" ' +
|
||||||
|
'fill="' + color + '" stroke="' + strokeColor + '" stroke-width="1"/>' +
|
||||||
|
'<!-- 座椅坐垫 -->' +
|
||||||
|
'<rect x="6" y="20" width="20" height="8" rx="2" ry="2" ' +
|
||||||
|
'fill="' + color + '" stroke="' + strokeColor + '" stroke-width="1"/>' +
|
||||||
|
'<!-- 扶手 -->' +
|
||||||
|
'<rect x="2" y="12" width="3" height="12" rx="1" ry="1" ' +
|
||||||
|
'fill="' + color + '" stroke="' + strokeColor + '" stroke-width="1"/>' +
|
||||||
|
'<rect x="27" y="12" width="3" height="12" rx="1" ry="1" ' +
|
||||||
|
'fill="' + color + '" stroke="' + strokeColor + '" stroke-width="1"/>' +
|
||||||
|
'</svg>'
|
||||||
|
},
|
||||||
|
|
||||||
|
generateSeats() {
|
||||||
|
this.seats = []
|
||||||
|
for (let row = 1; row <= this.seatConfig.rows; row++) {
|
||||||
|
for (let col = 1; col <= this.seatConfig.cols; col++) {
|
||||||
|
this.seats.push({
|
||||||
|
id: this.row.id + '_' + row + '_' + col,
|
||||||
|
hallId: this.row.id,
|
||||||
|
rowNumber: row.toString(),
|
||||||
|
colNumber: col.toString(),
|
||||||
|
enable: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleSeat(seat) {
|
||||||
|
seat.enable = !seat.enable
|
||||||
|
},
|
||||||
|
|
||||||
|
loadSeats() {
|
||||||
|
// 加载现有座位数据
|
||||||
|
this.$axios.post('/platform/guildHall/selectSeat', {hallId: this.row.id}).then(res => {
|
||||||
|
if (res.code === 0 && res.data && res.data.length > 0) {
|
||||||
|
this.seats = res.data
|
||||||
|
// 根据现有数据计算行列数
|
||||||
|
const maxRow = Math.max(...this.seats.map(s => parseInt(s.rowNumber)))
|
||||||
|
const maxCol = Math.max(...this.seats.map(s => parseInt(s.colNumber)))
|
||||||
|
this.seatConfig.rows = maxRow
|
||||||
|
this.seatConfig.cols = maxCol
|
||||||
|
} else {
|
||||||
|
// 没有数据时生成默认座位
|
||||||
|
// this.generateSeats()
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
// this.generateSeats()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
saveSeats() {
|
||||||
|
this.$confirm('确定要保存座位设置吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$axios.post('/platform/guildHall/saveSeat', {
|
||||||
|
hallId: this.row.id,
|
||||||
|
seats: JSON.stringify(this.seats)
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
this.dialogVisible = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: /*language=CSS*/ `
|
||||||
|
/deep/ .seat-layout {
|
||||||
|
display: flex;
|
||||||
|
gap: 20px;
|
||||||
|
height: 70vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .control-panel {
|
||||||
|
background: #f8f9fa;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px;
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .panel-section {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .panel-section h4 {
|
||||||
|
margin: 0 0 12px 0;
|
||||||
|
color: #333;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .control-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .control-group label {
|
||||||
|
width: 50px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .legend {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .legend-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-icon {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .tip {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-area {
|
||||||
|
flex: 1;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #e8e8e8;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 20px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-grid {
|
||||||
|
display: grid;
|
||||||
|
gap: 8px;
|
||||||
|
justify-items: center;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-item:hover {
|
||||||
|
background: rgba(64, 158, 255, 0.1);
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-item.disabled:hover {
|
||||||
|
background: rgba(220, 223, 230, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-svg {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-label {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #666;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-item.enabled .seat-label {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .seat-item.disabled .seat-label {
|
||||||
|
color: #c0c4cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 1200px) {
|
||||||
|
.seat-layout {
|
||||||
|
flex-direction: column;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-panel {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-section {
|
||||||
|
flex: 1;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.control-panel {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.seat-grid {
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.seat-item {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
+1
-1
@@ -3,7 +3,7 @@ layout("/layouts/platform.html"){
|
|||||||
#-->
|
#-->
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<el-row type="flex" :gutter="10" style="height: calc(100vh - 126px)">
|
<el-row type="flex" :gutter="10" style="height: calc(100vh - 84px)">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<tree @node-click="treeNodeClick" ref="treeRef"></tree>
|
<tree @node-click="treeNodeClick" ref="treeRef"></tree>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
+17
-14
@@ -1,20 +1,22 @@
|
|||||||
const TREE_COMPONENT = {
|
const TREE_COMPONENT = {
|
||||||
template: `
|
template: /*language=HTML*/ `
|
||||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
<el-card shadow="never" style="height: 100%" :body-style="{ height: '100%' }">
|
||||||
<el-select v-model="sessionId" :clearable="false" style="width: 100%" @change="listTree">
|
<el-select v-model="sessionId" :clearable="false" style="width: 100%" @change="listTree">
|
||||||
<el-option v-for="i in sessionOptions" :label="i.fullName" :value="i.id" :key="i.id"></el-option>
|
<el-option v-for="i in sessionOptions" :label="i.fullName" :value="i.id" :key="i.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<div style="height: calc(100% - 50px);overflow-y: auto">
|
||||||
|
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:props="{
|
:props="{
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
}"
|
}"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
@node-click="treeNodeClick"
|
@node-click="treeNodeClick"
|
||||||
:filter-node-method="filterNode"
|
:filter-node-method="filterNode"
|
||||||
>
|
>
|
||||||
<template slot-scope="{ node, data }">
|
<template slot-scope="{ node, data }">
|
||||||
<span class="el-tree-node__label">
|
<span class="el-tree-node__label">
|
||||||
@@ -24,8 +26,9 @@ const TREE_COMPONENT = {
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-card>
|
</div>
|
||||||
`,
|
</el-card>
|
||||||
|
`,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentTreeNode: null,
|
currentTreeNode: null,
|
||||||
|
|||||||
+46
-40
@@ -7,13 +7,13 @@ layout("/layouts/platform.html"){
|
|||||||
<search @search="doSearch">
|
<search @search="doSearch">
|
||||||
<search-item label="年份">
|
<search-item label="年份">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
formData="yyyy"
|
formData="yyyy"
|
||||||
type="year"
|
type="year"
|
||||||
placeholder="选择年份"
|
placeholder="选择年份"
|
||||||
clearable
|
clearable
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="届数">
|
<search-item label="届数">
|
||||||
@@ -32,14 +32,15 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||||
<el-table-column type="index" width="50" :index="indexMethod" label="序号"></el-table-column>
|
<el-table-column type="index" width="50" :index="indexMethod" label="序号"></el-table-column>
|
||||||
<el-table-column prop="year" label="年份"></el-table-column>
|
<el-table-column prop="year" label="年份" sortable></el-table-column>
|
||||||
<el-table-column prop="j" label="届数"></el-table-column>
|
<el-table-column prop="j" label="届数" sortable></el-table-column>
|
||||||
<el-table-column prop="c" label="次数"></el-table-column>
|
<el-table-column prop="c" label="次数" sortable></el-table-column>
|
||||||
<el-table-column prop="description" label="描述"></el-table-column>
|
<el-table-column prop="description" label="描述"></el-table-column>
|
||||||
<el-table-column prop="startDate" label="开启时间"></el-table-column>
|
<el-table-column prop="startDate" label="开启时间"></el-table-column>
|
||||||
<el-table-column prop="enable" label="开启状态">
|
<el-table-column prop="enable" label="开启状态">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<i class="fa fa-circle" :class="row.enable ? 'text-success' : 'text-danger'" style="margin-left: 5px"></i>
|
<i class="fa fa-circle" :class="row.enable ? 'text-success' : 'text-danger'"
|
||||||
|
style="margin-left: 5px"></i>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="collectStartTime" label="提案征集开始时间"></el-table-column>
|
<el-table-column prop="collectStartTime" label="提案征集开始时间"></el-table-column>
|
||||||
@@ -54,17 +55,18 @@ layout("/layouts/platform.html"){
|
|||||||
<!--#include("/layouts/pagination.html"){}#-->
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="formData.id ? '编辑':'新增'" :visible.sync="dialogFormVisible" width="60%" :close-on-click-modal="false">
|
<el-dialog :title="formData.id ? '编辑':'新增'" :visible.sync="dialogFormVisible" width="60%"
|
||||||
|
:close-on-click-modal="false">
|
||||||
<el-form :model="formData" ref="formRef" size="small" label-width="140px" :rules="formRules">
|
<el-form :model="formData" ref="formRef" size="small" label-width="140px" :rules="formRules">
|
||||||
<el-form-item prop="year" label="年份">
|
<el-form-item prop="year" label="年份">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
v-model="formData.year"
|
v-model="formData.year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
formData="yyyy"
|
formData="yyyy"
|
||||||
type="year"
|
type="year"
|
||||||
placeholder="选择年"
|
placeholder="选择年"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -77,7 +79,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item prop="description" label="描述">
|
<el-form-item prop="description" label="描述">
|
||||||
<el-input type="textarea" :rows="2" style="width: 100%" placeholder="请输入教代会描述" v-model="formData.description"></el-input>
|
<el-input type="textarea" :rows="2" style="width: 100%" placeholder="请输入教代会描述"
|
||||||
|
v-model="formData.description"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item prop="enable" label="状态">
|
<el-form-item prop="enable" label="状态">
|
||||||
@@ -99,21 +102,21 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-form-item prop="collectStartTime" label="提案征集开始时间">
|
<el-form-item prop="collectStartTime" label="提案征集开始时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.collectStartTime"
|
v-model="formData.collectStartTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="选择时间"
|
placeholder="选择时间"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item prop="collectEndTime" label="提案征集结束时间">
|
<el-form-item prop="collectEndTime" label="提案征集结束时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.collectEndTime"
|
v-model="formData.collectEndTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="选择时间"
|
placeholder="选择时间"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -133,14 +136,14 @@ layout("/layouts/platform.html"){
|
|||||||
return {
|
return {
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
formRules: {
|
formRules: {
|
||||||
year: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
year: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
j: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
j: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
c: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
c: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
enable: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
enable: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
description: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
description: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
isExtend: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
isExtend: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
collectStartTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
collectStartTime: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||||
collectEndTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
collectEndTime: [{required: true, message: "必填", trigger: ["change", "blur"]}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -153,7 +156,7 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
openEdit(id) {
|
openEdit(id) {
|
||||||
this.dialogFormVisible = true
|
this.dialogFormVisible = true
|
||||||
this.$axios.post(loc() + "/findOne", { id }).then((res) => {
|
this.$axios.post(loc() + "/findOne", {id}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
res.data.year = res.data.year.toString()
|
res.data.year = res.data.year.toString()
|
||||||
this.formData = res.data
|
this.formData = res.data
|
||||||
@@ -164,12 +167,15 @@ layout("/layouts/platform.html"){
|
|||||||
doSubmit() {
|
doSubmit() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.$refs.formRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
const loading = createLoading()
|
||||||
this.$axios.post(loc() + (this.formData.id ? "/update" : "/insert"), this.formData).then((res) => {
|
this.$axios.post(loc() + (this.formData.id ? "/update" : "/insert"), this.formData).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -181,7 +187,7 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$axios.post(loc() + "/delete", { id }).then((res) => {
|
this.$axios.post(loc() + "/delete", {id}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.budwk.app;
|
|||||||
import cn.hutool.core.lang.Dict;
|
import cn.hutool.core.lang.Dict;
|
||||||
import com.budwk.app.flow.constant.FlowConst;
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
import com.budwk.app.flow.engine.FlowEngine;
|
import com.budwk.app.flow.engine.FlowEngine;
|
||||||
|
import com.budwk.app.flow.engine.model.*;
|
||||||
import com.budwk.app.flow.entity.ProcessTask;
|
import com.budwk.app.flow.entity.ProcessTask;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -14,6 +15,7 @@ import org.nutz.ioc.loader.annotation.Inject;
|
|||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@RunWith(NbJUnit4Runner.class)
|
@RunWith(NbJUnit4Runner.class)
|
||||||
@@ -52,4 +54,41 @@ public class FlowTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void findForkTaskNames(NodeModel node, StringBuilder buffer, Set<String> visitedNodes) {
|
||||||
|
if (node == null) return;
|
||||||
|
|
||||||
|
// 防止循环引用
|
||||||
|
String nodeId = node.getName();
|
||||||
|
if (visitedNodes.contains(nodeId)) return;
|
||||||
|
visitedNodes.add(nodeId);
|
||||||
|
|
||||||
|
// 如果遇到fork节点,停止递归
|
||||||
|
if (node instanceof ForkModel) return;
|
||||||
|
|
||||||
|
List<TransitionModel> inputs = node.getInputs();
|
||||||
|
for (TransitionModel tm : inputs) {
|
||||||
|
NodeModel source = tm.getSource();
|
||||||
|
if (source instanceof TaskModel) {
|
||||||
|
String taskName = source.getName();
|
||||||
|
// 避免重复添加
|
||||||
|
if (!buffer.toString().contains(taskName)) {
|
||||||
|
if (buffer.length() > 0) buffer.append(",");
|
||||||
|
buffer.append(taskName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 递归处理上游节点
|
||||||
|
findForkTaskNames(source, buffer, visitedNodes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testForkJoin() {
|
||||||
|
JoinModel joinModel = new JoinModel();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user