commit
This commit is contained in:
@@ -4,6 +4,8 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.vo.LabelValueVO;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
@@ -12,14 +14,8 @@ import com.budwk.app.flow.engine.event.ProcessEvent;
|
||||
import com.budwk.app.flow.engine.event.ProcessPublisher;
|
||||
import com.budwk.app.flow.engine.model.ProcessModel;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.flow.entity.Candidate;
|
||||
import com.budwk.app.flow.entity.ProcessDefine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessEventTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskPerformTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.entity.*;
|
||||
import com.budwk.app.flow.enums.*;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.flow.vo.HighLightVO;
|
||||
import com.budwk.app.flow.vo.ProcessInstanceVO;
|
||||
@@ -146,20 +142,25 @@ public class FlowCommonController {
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取流程定义的审批记录")
|
||||
public Result approvalRecord(Long instanceId) {
|
||||
List<ProcessTask> processTaskList = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instanceId)
|
||||
.and(ProcessTask::getTaskState, "not in", List.of(ProcessTaskStateEnum.DOING, ProcessTaskStateEnum.WITHDRAW, ProcessTaskStateEnum.ABANDON))
|
||||
.asc(ProcessTask::getUpdatedAt));
|
||||
List<ProcessTaskVO> res = new ArrayList<>();
|
||||
processTaskList.forEach(processTask -> {
|
||||
ProcessTaskVO vo = BeanUtil.toBean(processTask, ProcessTaskVO.class);
|
||||
if (vo.getTaskState().equals(ProcessTaskStateEnum.FINISHED.getCode()) && StrUtil.isNotBlank(vo.getOperator())) {
|
||||
List<ProcessTask> processTaskList = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "=", instanceId)
|
||||
.and(ProcessTask::getTaskState, "not in", List.of(ProcessTaskStateEnum.WITHDRAW, ProcessTaskStateEnum.ABANDON))
|
||||
.asc(ProcessTask::getUpdatedAt));
|
||||
List<ProcessTaskVO> res = new ArrayList<>();
|
||||
processTaskList.forEach(processTask -> {
|
||||
ProcessTaskVO vo = BeanUtil.toBean(processTask, ProcessTaskVO.class);
|
||||
if (vo.getTaskState().equals(ProcessTaskStateEnum.FINISHED.getCode()) && StrUtil.isNotBlank(vo.getOperator())) {
|
||||
|
||||
}
|
||||
}
|
||||
if(vo.getTaskState().equals(ProcessTaskStateEnum.DOING.getCode())) {
|
||||
List<ProcessTaskActor> taskActorList = dao.query(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "=", processTask.getId()));
|
||||
List<JSONObject> list = JSONUtil.toList(JSONUtil.toJsonStr(taskActorList), JSONObject.class);
|
||||
vo.setTaskActorList(list);
|
||||
}
|
||||
|
||||
res.add(vo);
|
||||
});
|
||||
return Result.success(res);
|
||||
}
|
||||
res.add(vo);
|
||||
});
|
||||
return Result.success(res);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@@ -239,7 +240,7 @@ public class FlowCommonController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result executeTask(@Param("data") String param) {
|
||||
Dict args = Json.fromJson(Dict.class, param);
|
||||
flowCommonService.executeTask(args);
|
||||
flowCommonService.executeTask(args);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ 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.json.Json;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,7 +38,8 @@ public class FlowCommonService {
|
||||
*/
|
||||
public void executeTask(Dict args){
|
||||
Long processTaskId = args.getLong(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
String operator = SecurityUtil.getUserId();
|
||||
|
||||
String operator = SecurityUtil.getUserId();
|
||||
if (args.containsKey(FlowConst.EXT_ENABLE_OPERATOR)&&args.getBool(FlowConst.EXT_ENABLE_OPERATOR)){
|
||||
operator = FlowConst.ADMIN_ID;
|
||||
}
|
||||
@@ -46,6 +48,15 @@ public class FlowCommonService {
|
||||
if (submitType == null) {
|
||||
submitType = ProcessSubmitTypeEnum.AGREE.getCode();
|
||||
}
|
||||
|
||||
ProcessTask processTask = flowEngine.processTaskService().getById(processTaskId);
|
||||
ProcessTask parentTask = flowEngine.processTaskService().getById(processTask.getTaskParentId());
|
||||
Dict taskArgs = Json.fromJson(Dict.class, parentTask.getVariable());
|
||||
if(taskArgs.containsKey("tf_sourceTaskKey") && !taskArgs.getBool("tf_audit")) {
|
||||
submitType = ProcessSubmitTypeEnum.JUMP.getCode();
|
||||
args.put(FlowConst.TASK_NAME, taskArgs.getStr("tf_sourceTaskKey"));
|
||||
}
|
||||
|
||||
args.put(FlowConst.SUBMIT_TYPE, submitType);
|
||||
|
||||
// 设置办理人信息到表单参数
|
||||
|
||||
@@ -270,43 +270,43 @@ public class ProcessInstanceServiceImpl extends BaseServiceImpl<ProcessInstance>
|
||||
|
||||
@Override
|
||||
public HighLightVO highLight(Long processInstanceId) {
|
||||
HighLightVO vo = new HighLightVO();
|
||||
ProcessInstanceVO processInstance = findById(processInstanceId);
|
||||
HighLightVO vo = new HighLightVO();
|
||||
ProcessInstanceVO processInstance = findById(processInstanceId);
|
||||
|
||||
FlowEngine flowEngine = ServiceContext.find(FlowEngine.class);
|
||||
FlowEngine flowEngine = ServiceContext.find(FlowEngine.class);
|
||||
|
||||
if (processInstance != null) {
|
||||
ProcessModel processModel = flowEngine.processDefineService().getProcessModel(processInstance.getProcessDefineId());
|
||||
// 拿到正在进行中的任务==>活跃节点
|
||||
List<ProcessTask> processTaskList = flowEngine.processTaskService().getDoingTaskList(processInstanceId, new String[]{});
|
||||
// 拿到历史任务-按更新时间倒序
|
||||
List<ProcessTask> hisProcessTaskList = flowEngine.processTaskService().query(Cnd.where(ProcessTask::getProcessInstanceId, "=", processInstanceId).desc(ProcessTask::getUpdatedAt));
|
||||
processTaskList.forEach(task -> {
|
||||
if (!vo.getActiveNodeNames().contains(task.getTaskName())) {
|
||||
vo.getActiveNodeNames().add(task.getTaskName());
|
||||
recursionModel(processModel.getStart(), processInstance, processTaskList, hisProcessTaskList, task.getTaskName(), vo);
|
||||
}
|
||||
});
|
||||
// 拿到非正常结束的流程实例状态值
|
||||
List<Integer> orderStatusList = Arrays.stream(ProcessInstanceStateEnum.values()).filter(item -> !item.equals(ProcessInstanceStateEnum.DOING) && !item.equals(ProcessInstanceStateEnum.FINISHED)).map(ProcessInstanceStateEnum::getCode).toList();
|
||||
// 非正常结束,需要进行特殊处理
|
||||
if (orderStatusList.contains(processInstance.getState())) {
|
||||
if (CollectionUtil.isNotEmpty(hisProcessTaskList)) {
|
||||
ProcessTask lastProcessTask = hisProcessTaskList.get(hisProcessTaskList.size() - 1);
|
||||
NodeModel nodeModel = processModel.getNode(lastProcessTask.getTaskName());
|
||||
recursionModel(processModel.getStart(), processInstance, processTaskList, hisProcessTaskList, nodeModel.getOutputs().get(0).getTo(), vo);
|
||||
}
|
||||
} else {
|
||||
List<EndModel> endModels = processModel.getModels(EndModel.class);
|
||||
if (endModels != null) {
|
||||
endModels.forEach(endModel -> {
|
||||
recursionModel(processModel.getStart(), processInstance, processTaskList, hisProcessTaskList, endModel.getName(), vo);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
if (processInstance != null) {
|
||||
ProcessModel processModel = flowEngine.processDefineService().getProcessModel(processInstance.getProcessDefineId());
|
||||
// 拿到正在进行中的任务==>活跃节点
|
||||
List<ProcessTask> processTaskList = flowEngine.processTaskService().getDoingTaskList(processInstanceId, new String[]{});
|
||||
// 拿到历史任务-按更新时间倒序
|
||||
List<ProcessTask> hisProcessTaskList = flowEngine.processTaskService().query(Cnd.where(ProcessTask::getProcessInstanceId, "=", processInstanceId).desc(ProcessTask::getUpdatedAt));
|
||||
processTaskList.forEach(task -> {
|
||||
if (!vo.getActiveNodeNames().contains(task.getTaskName())) {
|
||||
vo.getActiveNodeNames().add(task.getTaskName());
|
||||
recursionModel(processModel.getStart(), processInstance, processTaskList, hisProcessTaskList, task.getTaskName(), vo);
|
||||
}
|
||||
});
|
||||
// 拿到非正常结束的流程实例状态值
|
||||
List<Integer> orderStatusList = Arrays.stream(ProcessInstanceStateEnum.values()).filter(item -> !item.equals(ProcessInstanceStateEnum.DOING) && !item.equals(ProcessInstanceStateEnum.FINISHED)).map(ProcessInstanceStateEnum::getCode).toList();
|
||||
// 非正常结束,需要进行特殊处理
|
||||
if (orderStatusList.contains(processInstance.getState())) {
|
||||
if (CollectionUtil.isNotEmpty(hisProcessTaskList)) {
|
||||
ProcessTask lastProcessTask = hisProcessTaskList.get(hisProcessTaskList.size() - 1);
|
||||
NodeModel nodeModel = processModel.getNode(lastProcessTask.getTaskName());
|
||||
recursionModel(processModel.getStart(), processInstance, processTaskList, hisProcessTaskList, nodeModel.getOutputs().get(0).getTo(), vo);
|
||||
}
|
||||
} else {
|
||||
List<EndModel> endModels = processModel.getModels(EndModel.class);
|
||||
if (endModels != null) {
|
||||
endModels.forEach(endModel -> {
|
||||
recursionModel(processModel.getStart(), processInstance, processTaskList, hisProcessTaskList, endModel.getName(), vo);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProcessTaskVO> approvalRecord(Long processInstanceId) {
|
||||
|
||||
@@ -195,6 +195,11 @@ public class ProcessTaskServiceImpl extends BaseServiceImpl<ProcessTask> impleme
|
||||
// execution.getArgs().remove(key);
|
||||
// }
|
||||
|
||||
// 删一下吧,只保证退回的那个任务节点有这两个字段,不然要出问题喔
|
||||
if(execution.getArgs().containsKey("tf_sourceTaskKey")) {
|
||||
execution.getArgs().remove("tf_sourceTaskKey");
|
||||
execution.getArgs().remove("tf_audit");
|
||||
}
|
||||
processTask.setVariable(JSONUtil.toJsonStr(execution.getArgs()));
|
||||
processTask.setCreatedAt(now);
|
||||
processTask.setUpdatedAt(now);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Base64;
|
||||
public class CspProcessor extends AbstractProcessor {
|
||||
|
||||
public void process(ActionContext ac) throws Throwable {
|
||||
// 1. 生成 nonce
|
||||
/*// 1. 生成 nonce
|
||||
String nonce = Base64.getEncoder().encodeToString(
|
||||
java.security.SecureRandom.getInstanceStrong().generateSeed(16)
|
||||
);
|
||||
@@ -34,7 +34,7 @@ public class CspProcessor extends AbstractProcessor {
|
||||
"frame-ancestors 'self'; " +
|
||||
"object-src 'self';";
|
||||
|
||||
ac.getResponse().setHeader("Content-Security-Policy", csp);
|
||||
ac.getResponse().setHeader("Content-Security-Policy", csp);*/
|
||||
|
||||
doNext(ac);
|
||||
}
|
||||
|
||||
+24
-7
@@ -3,12 +3,15 @@ package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.vo.LabelValueVO;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.flow.service.ProcessTaskService;
|
||||
@@ -136,13 +139,19 @@ public class ProposalSchoolLeaderApprovalController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.schoolLeaderApproval")
|
||||
@ApiOperation("执行任务")
|
||||
public Result executeTask(@Param("data") String data) {
|
||||
Dict args = Json.fromJson(Dict.class, data);
|
||||
|
||||
if("back".equals(args.getStr("tf_approval"))) {
|
||||
args.put("submitType", ProcessSubmitTypeEnum.JUMP.getCode());
|
||||
args.put("taskName", "committee");
|
||||
flowCommonService.executeTask(args);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
String proposalId = args.getStr("proposalId");
|
||||
|
||||
ProcessTask thisTask = dao.fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
|
||||
@@ -150,8 +159,20 @@ public class ProposalSchoolLeaderApprovalController {
|
||||
Dict dict = Json.fromJson(Dict.class, parentTask.getVariable());
|
||||
|
||||
args.put("tf_caseFilingResult", dict.getStr("tf_caseFilingResult"));
|
||||
args.put("tf_helpunitreply", dict.getStr("tf_helpunitreply"));
|
||||
args.put("tf_masterUnitId", dict.getStr("tf_masterUnitId"));
|
||||
args.put("tf_slaveUnitIds", dict.getObj("tf_slaveUnitIds"));
|
||||
|
||||
// 方案流程实例
|
||||
ProcessInstance instance = dao.fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getId, "=", thisTask.getProcessInstanceId()));
|
||||
Dict instanceDict = Json.fromJson(Dict.class, instance.getVariable());
|
||||
instanceDict.put("tf_helpunitreply", dict.getStr("tf_helpunitreply"));
|
||||
instanceDict.put("tf_masterUnitId", dict.getStr("tf_masterUnitId"));
|
||||
instanceDict.put("tf_slaveUnitIds", dict.getObj("tf_slaveUnitIds"));
|
||||
instance.setVariable(JSONUtil.toJsonStr(instanceDict));
|
||||
|
||||
dao.update(instance);
|
||||
|
||||
// 方案流程实例
|
||||
|
||||
// 单条审核
|
||||
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
|
||||
@@ -161,7 +182,6 @@ public class ProposalSchoolLeaderApprovalController {
|
||||
}
|
||||
|
||||
// 并案审核
|
||||
|
||||
List<ProcessTask> mergeTasks = processTaskService.getDoingTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
|
||||
for (ProcessTask mergeTask : mergeTasks) {
|
||||
Dict cloneArgs = args.clone();
|
||||
@@ -170,7 +190,4 @@ public class ProposalSchoolLeaderApprovalController {
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -114,10 +114,11 @@ public class ProposalSecondedController {
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
$condition
|
||||
""");
|
||||
sql.setParam("seconderId", SecurityUtil.getUserId());
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "in", List.of("invite", "second", "delegation", "committee"));
|
||||
cnd.and(new Static("ps.isAgree is null"));
|
||||
sql.setParam("seconderId", SecurityUtil.getUserId());
|
||||
cnd.and("ps.isAgree", "is", null);
|
||||
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ public class ProposalUnSubmitQueryController {
|
||||
tcd.name as delegationName,
|
||||
pt.name as typeName,
|
||||
manner.name as mannerName,
|
||||
(select count(DISTINCT(seconderId))from proposal_seconded where proposalId = info.id) AS secondedNum,
|
||||
(select count(DISTINCT(seconderId))from proposal_seconded where proposalId = info.id and isAgree = 1) AS secondedAgreeNum,
|
||||
(select count(DISTINCT(seconderId))from proposal_second where proposalId = info.id) AS secondedNum,
|
||||
(select count(DISTINCT(seconderId))from proposal_second where proposalId = info.id and isAgree = 1) AS secondedAgreeNum,
|
||||
IF(info.stateCode <= 200 ,'未审核','已审核') AS delegationAudit
|
||||
FROM
|
||||
proposal_info info
|
||||
|
||||
+16
-19
@@ -1,16 +1,24 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.handler;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.flow.entity.Candidate;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalConfig;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.List;
|
||||
@@ -22,30 +30,19 @@ public class ProposalSchoolLeaderAssignmentHandler implements AssignmentHandler
|
||||
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
ProposalConfig proposalConfig = dao.fetch(ProposalConfig.class, Cnd.NEW());
|
||||
List<String> unitIds = proposalConfig.getSchoolLeaderUnitIds();
|
||||
Sql sql = Sqls.create("select id,username,loginname from vw_user where unitId in (@unitIds)");
|
||||
sql.setParam("unitIds", unitIds);
|
||||
sql.setCallback(Sqls.callback.maps());
|
||||
dao.execute(sql);
|
||||
List<NutMap> list = sql.getList(NutMap.class);
|
||||
CommonService commonService = ServiceContext.find(CommonService.class);
|
||||
List<Sys_user> users = commonService.findUserInfoByRoleCode(RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name());
|
||||
|
||||
List<Candidate> candidates = list.stream().map(item -> Candidate.builder()
|
||||
.userId(item.getString("id"))
|
||||
.userName(item.getString("username"))
|
||||
.ext(Dict.of("loginName", item.getString("loginname")))
|
||||
.build()
|
||||
).toList();
|
||||
if(candidates.size() > 0) {
|
||||
return candidates.stream().map(Candidate::getUserId).toList();
|
||||
}
|
||||
return List.of();
|
||||
if(Lang.isEmpty(users)) {
|
||||
throw new BaseException("未查询到相关审批人");
|
||||
}
|
||||
|
||||
return users.stream().map(Sys_user::getId).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "指定主管校领导";
|
||||
return "获取提案主管校领导";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
@@ -3,6 +3,7 @@ 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.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||
@@ -100,5 +101,11 @@ public class ProposalCaseFilingInterceptor implements FlowInterceptor {
|
||||
}
|
||||
dao.update(processTaskList,"variable");
|
||||
|
||||
String helpUnitReply = execution.getArgs().getStr(FlowConst.TASK_FORM_DATA_PREFIX + "helpunitreply");
|
||||
ProcessTask processTask = execution.getProcessTask();
|
||||
Dict dict = JSONUtil.toBean(processTask.getVariable(), Dict.class);
|
||||
dict.set(FlowConst.TASK_FORM_DATA_PREFIX + "helpunitreply", helpUnitReply);
|
||||
processTask.setVariable(JSONUtil.toJsonStr(dict));
|
||||
dao.update(processTask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,31 +25,31 @@
|
||||
<div class="column-setting-container">
|
||||
<div class="column-setting-header">
|
||||
<el-checkbox
|
||||
:indeterminate="isIndeterminate"
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange">
|
||||
:indeterminate="isIndeterminate"
|
||||
v-model="checkAll"
|
||||
@change="handleCheckAllChange">
|
||||
全选
|
||||
</el-checkbox>
|
||||
<span class="column-count">已选择 {{ checkedColumns.length }} / {{ tempColumns.length }} 列</span>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="tempColumns"
|
||||
ref="columnTableRef"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="prop"
|
||||
class="column-setting-table"
|
||||
max-height="500px">
|
||||
:data="tempColumns"
|
||||
ref="columnTableRef"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="prop"
|
||||
class="column-setting-table"
|
||||
max-height="500px">
|
||||
<el-table-column type="selection" width="55" :selectable="isColumnSelectable"></el-table-column>
|
||||
<el-table-column label="标题" prop="label" min-width="120"></el-table-column>
|
||||
<!-- <el-table-column label="字段" prop="prop" min-width="100"></el-table-column>-->
|
||||
<el-table-column label="宽度PX" prop="width" min-width="120">
|
||||
<template slot-scope="{row}">
|
||||
<el-input
|
||||
v-model="row.width"
|
||||
type="number"
|
||||
size="mini"
|
||||
placeholder="自动">
|
||||
v-model="row.width"
|
||||
type="number"
|
||||
size="mini"
|
||||
placeholder="自动">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -1,350 +1,360 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
||||
<title>流程设计器</title>
|
||||
<script src="/assets/platform/plugins/vue/vue.js"></script>
|
||||
<script src="/assets/platform/plugins/jquery/jquery.js"></script>
|
||||
<script src="/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css"/>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css"/>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/override.css"/>
|
||||
<!-- 引入 core 包和对应 css-->
|
||||
<script src="/assets/platform/plugins/logicflow/logic-flow.js"></script>
|
||||
<link rel="stylesheet" href="/assets/platform/plugins/logicflow/index.css"/>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@logicflow/extension@2.1.4/dist/index.min.js"></script>
|
||||
<script src="/assets/platform/plugins/snaker/SnakerflowDesigner.umd.js"></script>
|
||||
<style>
|
||||
#snaker-flow-preview {
|
||||
height: 100vh;
|
||||
}
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
||||
<title>流程设计器</title>
|
||||
<script src="/assets/platform/plugins/vue/vue.js"></script>
|
||||
<script src="/assets/platform/plugins/jquery/jquery.js"></script>
|
||||
<script src="/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css"/>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css"/>
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/override.css"/>
|
||||
<!-- 引入 core 包和对应 css-->
|
||||
<script src="/assets/platform/plugins/logicflow/logic-flow.js"></script>
|
||||
<link rel="stylesheet" href="/assets/platform/plugins/logicflow/index.css"/>
|
||||
<script src="/assets/platform/plugins/logicflow/index.min.js"></script>
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/@logicflow/extension@2.1.4/dist/index.min.js"></script>-->
|
||||
<script src="/assets/platform/plugins/snaker/SnakerflowDesigner.umd.js"></script>
|
||||
<style>
|
||||
#snaker-flow-preview {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.approval-card {
|
||||
position: absolute;
|
||||
width: 320px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #d9e3f0;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
z-index: 1000;
|
||||
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|
||||
transform: translate(10px, 10px);
|
||||
overflow: hidden;
|
||||
}
|
||||
.approval-card {
|
||||
position: absolute;
|
||||
width: 320px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #d9e3f0;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||
z-index: 1000;
|
||||
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|
||||
transform: translate(10px, 10px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab-container {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
.tab-container {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.tab-header {
|
||||
display: flex;
|
||||
background: #fafafa;
|
||||
}
|
||||
.tab-header {
|
||||
display: flex;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
background: #fafafa;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.tab-item {
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
background: #fafafa;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.tab-item:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.tab-item:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
border-bottom: 2px solid #1890ff;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
.tab-item.active {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
border-bottom: 2px solid #1890ff;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.tab-item:hover {
|
||||
background: #f0f0f0;
|
||||
color: #333;
|
||||
}
|
||||
.tab-item:hover {
|
||||
background: #f0f0f0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 卡片标题栏(OA风格顶部色条) */
|
||||
.approval-card .card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
background: #1a73e8;
|
||||
color: white;
|
||||
}
|
||||
/* 卡片标题栏(OA风格顶部色条) */
|
||||
.approval-card .card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
background: #1a73e8;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.approval-card .card-header h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.approval-card .card-header h3 {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.approval-card .card-header button {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: none;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.approval-card .card-header button {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: none;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.approval-card .card-header button:hover {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
.approval-card .card-header button:hover {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
/* 卡片内容区域 */
|
||||
.approval-card .card-body {
|
||||
padding: 16px;
|
||||
}
|
||||
/* 卡片内容区域 */
|
||||
.approval-card .card-body {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
/* 信息行样式 */
|
||||
.approval-card .info-row {
|
||||
display: flex;
|
||||
margin-bottom: 12px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
/* 信息行样式 */
|
||||
.approval-card .info-row {
|
||||
display: flex;
|
||||
margin-bottom: 12px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.approval-card .info-label {
|
||||
width: 80px;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.approval-card .info-label {
|
||||
width: 80px;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.approval-card .info-value {
|
||||
flex: 1;
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
.approval-card .info-value {
|
||||
flex: 1;
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/*!* 分隔线 *!*/
|
||||
/*.approval-card .divider {*/
|
||||
/* height: 1px;*/
|
||||
/* background: #f0f0f0;*/
|
||||
/* margin: 12px 0;*/
|
||||
/*}*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="snaker-flow-preview">
|
||||
<snaker-flow-designer
|
||||
ref="designer"
|
||||
v-model="flowData"
|
||||
:show-doc="false"
|
||||
:viewer="true"
|
||||
node-render-type="html"
|
||||
:high-light="highLight"
|
||||
></snaker-flow-designer>
|
||||
/*!* 分隔线 *!*/
|
||||
/*.approval-card .divider {*/
|
||||
/* height: 1px;*/
|
||||
/* background: #f0f0f0;*/
|
||||
/* margin: 12px 0;*/
|
||||
/*}*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="snaker-flow-preview">
|
||||
<snaker-flow-designer
|
||||
ref="designer"
|
||||
v-model="flowData"
|
||||
:show-doc="false"
|
||||
:viewer="true"
|
||||
node-render-type="html"
|
||||
:high-light="highLight"
|
||||
></snaker-flow-designer>
|
||||
|
||||
<div
|
||||
v-if="showApprovalCard"
|
||||
class="approval-card"
|
||||
:style="{
|
||||
<div
|
||||
v-if="showApprovalCard"
|
||||
class="approval-card"
|
||||
:style="{
|
||||
left: cardPosition.x+'px',
|
||||
top: cardPosition.y+'px'
|
||||
}"
|
||||
>
|
||||
<div class="card-header">
|
||||
<h3>详情</h3>
|
||||
<button @click="closeCard">×</button>
|
||||
</div>
|
||||
<!-- Tab切换 -->
|
||||
<div class="tab-container" v-if="approvalInfos.length > 1">
|
||||
<div class="tab-header">
|
||||
<div
|
||||
v-for="(item, index) in approvalInfos"
|
||||
:key="index"
|
||||
class="tab-item"
|
||||
:class="{active: activeTabIndex === index}"
|
||||
@click="activeTabIndex = index"
|
||||
>
|
||||
记录{{index + 1}}
|
||||
>
|
||||
<div class="card-header">
|
||||
<h3>详情</h3>
|
||||
<button @click="closeCard">×</button>
|
||||
</div>
|
||||
<!-- Tab切换 -->
|
||||
<div class="tab-container" v-if="approvalInfos.length > 1">
|
||||
<div class="tab-header">
|
||||
<div
|
||||
v-for="(item, index) in approvalInfos"
|
||||
:key="index"
|
||||
class="tab-item"
|
||||
:class="{active: activeTabIndex === index}"
|
||||
@click="activeTabIndex = index"
|
||||
>
|
||||
记录{{index + 1}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div v-for="(approvalInfo, index) in approvalInfos" :key="index" v-show="activeTabIndex === index">
|
||||
<div class="info-row">
|
||||
<span class="info-label">节点类型:</span>
|
||||
<span class="info-value">{{approvalInfo.displayName}}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">审批人:</span>
|
||||
<span class="info-value" v-if="currentNode.id === 'startTask'">
|
||||
<div class="card-body">
|
||||
<div v-for="(approvalInfo, index) in approvalInfos" :key="index" v-show="activeTabIndex === index">
|
||||
<div class="info-row">
|
||||
<span class="info-label">节点类型:</span>
|
||||
<span class="info-value">{{approvalInfo.displayName}}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">审批人:</span>
|
||||
<span class="info-value" v-if="currentNode.id === 'startTask'">
|
||||
{{approvalInfo.ext?.initiatorName}}({{approvalInfo.ext?.initiatorAccount}})
|
||||
</span>
|
||||
<span class="info-value"
|
||||
v-else>{{approvalInfo.taskFormData.userName}}({{approvalInfo.taskFormData?.loginName}})</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">审核状态:</span>
|
||||
<span class="info-value">{{getTaskStateText(approvalInfo.taskState)}}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">提交结果:</span>
|
||||
<span class="info-value">{{getSubmitTypeText(approvalInfo.ext.submitType)}}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">提交意见:</span>
|
||||
<span class="info-value">{{approvalInfo.taskFormData.opinion}}</span>
|
||||
</div>
|
||||
<!-- <div class="divider"></div>-->
|
||||
<div class="info-row">
|
||||
<span class="info-label">提交时间:</span>
|
||||
<span class="info-value">{{approvalInfo.finishTime}}</span>
|
||||
<span class="info-value" v-else-if="approvalInfo.taskState === 10">
|
||||
{{ approvalInfo.taskActorList.map(u => u.actorName + '(' + u.actorAccount + ')').join('、') }}
|
||||
</span>
|
||||
<span class="info-value"
|
||||
v-else>{{approvalInfo.taskFormData.userName}}({{approvalInfo.taskFormData?.loginName}})</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">审核状态:</span>
|
||||
<span class="info-value">{{getTaskStateText(approvalInfo.taskState)}}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">提交结果:</span>
|
||||
<span class="info-value" v-if="approvalInfo.taskState !== 10">
|
||||
{{getSubmitTypeText(approvalInfo.ext.submitType)}}
|
||||
</span>
|
||||
<span class="info-value" v-else>
|
||||
暂未处理
|
||||
</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">提交意见:</span>
|
||||
<span class="info-value" v-if="approvalInfo.taskState !== 10">{{approvalInfo.taskFormData.opinion}}</span>
|
||||
<span class="info-value" v-else>暂未处理</span>
|
||||
</div>
|
||||
<!-- <div class="divider"></div>-->
|
||||
<div class="info-row">
|
||||
<span class="info-label">提交时间:</span>
|
||||
<span class="info-value">{{approvalInfo.finishTime || '暂未处理'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script nonce="${cspNonce!}">
|
||||
Vue.use(SnakerflowDesigner.default)
|
||||
const vue = new Vue({
|
||||
el: "#snaker-flow-preview",
|
||||
data() {
|
||||
return {
|
||||
// 流程定义ID
|
||||
defineId: "${defineId!}",
|
||||
// 流程实例ID
|
||||
instanceId: "${instanceId!}",
|
||||
// 流程定义数据
|
||||
flowData: {},
|
||||
// 高亮数据
|
||||
highLight: {},
|
||||
// 历史审批记录
|
||||
hisApproval: [],
|
||||
// 展示已审核信息
|
||||
showApprovalCard: false,
|
||||
// 审批信息卡片位置
|
||||
cardPosition: {x: 0, y: 0},
|
||||
// 当前节点
|
||||
currentNode: [],
|
||||
// 审批信息数组
|
||||
approvalInfos: [],
|
||||
// 当前选中的tab索引
|
||||
activeTabIndex: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// approvalInfo() {
|
||||
// if (this.currentNode) {
|
||||
// return this.hisApproval.find((item) => item.taskName === this.currentNode.id)
|
||||
// }
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
$.get("/flow/define/detail", {id: this.defineId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.flowData = res.data.content
|
||||
this.initNodeEvent()
|
||||
}
|
||||
})
|
||||
</body>
|
||||
<script>
|
||||
Vue.use(SnakerflowDesigner.default)
|
||||
const vue = new Vue({
|
||||
el: "#snaker-flow-preview",
|
||||
data() {
|
||||
return {
|
||||
// 流程定义ID
|
||||
defineId: "${defineId!}",
|
||||
// 流程实例ID
|
||||
instanceId: "${instanceId!}",
|
||||
// 流程定义数据
|
||||
flowData: {},
|
||||
// 高亮数据
|
||||
highLight: {},
|
||||
// 历史审批记录
|
||||
hisApproval: [],
|
||||
// 展示已审核信息
|
||||
showApprovalCard: false,
|
||||
// 审批信息卡片位置
|
||||
cardPosition: {x: 0, y: 0},
|
||||
// 当前节点
|
||||
currentNode: [],
|
||||
// 审批信息数组
|
||||
approvalInfos: [],
|
||||
// 当前选中的tab索引
|
||||
activeTabIndex: 0
|
||||
}
|
||||
},
|
||||
getHighLight() {
|
||||
$.get("/flow/common/instanceHighLight", {instanceId: this.instanceId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.highLight = res.data
|
||||
}
|
||||
})
|
||||
computed: {
|
||||
// approvalInfo() {
|
||||
// if (this.currentNode) {
|
||||
// return this.hisApproval.find((item) => item.taskName === this.currentNode.id)
|
||||
// }
|
||||
// }
|
||||
},
|
||||
|
||||
getHisApproval() {
|
||||
$.get("/flow/common/approvalRecord", {instanceId: this.instanceId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.hisApproval = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
initNodeEvent() {
|
||||
this.$nextTick(() => {
|
||||
console.log(this.$refs.designer.lf.graphModel.eventCenter)
|
||||
this.$refs.designer.lf.graphModel.eventCenter.on("node:click", ({e, data}) => {
|
||||
console.log(data)
|
||||
console.log(e)
|
||||
|
||||
// 获取点击位置(考虑页面滚动情况)
|
||||
const scrollX = window.scrollX || window.pageXOffset
|
||||
const scrollY = window.scrollY || window.pageYOffset
|
||||
|
||||
this.cardPosition = {
|
||||
x: e.clientX + scrollX,
|
||||
y: e.clientY + scrollY
|
||||
}
|
||||
|
||||
if (data.type !== "snaker:task") return
|
||||
|
||||
const approvalInfos = this.hisApproval.filter((item) => item.taskName === data.id && item.taskState === 20)
|
||||
|
||||
if (approvalInfos && approvalInfos.length > 0) {
|
||||
this.approvalInfos = approvalInfos
|
||||
this.currentNode = data
|
||||
this.activeTabIndex = 0
|
||||
this.showApprovalCard = true
|
||||
methods: {
|
||||
getDetail() {
|
||||
$.get("/flow/define/detail", {id: this.defineId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.flowData = res.data.content
|
||||
this.initNodeEvent()
|
||||
}
|
||||
})
|
||||
|
||||
this.$refs.designer.lf.graphModel.eventCenter.on("blank:click", (args) => {
|
||||
this.closeCard()
|
||||
},
|
||||
getHighLight() {
|
||||
$.get("/flow/common/instanceHighLight", {instanceId: this.instanceId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.highLight = res.data
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
closeCard() {
|
||||
this.showApprovalCard = false
|
||||
this.activeTabIndex = 0
|
||||
},
|
||||
getHisApproval() {
|
||||
$.get("/flow/common/approvalRecord", {instanceId: this.instanceId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.hisApproval = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取任务状态文本
|
||||
getTaskStateText(taskState) {
|
||||
const stateMap = {
|
||||
10: "进行中",
|
||||
20: "已完成",
|
||||
30: "已撤回"
|
||||
initNodeEvent() {
|
||||
this.$nextTick(() => {
|
||||
console.log(this.$refs.designer.lf.graphModel.eventCenter)
|
||||
this.$refs.designer.lf.graphModel.eventCenter.on("node:click", ({e, data}) => {
|
||||
console.log(data)
|
||||
console.log(e)
|
||||
|
||||
// 获取点击位置(考虑页面滚动情况)
|
||||
const scrollX = window.scrollX || window.pageXOffset
|
||||
const scrollY = window.scrollY || window.pageYOffset
|
||||
|
||||
this.cardPosition = {
|
||||
x: e.clientX + scrollX,
|
||||
y: e.clientY + scrollY
|
||||
}
|
||||
|
||||
if (data.type !== "snaker:task") return
|
||||
|
||||
const approvalInfos = this.hisApproval.filter((item) => item.taskName === data.id && [10, 20].includes(item.taskState))
|
||||
|
||||
if (approvalInfos && approvalInfos.length > 0) {
|
||||
this.approvalInfos = approvalInfos
|
||||
this.currentNode = data
|
||||
this.activeTabIndex = 0
|
||||
this.showApprovalCard = true
|
||||
}
|
||||
})
|
||||
|
||||
this.$refs.designer.lf.graphModel.eventCenter.on("blank:click", (args) => {
|
||||
this.closeCard()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
closeCard() {
|
||||
this.showApprovalCard = false
|
||||
this.activeTabIndex = 0
|
||||
},
|
||||
|
||||
// 获取任务状态文本
|
||||
getTaskStateText(taskState) {
|
||||
const stateMap = {
|
||||
10: "进行中",
|
||||
20: "已完成",
|
||||
30: "已撤回"
|
||||
}
|
||||
return stateMap[taskState] || taskState
|
||||
},
|
||||
|
||||
// 获取提交结果文本
|
||||
getSubmitTypeText(submitType) {
|
||||
const typeMap = {
|
||||
0: "发起申请",
|
||||
1: "同意申请",
|
||||
2: "拒绝申请",
|
||||
3: "退回上一步",
|
||||
4: "跳转",
|
||||
5: "重新提交",
|
||||
6: "退回发起人",
|
||||
20: "拒绝申请"
|
||||
}
|
||||
return typeMap[submitType] || submitType
|
||||
}
|
||||
return stateMap[taskState] || taskState
|
||||
},
|
||||
|
||||
// 获取提交结果文本
|
||||
getSubmitTypeText(submitType) {
|
||||
const typeMap = {
|
||||
0: "发起申请",
|
||||
1: "同意申请",
|
||||
2: "拒绝申请",
|
||||
3: "退回上一步",
|
||||
4: "跳转",
|
||||
5: "重新提交",
|
||||
6: "退回发起人",
|
||||
20: "拒绝申请"
|
||||
mounted() {
|
||||
if (this.defineId) {
|
||||
this.getDetail()
|
||||
}
|
||||
if (this.instanceId) {
|
||||
this.getHighLight()
|
||||
this.getHisApproval()
|
||||
}
|
||||
return typeMap[submitType] || submitType
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.defineId) {
|
||||
this.getDetail()
|
||||
}
|
||||
if (this.instanceId) {
|
||||
this.getHighLight()
|
||||
this.getHisApproval()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -5,6 +5,7 @@ const PROPOSAL_INFO = {
|
||||
<div class="proposal-info">
|
||||
<div class="process-title">
|
||||
提案基础信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<h3 style="text-align: center;font-weight: 600" class="pt10 pb10">
|
||||
{{ viewData.name }}
|
||||
@@ -197,6 +198,7 @@ const PROPOSAL_INFO = {
|
||||
</template>
|
||||
|
||||
<slot></slot>
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE", "PROCESS_TASK_SUBMIT_TYPE", "PROPOSAL_FEEDBACK"],
|
||||
@@ -246,6 +248,9 @@ const PROPOSAL_INFO = {
|
||||
})
|
||||
},
|
||||
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||
}
|
||||
},
|
||||
style:
|
||||
/*language=CSS*/
|
||||
|
||||
+4
-4
@@ -68,9 +68,9 @@ layout("/layouts/platform.html"){
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
|
||||
<dict-tag v-if="row.taskState!==10"
|
||||
<dict-tag
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="row.caseFilingResult"></dict-tag>
|
||||
:value="JSON.parse(row.taskVariable)?.tf_caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'merge'" scope="{row}">
|
||||
<el-tag v-if="row.merge" size="small">是</el-tag>
|
||||
@@ -148,9 +148,9 @@ layout("/layouts/platform.html"){
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="approvalOpinion"
|
||||
<el-form-item label="审核意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
|
||||
+14
-14
@@ -44,7 +44,7 @@ layout("/layouts/platform.html"){
|
||||
<!-- </search-item>-->
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge">并案审核</el-button>-->
|
||||
@@ -69,9 +69,9 @@ layout("/layouts/platform.html"){
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
|
||||
<dict-tag v-if="row.taskState!==10"
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="row.caseFilingResult"></dict-tag>
|
||||
<dict-tag
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="JSON.parse(row.taskVariable)?.tf_caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'merge'" scope="{row}">
|
||||
<el-tag v-if="row.merge" size="small">是</el-tag>
|
||||
@@ -93,7 +93,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
<template #edit>
|
||||
<proposal-info ref="proposalInfoRef" @done-tasks="doneTasks">
|
||||
<div v-if="showApprovalForm">
|
||||
@@ -162,7 +162,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
</proposal-info>
|
||||
</template>
|
||||
|
||||
|
||||
<template #public>
|
||||
<merge ref="mergeRef" @close="$refs.guava.index()"></merge>
|
||||
</template>
|
||||
@@ -172,7 +172,7 @@ layout("/layouts/platform.html"){
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
<!--#include('../committeeFiling/merge.js'){}#-->
|
||||
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
@@ -237,7 +237,7 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
@@ -253,7 +253,7 @@ layout("/layouts/platform.html"){
|
||||
} else {
|
||||
tf_helpunitreply = 'NO_HELP_UNIT'
|
||||
}
|
||||
|
||||
|
||||
const loading = createLoading('提交中')
|
||||
this.$axios.post("/platform/proposal/committeeFilingUnit/executeTask", {
|
||||
data: JSON.stringify({
|
||||
@@ -276,7 +276,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 打开并案审核
|
||||
openMerge() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
@@ -293,7 +293,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
@@ -311,12 +311,12 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 教代会
|
||||
async meetingChange(val) {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
|
||||
// 查询开启的教代会
|
||||
listOpenSession() {
|
||||
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
|
||||
@@ -329,7 +329,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 查询承办单位
|
||||
listUnderTake() {
|
||||
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
|
||||
|
||||
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
<el-button class="ml5" icon="el-icon-upload2" plain type="primary"
|
||||
<el-button class="ml5" icon="el-icon-upload2" type="primary" size="small"
|
||||
@click="openImport">导入提案
|
||||
</el-button>
|
||||
</table-tool>
|
||||
|
||||
+36
-14
@@ -21,7 +21,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
@@ -58,7 +58,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
<template #edit>
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
@@ -74,7 +74,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(4)" size="small" type="info">退回到提案人(不审核)</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人(审核)</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
|
||||
</el-row>
|
||||
@@ -85,7 +86,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
@@ -122,18 +123,19 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
taskName: row.curTaskName,
|
||||
taskKey: row.taskKey
|
||||
}
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 查询开启的教代会
|
||||
listOpenSession() {
|
||||
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
|
||||
@@ -142,12 +144,11 @@ layout("/layouts/platform.html"){
|
||||
if (this.sessionOptions) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
|
||||
this.pageData()
|
||||
this.listDelegation()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
@@ -156,11 +157,17 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const params = {
|
||||
...this.formData,
|
||||
submitType: val,
|
||||
taskName: 'startTask'
|
||||
}
|
||||
if(val === 4) {
|
||||
params.tf_sourceTaskKey = this.formData.taskKey
|
||||
params.tf_audit = false
|
||||
}
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
data: JSON.stringify(params)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
@@ -170,7 +177,22 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+2
-3
@@ -108,9 +108,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction('back')" size="small" type="danger">退回重新答复
|
||||
</el-button>
|
||||
<el-button @click="handleTaskAction('agree')" size="small" type="primary">同意答复</el-button>
|
||||
<el-button @click="handleTaskAction('back')" size="small" type="danger">退回提委会立案</el-button>
|
||||
<el-button @click="handleTaskAction('agree')" size="small" type="primary">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
+5
-5
@@ -161,14 +161,14 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
this.updateSecond(val)
|
||||
this.updateSecond(val, false)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
updateSecond(submitType) {
|
||||
|
||||
updateSecond(submitType, flag = true) {
|
||||
this.$axios.post("/platform/proposal/seconded/updateInfo", {
|
||||
proposalId: this.row.id,
|
||||
taskActorUserId: this.row.taskActorUserId,
|
||||
@@ -177,8 +177,8 @@ layout("/layouts/platform.html"){
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
if(flag) this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
+12
-12
@@ -13,9 +13,9 @@ layout("/layouts/platform.html"){
|
||||
v-for="item in sessionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item>
|
||||
<search-item label="名称/编号">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
style="width: 90%" v-model="pageForm.searchKeyword">
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 110px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="提案名称" value="proposalName"></el-option>
|
||||
@@ -23,10 +23,10 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item>
|
||||
<search-item label="提案人">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
style="width: 90%" v-model="pageForm.searchKeyword2">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
|
||||
v-model="pageForm.searchKeyword2">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 110px;"
|
||||
v-model="pageForm.searchName2">
|
||||
<el-option label="提案人" value="su.username"></el-option>
|
||||
<!-- <el-option label="附议人" value="seconded.username"></el-option>-->
|
||||
@@ -36,6 +36,7 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="提案列表" :columns.sync="tableColumns"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
@@ -60,7 +61,7 @@ layout("/layouts/platform.html"){
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<el-table-column label="操作" fixed="right" width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
</template>
|
||||
@@ -95,7 +96,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
@@ -119,8 +120,10 @@ layout("/layouts/platform.html"){
|
||||
{label: "团长审核", prop: "delegationAudit"},
|
||||
],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
approval: false,
|
||||
searchName: "proposalName",
|
||||
searchName2: "su.username",
|
||||
},
|
||||
showApprovalForm: false,
|
||||
sessionOptions: []
|
||||
}
|
||||
@@ -149,9 +152,6 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
|
||||
// 加载教代会信息
|
||||
this.listOpenSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+46
-45
@@ -9,9 +9,7 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="撰写提案" define_key="JDHTA">
|
||||
<template slot="header-right-label">
|
||||
<span style="margin-right: 15px" v-if="!formData.id">
|
||||
<el-link type="success" @click="openImport">导入</el-link>
|
||||
</span>
|
||||
<el-link type="primary" @click="openImport" v-if="!formData.id" style="margin-right: 15px">导入提案</el-link>
|
||||
</template>
|
||||
</snaker-start>
|
||||
<template>
|
||||
@@ -186,49 +184,52 @@ layout("/layouts/platform.html"){
|
||||
:close-on-click-modal="false"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="importTemplateType">
|
||||
<el-radio :label="1">excel</el-radio>
|
||||
<el-radio :label="2">word</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin-top: 20px;">
|
||||
<el-col :span="24">
|
||||
<el-button size="medium" type="" style="width: 200px"
|
||||
@click="downloadTemplate"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="importTemplateType">
|
||||
<el-radio :label="1">excel</el-radio>
|
||||
<el-radio :label="2">word</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin-top: 20px;">
|
||||
<el-col :span="24">
|
||||
<el-button size="medium" type="" style="width: 200px"
|
||||
@click="downloadTemplate"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
}"
|
||||
:on-change="(file, fileList) => {
|
||||
:on-change="(file, fileList) => {
|
||||
if(this.importTemplateType === 2) {
|
||||
importData.fileList = fileHandleChange(file, fileList,{type:['docx']})
|
||||
} else {
|
||||
importData.fileList = fileHandleChange(file, fileList,{type:['xlsx']})
|
||||
}
|
||||
}"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
@@ -245,14 +246,14 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
|
||||
|
||||
// 将 window.location 的引用存储在响应式数据中
|
||||
location: window.location,
|
||||
importTemplateType: 1,
|
||||
importData: {},
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
|
||||
|
||||
formData: {},
|
||||
sessionOptions: [],
|
||||
sourceOptions: [],
|
||||
@@ -356,7 +357,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 打开导入窗口
|
||||
async openImport() {
|
||||
this.importData = {
|
||||
@@ -364,7 +365,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
|
||||
|
||||
// 下载导入模板
|
||||
async downloadTemplate() {
|
||||
let templateType = '.xlsx'
|
||||
@@ -373,7 +374,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
this.location.href='/platform/basics/downloadTemplate?filePath=proposal/proposal' + templateType + '&fileName=教职工代表大会提案表' + templateType
|
||||
},
|
||||
|
||||
|
||||
// 开始导入数据
|
||||
async doImport() {
|
||||
if (!this.importData.fileList.length) {
|
||||
@@ -517,7 +518,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 查询字典 撰写方式
|
||||
async getDictByCode(code) {
|
||||
const res = await $.get("/platform/proposal/write/listSourceByCode", {code: code})
|
||||
@@ -567,7 +568,7 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, "mobile", this.$store.state.user.mobile)
|
||||
this.$set(this.formData, "unitName", this.$store.state.user.unit?.name)
|
||||
}
|
||||
|
||||
|
||||
// 撰写方式
|
||||
this.allSourceOptions = await this.getDictByCode("PROPOSAL_SOURCE")
|
||||
this.sourceOptions = this.allSourceOptions
|
||||
|
||||
Reference in New Issue
Block a user