Compare commits
No commits in common. "8f66f73e52cddda75044561e4644ce2f0424c2da" and "d03c3cc09a938955291f28f9ff1b3ad02739bf8c" have entirely different histories.
8f66f73e52
...
d03c3cc09a
|
@ -138,56 +138,4 @@ LEFT OUTER JOIN pro_project_apply ppa ON DEF.BUSINESS_KEY_ = ppa.id
|
||||||
LEFT JOIN sys_user ru ON ru.user_id = RES.ASSIGNEE_
|
LEFT JOIN sys_user ru ON ru.user_id = RES.ASSIGNEE_
|
||||||
LEFT JOIN sys_dept rd ON rd.dept_id = ru.dept_id
|
LEFT JOIN sys_dept rd ON rd.dept_id = ru.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
RES.ASSIGNEE_ is not null and RES.END_TIME_ is not null)
|
RES.ASSIGNEE_ is not null and RES.END_TIME_ is not null)
|
||||||
|
|
||||||
##审批意见
|
|
||||||
DROP view vw_flow_comment;
|
|
||||||
CREATE VIEW vw_flow_comment AS (
|
|
||||||
SELECT
|
|
||||||
hi.ID_ as cc,
|
|
||||||
hc.ID_ AS commentId,
|
|
||||||
hc.TYPE_ AS commentType,
|
|
||||||
ht.ID_ AS taskId,
|
|
||||||
ht.NAME_ AS taskName,
|
|
||||||
ht.REV_ AS rev,
|
|
||||||
CASE
|
|
||||||
WHEN hc.TYPE_ = 1 and ht.NAME_ !='提交申请' THEN
|
|
||||||
'通过'
|
|
||||||
WHEN hc.TYPE_ = 2 THEN
|
|
||||||
'退回'
|
|
||||||
WHEN hc.TYPE_ = 3 THEN
|
|
||||||
'驳回'
|
|
||||||
WHEN hc.TYPE_ = 4 THEN
|
|
||||||
'委派'
|
|
||||||
WHEN hc.TYPE_ = 5 THEN
|
|
||||||
'转办'
|
|
||||||
WHEN hc.TYPE_ = 6 THEN
|
|
||||||
'终止'
|
|
||||||
WHEN hc.TYPE_ = 7 THEN
|
|
||||||
'撤回'
|
|
||||||
END AS commentResult,
|
|
||||||
ht.PROC_INST_ID_ AS procInstId,
|
|
||||||
ht.TASK_DEF_KEY_ AS taskDefKey,
|
|
||||||
ht.EXECUTION_ID_ AS executionId,
|
|
||||||
ht.DELETE_REASON_ AS deleteReason,
|
|
||||||
DATE_FORMAT(
|
|
||||||
ht.START_TIME_,
|
|
||||||
'%Y-%m-%d %H:%i:%S'
|
|
||||||
) AS startTime,
|
|
||||||
DATE_FORMAT(
|
|
||||||
ht.END_TIME_,
|
|
||||||
'%Y-%m-%d %H:%i:%S'
|
|
||||||
) AS endTime,
|
|
||||||
ht.DURATION_ AS duration,
|
|
||||||
hc.MESSAGE_ AS message,
|
|
||||||
ru.nick_name AS assigneeName,
|
|
||||||
rd.dept_name AS deptName,
|
|
||||||
r.role_name as candidate
|
|
||||||
FROM
|
|
||||||
act_hi_taskinst ht
|
|
||||||
LEFT JOIN act_hi_comment hc ON hc.TASK_ID_ = ht.ID_ or (hc.TASK_ID_ is null and hc.PROC_INST_ID_ = ht.PROC_INST_ID_)
|
|
||||||
LEFT JOIN act_hi_identitylink hi on hi.TYPE_ = 'candidate' and hi.TASK_ID_ = ht.ID_ and hi.USER_ID_ IS NULL
|
|
||||||
left JOIN sys_role r on r.role_id = hi.group_Id_
|
|
||||||
LEFT JOIN sys_user ru ON ru.user_id = ht.ASSIGNEE_
|
|
||||||
LEFT JOIN sys_dept rd ON rd.dept_id = ru.dept_id
|
|
||||||
where hc.TYPE_ is null or hc.TYPE_!='event')
|
|
|
@ -2,7 +2,7 @@ package com.yanzhu.flowable.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.yanzhu.common.core.domain.AjaxResult;
|
import com.yanzhu.common.core.domain.AjaxResult;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskVo;
|
import com.yanzhu.system.domain.flowable.FlowTaskVo;
|
||||||
import com.yanzhu.flowable.service.IFlowInstanceService;
|
import com.yanzhu.flowable.service.IFlowInstanceService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import com.yanzhu.common.core.domain.AjaxResult;
|
||||||
import com.yanzhu.common.enums.BusinessType;
|
import com.yanzhu.common.enums.BusinessType;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskDto;
|
import com.yanzhu.flowable.domain.FlowTaskDto;
|
||||||
import com.yanzhu.system.domain.flowable.FlowQueryVo;
|
import com.yanzhu.system.domain.flowable.FlowQueryVo;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskVo;
|
import com.yanzhu.system.domain.flowable.FlowTaskVo;
|
||||||
import com.yanzhu.flowable.service.IFlowTaskService;
|
import com.yanzhu.flowable.service.IFlowTaskService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
@ -95,13 +95,6 @@ public class FlowTaskController {
|
||||||
return flowTaskService.complete(flowTaskVo);
|
return flowTaskService.complete(flowTaskVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "重新提交流程")
|
|
||||||
@Log(title = "重新提交流程", businessType = BusinessType.UPDATE)
|
|
||||||
@PostMapping(value = "/completeAndModify")
|
|
||||||
public AjaxResult completeAndModify(@RequestBody FlowTaskVo flowTaskVo) {
|
|
||||||
return flowTaskService.complete(flowTaskVo);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "驳回任务")
|
@ApiOperation(value = "驳回任务")
|
||||||
@Log(title = "驳回流程", businessType = BusinessType.UPDATE)
|
@Log(title = "驳回流程", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping(value = "/reject")
|
@PostMapping(value = "/reject")
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
package com.yanzhu.flowable.listener;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
|
||||||
import org.flowable.engine.delegate.ExecutionListener;
|
|
||||||
import org.flowable.engine.delegate.TaskListener;
|
|
||||||
import org.flowable.task.service.delegate.DelegateTask;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务监听器
|
|
||||||
*
|
|
||||||
* create(创建):在任务被创建且所有的任务属性设置完成后才触发
|
|
||||||
* assignment(指派):在任务被分配给某个办理人之后触发
|
|
||||||
* complete(完成):在配置了监听器的上一个任务完成时触发
|
|
||||||
* delete(删除):在任务即将被删除前触发。请注意任务由completeTask正常完成时也会触发
|
|
||||||
*
|
|
||||||
* @author Tony
|
|
||||||
* @date 2021/4/20
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
public class FlowTaskEndListener implements ExecutionListener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void notify(DelegateExecution delegateExecution) {
|
|
||||||
log.info("任务结束监听器:{}", delegateExecution);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -22,8 +22,11 @@ public class FlowTaskListener implements TaskListener{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void notify(DelegateTask delegateTask) {
|
public void notify(DelegateTask delegateTask) {
|
||||||
|
|
||||||
log.info("任务监听器:{}", delegateTask);
|
log.info("任务监听器:{}", delegateTask);
|
||||||
// TODO 获取事件类型 delegateTask.getEventName(),可以通过监听器给任务执行人发送相应的通知消息
|
// TODO 获取事件类型 delegateTask.getEventName(),可以通过监听器给任务执行人发送相应的通知消息
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.yanzhu.flowable.service;
|
package com.yanzhu.flowable.service;
|
||||||
|
|
||||||
import com.yanzhu.common.core.domain.AjaxResult;
|
import com.yanzhu.common.core.domain.AjaxResult;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskVo;
|
import com.yanzhu.system.domain.flowable.FlowTaskVo;
|
||||||
import org.flowable.engine.history.HistoricProcessInstance;
|
import org.flowable.engine.history.HistoricProcessInstance;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.yanzhu.flowable.service;
|
||||||
|
|
||||||
import com.yanzhu.common.core.domain.AjaxResult;
|
import com.yanzhu.common.core.domain.AjaxResult;
|
||||||
import com.yanzhu.system.domain.flowable.FlowQueryVo;
|
import com.yanzhu.system.domain.flowable.FlowQueryVo;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskVo;
|
import com.yanzhu.system.domain.flowable.FlowTaskVo;
|
||||||
import org.flowable.task.api.Task;
|
import org.flowable.task.api.Task;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
|
@ -199,8 +199,12 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult startProcessInstanceById(String procDefId, ProProjectApply proProjectApply) {
|
public AjaxResult startProcessInstanceById(String procDefId, ProProjectApply proProjectApply) {
|
||||||
try {
|
try {
|
||||||
/**保存流程表单**/
|
int res;
|
||||||
int res = proProjectApplyService.insertProProjectApply(proProjectApply);
|
if(proProjectApply.getId()!=null){
|
||||||
|
res = proProjectApplyService.updateProProjectApply(proProjectApply);
|
||||||
|
}else{
|
||||||
|
res = proProjectApplyService.insertProProjectApply(proProjectApply);
|
||||||
|
}
|
||||||
if(res>0){
|
if(res>0){
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId)
|
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package com.yanzhu.flowable.service.impl;
|
package com.yanzhu.flowable.service.impl;
|
||||||
|
|
||||||
|
|
||||||
import com.yanzhu.common.core.domain.AjaxResult;
|
import com.yanzhu.common.core.domain.AjaxResult;
|
||||||
import com.yanzhu.common.utils.SecurityUtils;
|
import com.yanzhu.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskVo;
|
import com.yanzhu.system.domain.flowable.FlowTaskVo;
|
||||||
import com.yanzhu.flowable.factory.FlowServiceFactory;
|
import com.yanzhu.flowable.factory.FlowServiceFactory;
|
||||||
import com.yanzhu.flowable.service.IFlowInstanceService;
|
import com.yanzhu.flowable.service.IFlowInstanceService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.yanzhu.flowable.service.impl;
|
package com.yanzhu.flowable.service.impl;
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.alibaba.fastjson2.TypeReference;
|
import com.alibaba.fastjson2.TypeReference;
|
||||||
|
@ -18,9 +19,8 @@ import com.yanzhu.flowable.domain.FlowNextDto;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskDto;
|
import com.yanzhu.flowable.domain.FlowTaskDto;
|
||||||
import com.yanzhu.flowable.domain.FlowViewerDto;
|
import com.yanzhu.flowable.domain.FlowViewerDto;
|
||||||
import com.yanzhu.flowable.flow.ModelUtils;
|
import com.yanzhu.flowable.flow.ModelUtils;
|
||||||
import com.yanzhu.project.service.IProProjectApplyService;
|
|
||||||
import com.yanzhu.system.domain.flowable.FlowQueryVo;
|
import com.yanzhu.system.domain.flowable.FlowQueryVo;
|
||||||
import com.yanzhu.flowable.domain.FlowTaskVo;
|
import com.yanzhu.system.domain.flowable.FlowTaskVo;
|
||||||
import com.yanzhu.flowable.factory.FlowServiceFactory;
|
import com.yanzhu.flowable.factory.FlowServiceFactory;
|
||||||
import com.yanzhu.flowable.flow.CustomProcessDiagramGenerator;
|
import com.yanzhu.flowable.flow.CustomProcessDiagramGenerator;
|
||||||
import com.yanzhu.flowable.flow.FindNextNodeUtil;
|
import com.yanzhu.flowable.flow.FindNextNodeUtil;
|
||||||
|
@ -56,7 +56,6 @@ import org.flowable.task.api.history.HistoricTaskInstance;
|
||||||
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
||||||
import org.flowable.engine.impl.cmd.AddMultiInstanceExecutionCmd;
|
import org.flowable.engine.impl.cmd.AddMultiInstanceExecutionCmd;
|
||||||
import org.flowable.engine.impl.cmd.DeleteMultiInstanceExecutionCmd;
|
import org.flowable.engine.impl.cmd.DeleteMultiInstanceExecutionCmd;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@ -87,9 +86,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
||||||
@Resource
|
@Resource
|
||||||
private ISysFormService sysFormService;
|
private ISysFormService sysFormService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IProProjectApplyService proProjectApplyService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成任务
|
* 完成任务
|
||||||
*
|
*
|
||||||
|
@ -98,22 +94,18 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult complete(FlowTaskVo taskVo) {
|
public AjaxResult complete(FlowTaskVo taskVo) {
|
||||||
/**表单不为空时,重新修改表单**/
|
|
||||||
if(!Objects.isNull(taskVo.getProProjectApply())){
|
|
||||||
proProjectApplyService.updateProProjectApply(taskVo.getProProjectApply());
|
|
||||||
}
|
|
||||||
Task task = taskService.createTaskQuery().taskId(taskVo.getTaskId()).singleResult();
|
Task task = taskService.createTaskQuery().taskId(taskVo.getTaskId()).singleResult();
|
||||||
if (Objects.isNull(task)) {
|
if (Objects.isNull(task)) {
|
||||||
return AjaxResult.error("任务不存在");
|
return AjaxResult.error("任务不存在");
|
||||||
}
|
}
|
||||||
if (DelegationState.PENDING.equals(task.getDelegationState())) {
|
if (DelegationState.PENDING.equals(task.getDelegationState())) {
|
||||||
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.DELEGATE.getType(), taskVo.getComment());
|
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.DELEGATE.getType(), taskVo.getComment());
|
||||||
taskService.resolveTask(taskVo.getTaskId());
|
taskService.resolveTask(taskVo.getTaskId(), taskVo.getVariables());
|
||||||
} else {
|
} else {
|
||||||
Long userId = SecurityUtils.getUserId();
|
|
||||||
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), taskVo.getComment());
|
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), taskVo.getComment());
|
||||||
taskService.setAssignee(taskVo.getTaskId(), Convert.toStr(userId));
|
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
|
||||||
taskService.complete(taskVo.getTaskId());
|
taskService.setAssignee(taskVo.getTaskId(), userId.toString());
|
||||||
|
taskService.complete(taskVo.getTaskId(), taskVo.getVariables());
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.yanzhu.flowable.domain;
|
package com.yanzhu.system.domain.flowable;
|
||||||
|
|
||||||
import com.yanzhu.project.domain.ProProjectApply;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -46,9 +45,6 @@ public class FlowTaskVo {
|
||||||
@ApiModelProperty("流程变量信息")
|
@ApiModelProperty("流程变量信息")
|
||||||
private Map<String, Object> variables;
|
private Map<String, Object> variables;
|
||||||
|
|
||||||
@ApiModelProperty("流程变量信息")
|
|
||||||
private ProProjectApply proProjectApply;
|
|
||||||
|
|
||||||
@ApiModelProperty("审批人")
|
@ApiModelProperty("审批人")
|
||||||
private String assignee;
|
private String assignee;
|
||||||
|
|
|
@ -123,7 +123,6 @@ export function exportDeployment(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 流程节点表单
|
// 流程节点表单
|
||||||
export function flowTaskForm(query) {
|
export function flowTaskForm(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -132,13 +131,3 @@ export function flowTaskForm(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 完成任务并修改表单
|
|
||||||
export function completeAndModify(data) {
|
|
||||||
return request({
|
|
||||||
url: '/flowable/task/completeAndModify',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<div class="canvas" ref="flowCanvas"></div>
|
<div class="canvas" ref="flowCanvas"></div>
|
||||||
<div class="maskLayer" />
|
<div class="maskLayer" />
|
||||||
</div>
|
</div>
|
||||||
<el-timeline style="padding-left: 0px !important;">
|
<el-timeline>
|
||||||
<el-timeline-item
|
<el-timeline-item
|
||||||
v-for="(item, index) in flowRecordList"
|
v-for="(item, index) in flowRecordList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="申请时间">
|
<el-form-item label="申请时间">
|
||||||
{{ options.createTime }}
|
{{ parseTime(initData.createTime, "{y}-{m}-{d} {h}:{i}") }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="使用时间" v-if="initData.useTime">
|
<el-form-item label="使用时间" v-if="initData.useTime">
|
||||||
{{ parseTime(initData.useTime, "{y}-{m}-{d} {h}:{i}") }}
|
{{ parseTime(initData.useTime, "{y}-{m}-{d} {h}:{i}") }}
|
||||||
|
@ -523,7 +523,7 @@ export default {
|
||||||
}
|
}
|
||||||
.containers {
|
.containers {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100px;
|
height: 150px;
|
||||||
.canvas {
|
.canvas {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
@ -548,7 +548,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.djs-container svg {
|
.djs-container svg {
|
||||||
min-height: 100px;
|
min-height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight.djs-shape .djs-visual > :nth-child(1) {
|
.highlight.djs-shape .djs-visual > :nth-child(1) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -148,7 +148,7 @@
|
||||||
<el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
|
<el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请时间" align="center" prop="createTime" width="160" />
|
<el-table-column label="提交时间" align="center" prop="createTime" width="160" />
|
||||||
<el-table-column label="流程状态" align="center" width="100">
|
<el-table-column label="流程状态" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.finishTime == null" size="mini">进行中</el-tag>
|
<el-tag v-if="scope.row.finishTime == null" size="mini">进行中</el-tag>
|
||||||
|
@ -362,11 +362,11 @@
|
||||||
rows="5"
|
rows="5"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="text-align: right;">
|
|
||||||
<el-button type="primary" @click="handleStopClick">确 定</el-button>
|
|
||||||
<el-button @click="cancelStop">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleStopClick">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<detailDrawer ref="detailDrawer"></detailDrawer>
|
<detailDrawer ref="detailDrawer"></detailDrawer>
|
||||||
<editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer>
|
<editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer>
|
||||||
|
@ -417,7 +417,6 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
stopOpen: false,
|
|
||||||
src: "",
|
src: "",
|
||||||
definitionList: [],
|
definitionList: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
|
@ -512,9 +511,6 @@ export default {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
cancelStop() {
|
|
||||||
this.stopOpen = false;
|
|
||||||
},
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
|
@ -590,6 +586,16 @@ export default {
|
||||||
this.$refs.initTaskDrawer.show(row);
|
this.$refs.initTaskDrawer.show(row);
|
||||||
},
|
},
|
||||||
/** 取消流程申请 */
|
/** 取消流程申请 */
|
||||||
|
handleStop(row) {
|
||||||
|
const params = {
|
||||||
|
instanceId: row.procInsId,
|
||||||
|
};
|
||||||
|
stopProcess(params).then((res) => {
|
||||||
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 取消流程申请 */
|
||||||
handleStop(row) {
|
handleStop(row) {
|
||||||
this.form.taskId = row.taskId;
|
this.form.taskId = row.taskId;
|
||||||
this.form.userId = this.$store.getters.userId;
|
this.form.userId = this.$store.getters.userId;
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
<el-form-item label="附件说明" prop="applyFiles">
|
<el-form-item label="附件说明" prop="applyFiles">
|
||||||
<FileUpload
|
<FileUpload
|
||||||
:limit="9"
|
:limit="9"
|
||||||
v-model="form.applyFiles"
|
|
||||||
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
|
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -181,7 +180,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: center; margin: 20px 0px">
|
<div style="text-align: center; margin: 20px 0px;">
|
||||||
<el-button type="primary" @click="submitForm">提交申请</el-button>
|
<el-button type="primary" @click="submitForm">提交申请</el-button>
|
||||||
<el-button @click="doCanel">取 消</el-button>
|
<el-button @click="doCanel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -217,7 +216,7 @@ export default {
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
deptId: null,
|
deptId: null,
|
||||||
projId: 0,
|
projId: null,
|
||||||
projName: null,
|
projName: null,
|
||||||
parProjName: null,
|
parProjName: null,
|
||||||
applyType: null,
|
applyType: null,
|
||||||
|
@ -282,7 +281,6 @@ export default {
|
||||||
},
|
},
|
||||||
// 项目选择
|
// 项目选择
|
||||||
projectChage(val) {
|
projectChage(val) {
|
||||||
this.$forceUpdate();
|
|
||||||
for (let i = 0; i < this.projectOptions.length; i++) {
|
for (let i = 0; i < this.projectOptions.length; i++) {
|
||||||
if (this.projectOptions[i].id == val) {
|
if (this.projectOptions[i].id == val) {
|
||||||
this.form.projName = this.projectOptions[i].name;
|
this.form.projName = this.projectOptions[i].name;
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row> -->
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
|
@ -90,45 +90,21 @@
|
||||||
border
|
border
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="项目单位"
|
label="任务编号"
|
||||||
align="center"
|
align="center"
|
||||||
prop="businessKeyParName"
|
prop="taskId"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column label="流程名称" align="center" prop="procDefName" />
|
||||||
label="项目名称"
|
|
||||||
align="center"
|
|
||||||
prop="businessKeyName"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="流程名称"
|
|
||||||
align="center"
|
|
||||||
prop="procDefName"
|
|
||||||
width="120"
|
|
||||||
:show-overflow-tooltip="true"
|
|
||||||
/>
|
|
||||||
<el-table-column label="流程编号" align="center" width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<label>{{ scope.row.taskId }}</label>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="流程类别" align="center" prop="category" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag
|
|
||||||
:options="dict.type.sys_process_category"
|
|
||||||
:value="scope.row.category"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="当前节点" align="center" prop="taskName" />
|
<el-table-column label="当前节点" align="center" prop="taskName" />
|
||||||
<el-table-column label="流程版本" align="center">
|
<el-table-column label="流程版本" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
|
<el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="流程发起人" align="center" width="180">
|
<el-table-column label="流程发起人" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<label
|
<label
|
||||||
>{{ scope.row.startUserName }}
|
>{{ scope.row.startUserName }}
|
||||||
|
@ -136,12 +112,7 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="接收时间" align="center" prop="createTime" width="160" />
|
<el-table-column label="接收时间" align="center" prop="createTime" width="180" />
|
||||||
<el-table-column label="处理耗时" align="center" prop="duration" width="150">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{getDurationDate(scope.row.duration)}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -162,8 +133,6 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
<approveDrawer ref="approveDrawer" :closeCallBack="getList"></approveDrawer>
|
|
||||||
<editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -241,20 +210,26 @@ export default {
|
||||||
this.queryParams.params["endDate"] = this.daterangeCheckTime[1];
|
this.queryParams.params["endDate"] = this.daterangeCheckTime[1];
|
||||||
}
|
}
|
||||||
//重新刷新代办任务
|
//重新刷新代办任务
|
||||||
this.$store.dispatch("initMyTaskNum");
|
this.$store.dispatch('initMyTaskNum');
|
||||||
myAwaitFlowTaskList(this.queryParams).then((response) => {
|
myAwaitFlowTaskList(this.queryParams).then((response) => {
|
||||||
this.todoList = response.rows;
|
this.todoList = response.data.records;
|
||||||
this.total = response.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 跳转到处理页面
|
// 跳转到处理页面
|
||||||
handleProcess(row) {
|
handleProcess(row) {
|
||||||
//if (row.taskName == "提交申请") {
|
this.$router.push({
|
||||||
this.$refs.editTaskDrawer.show(row);
|
path: "/flowable/task/todo/detail/index",
|
||||||
//} else {
|
query: {
|
||||||
// this.$refs.approveDrawer.show(row);
|
procInsId: row.procInsId,
|
||||||
//}
|
executionId: row.executionId,
|
||||||
|
deployId: row.deployId,
|
||||||
|
taskId: row.taskId,
|
||||||
|
taskName: row.taskName,
|
||||||
|
startUser: row.startUserName + "-" + row.startDeptName,
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -275,7 +250,7 @@ export default {
|
||||||
parentDeploymentId: null,
|
parentDeploymentId: null,
|
||||||
engineVersion: null,
|
engineVersion: null,
|
||||||
};
|
};
|
||||||
this.daterangeCheckTime = [];
|
this.daterangeCheckTime=[];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
@ -286,7 +261,7 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.daterangeCheckTime = [];
|
this.daterangeCheckTime=[];
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|
Loading…
Reference in New Issue