提交代码
parent
ab67fcc363
commit
fb31744f9b
|
@ -139,3 +139,55 @@ 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.system.domain.flowable.FlowTaskVo;
|
import com.yanzhu.flowable.domain.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.system.domain.flowable.FlowTaskVo;
|
import com.yanzhu.flowable.domain.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,6 +95,13 @@ 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,5 +1,6 @@
|
||||||
package com.yanzhu.system.domain.flowable;
|
package com.yanzhu.flowable.domain;
|
||||||
|
|
||||||
|
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;
|
||||||
|
@ -45,6 +46,9 @@ 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;
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
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,11 +22,8 @@ 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.system.domain.flowable.FlowTaskVo;
|
import com.yanzhu.flowable.domain.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.system.domain.flowable.FlowTaskVo;
|
import com.yanzhu.flowable.domain.FlowTaskVo;
|
||||||
import org.flowable.task.api.Task;
|
import org.flowable.task.api.Task;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
|
@ -199,12 +199,8 @@ 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;
|
/**保存流程表单**/
|
||||||
if(proProjectApply.getId()!=null){
|
int res = proProjectApplyService.insertProProjectApply(proProjectApply);
|
||||||
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,9 +1,8 @@
|
||||||
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.system.domain.flowable.FlowTaskVo;
|
import com.yanzhu.flowable.domain.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,6 +1,5 @@
|
||||||
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;
|
||||||
|
@ -19,8 +18,9 @@ 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.system.domain.flowable.FlowTaskVo;
|
import com.yanzhu.flowable.domain.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,6 +56,7 @@ 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;
|
||||||
|
|
||||||
|
@ -86,6 +87,9 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
||||||
@Resource
|
@Resource
|
||||||
private ISysFormService sysFormService;
|
private ISysFormService sysFormService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProProjectApplyService proProjectApplyService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成任务
|
* 完成任务
|
||||||
*
|
*
|
||||||
|
@ -94,18 +98,22 @@ 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(), taskVo.getVariables());
|
taskService.resolveTask(taskVo.getTaskId());
|
||||||
} 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());
|
||||||
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
|
taskService.setAssignee(taskVo.getTaskId(), Convert.toStr(userId));
|
||||||
taskService.setAssignee(taskVo.getTaskId(), userId.toString());
|
taskService.complete(taskVo.getTaskId());
|
||||||
taskService.complete(taskVo.getTaskId(), taskVo.getVariables());
|
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,7 @@ export function exportDeployment(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 流程节点表单
|
// 流程节点表单
|
||||||
export function flowTaskForm(query) {
|
export function flowTaskForm(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -131,3 +132,13 @@ 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>
|
<el-timeline style="padding-left: 0px !important;">
|
||||||
<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="申请时间">
|
||||||
{{ parseTime(initData.createTime, "{y}-{m}-{d} {h}:{i}") }}
|
{{ options.createTime }}
|
||||||
</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: 150px;
|
height: 100px;
|
||||||
.canvas {
|
.canvas {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
@ -548,7 +548,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.djs-container svg {
|
.djs-container svg {
|
||||||
min-height: 150px;
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight.djs-shape .djs-visual > :nth-child(1) {
|
.highlight.djs-shape .djs-visual > :nth-child(1) {
|
||||||
|
|
|
@ -1,88 +1,293 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-editTaskDrawer">
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-if="onOpen"
|
v-if="onOpen"
|
||||||
:visible.sync="onOpen"
|
:visible.sync="onOpen"
|
||||||
ref="drawer"
|
ref="drawer"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="60%"
|
size="70%"
|
||||||
@close="closeCallBack"
|
@close="closeCallBack"
|
||||||
>
|
>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div>临时工程申请 【{{ title }}】</div>
|
<div>
|
||||||
|
临时工程申请 【{{ title }}】<span v-if="showjd">
|
||||||
|
- 当前节点【{{ options.taskName }}】</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<div class="drawer">
|
||||||
|
<div class="drawerLeft">
|
||||||
|
<el-timeline style="padding-left: 0px !important">
|
||||||
|
<el-timeline-item
|
||||||
|
v-for="(item, index) in flowRecordList"
|
||||||
|
:key="index"
|
||||||
|
:icon="setIcon(item)"
|
||||||
|
:color="setColor(item)"
|
||||||
|
>
|
||||||
|
<p style="font-weight: 700">
|
||||||
|
{{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
|
||||||
|
</p>
|
||||||
|
<el-card :body-style="{ padding: '6px' }">
|
||||||
|
<el-descriptions class="margin-top" :column="1" size="small" border>
|
||||||
|
<el-descriptions-item
|
||||||
|
v-if="item.assigneeName"
|
||||||
|
label-class-name="my-label"
|
||||||
|
:labelStyle="labelStyle"
|
||||||
|
>
|
||||||
|
<template slot="label"><i class="el-icon-user"></i>办理人</template>
|
||||||
|
{{ item.assigneeName }}
|
||||||
|
<el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
v-if="item.candidate"
|
||||||
|
label-class-name="my-label"
|
||||||
|
:labelStyle="labelStyle"
|
||||||
|
>
|
||||||
|
<template slot="label"><i class="el-icon-user"></i>候选办理</template>
|
||||||
|
{{ item.candidate }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
v-if="item.deleteReason"
|
||||||
|
label-class-name="my-label"
|
||||||
|
:labelStyle="labelStyle"
|
||||||
|
>
|
||||||
|
<template slot="label"><i class="el-icon-user"></i>驳回节点</template>
|
||||||
|
{{ getDeleteReason(item.deleteReason) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
label-class-name="my-label"
|
||||||
|
:labelStyle="labelStyle"
|
||||||
|
>
|
||||||
|
<template slot="label"><i class="el-icon-date"></i>接收时间</template>
|
||||||
|
{{ item.startTime }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
v-if="item.endTime"
|
||||||
|
label-class-name="my-label"
|
||||||
|
:labelStyle="labelStyle"
|
||||||
|
>
|
||||||
|
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
|
||||||
|
{{ item.endTime }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
v-if="item.duration"
|
||||||
|
label-class-name="my-label"
|
||||||
|
:labelStyle="labelStyle"
|
||||||
|
>
|
||||||
|
<template slot="label"><i class="el-icon-time"></i>处理耗时</template>
|
||||||
|
{{ getDurationDateStr(item.duration) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
v-if="item.message"
|
||||||
|
label-class-name="my-label"
|
||||||
|
:labelStyle="labelStyle"
|
||||||
|
>
|
||||||
|
<template slot="label"
|
||||||
|
><i class="el-icon-tickets"></i>处理意见</template
|
||||||
|
>
|
||||||
|
{{ item.message }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
|
<div class="drawerRight">
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
:model="form"
|
:model="form"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
label-width="120px"
|
label-width="100px"
|
||||||
style="padding-right: 35px"
|
style="padding-left: 25px; padding-right: 25px"
|
||||||
>
|
>
|
||||||
<div class="block containers">
|
<div class="block containers">
|
||||||
<div class="canvas" ref="flowCanvas"></div>
|
<div class="canvas" ref="flowCanvas"></div>
|
||||||
<div class="maskLayer" />
|
<div class="maskLayer"></div>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="所属项目" prop="businessKey">
|
<el-form-item label="项目单位">
|
||||||
|
{{ form.parProjName }}
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目名称" prop="projId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.businessKey"
|
v-model="form.projId"
|
||||||
placeholder="请选择所属项目"
|
placeholder="请选择项目名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
filterable
|
filterable
|
||||||
:disabled="disPro"
|
|
||||||
@change="projectChage"
|
@change="projectChage"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) in projectOptions"
|
v-for="(item, index) in projectOptions"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.projectName"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发起单位">
|
<el-form-item label="申请类型">
|
||||||
{{ deptName }}
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="发起人">
|
|
||||||
{{ nickName }}
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审批事项">
|
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审批内容" prop="files">
|
<el-form-item label="申请人">
|
||||||
|
<label
|
||||||
|
>{{ nickName }}
|
||||||
|
<el-tag type="info" size="mini">{{ deptName }}</el-tag></label
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="申请原因" prop="applyReason">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
v-model="form.applyReason"
|
||||||
|
placeholder="请输入申请原因"
|
||||||
|
rows="3"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="附件说明" prop="applyFiles">
|
||||||
<FileUpload
|
<FileUpload
|
||||||
@input="fileInput"
|
|
||||||
:limit="9"
|
:limit="9"
|
||||||
v-model="form.files"
|
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>
|
||||||
<el-form-item label="申请说明" prop="remark">
|
<el-divider content-position="left" style="margin-left"
|
||||||
|
>申请明细信息</el-divider
|
||||||
|
>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAddProProjectApplyDetail"
|
||||||
|
>添加</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
@click="handleDeleteProProjectApplyDetail"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-table
|
||||||
|
:data="proProjectApplyDetailList"
|
||||||
|
:row-class-name="rowProProjectApplyDetailIndex"
|
||||||
|
@selection-change="handleProProjectApplyDetailSelectionChange"
|
||||||
|
ref="proProjectApplyDetail"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column label="序号" align="center" prop="index" width="50" />
|
||||||
|
<el-table-column align="center" prop="assetsId">
|
||||||
|
<template slot="header" slot-scope="scope">
|
||||||
|
<span class="required">申请明细</span>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-select
|
||||||
|
v-model="scope.row.assetsId"
|
||||||
|
placeholder="请选择申请明细"
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
@change="selectAssetsId"
|
||||||
|
>
|
||||||
|
<el-option-group
|
||||||
|
v-for="group in AssetsTypeOptions"
|
||||||
|
:key="group.id"
|
||||||
|
:label="group.name"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in group.childrenAssetsTypeList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-option-group>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="number" align="center" width="180">
|
||||||
|
<template slot="header" slot-scope="scope">
|
||||||
|
<span class="required">申请数量</span>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12"
|
||||||
|
><el-input v-model="scope.row.number" placeholder="数量"
|
||||||
|
/></el-col>
|
||||||
|
<el-col :span="12"
|
||||||
|
><el-select
|
||||||
|
v-model="scope.row.assetsUnit"
|
||||||
|
placeholder="单位"
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in getUnitOptions(scope.row.assetsId)"
|
||||||
|
:key="index"
|
||||||
|
:label="item"
|
||||||
|
:value="item"
|
||||||
|
>
|
||||||
|
</el-option> </el-select
|
||||||
|
></el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="showAssetsVersion"
|
||||||
|
label="申请规格"
|
||||||
|
align="center"
|
||||||
|
prop="assetsVersion"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="form.remark"
|
v-model="scope.row.assetsVersion"
|
||||||
placeholder="请输入申请说明"
|
placeholder="请输入申请规格"
|
||||||
rows="5"
|
rows="2"
|
||||||
|
maxlength="200"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</template>
|
||||||
<div style="text-align: center">
|
</el-table-column>
|
||||||
<el-button type="primary" @click="submitForm">提交流程</el-button>
|
<el-table-column prop="useReason" align="center">
|
||||||
|
<template slot="header" slot-scope="scope">
|
||||||
|
<span class="required">使用说明</span>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
v-model="scope.row.useReason"
|
||||||
|
placeholder="请输入申请规格"
|
||||||
|
rows="2"
|
||||||
|
maxlength="500"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="text-align: center; padding: 20px 0px">
|
||||||
|
<el-button type="primary" @click="submitForm">提交申请</el-button>
|
||||||
<el-button @click="doCanel">取 消</el-button>
|
<el-button @click="doCanel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
||||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||||
import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
|
import { getProjectApply } from "@/api/project/projectApply";
|
||||||
import { complete, getNextFlowNodeByStart } from "@/api/flowable/todo";
|
import { completeAndModify, getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||||
|
import { findCommentByProcInsId } from "@/api/flowable/businessKey";
|
||||||
|
import { findMyDeptProject } from "@/api/project/projectInfo";
|
||||||
|
import { findAllByCategory } from "@/api/base/assetsType";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
closeCallBack: {
|
closeCallBack: {
|
||||||
|
@ -99,25 +304,30 @@
|
||||||
title: "",
|
title: "",
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
businessKey: "",
|
id: null,
|
||||||
projectName: "",
|
deptId: null,
|
||||||
files: "",
|
projId: 0,
|
||||||
remark: "",
|
projName: null,
|
||||||
|
parProjName: null,
|
||||||
|
applyType: null,
|
||||||
|
applyStatus: null,
|
||||||
|
applyReason: null,
|
||||||
|
applyFiles: null,
|
||||||
|
applyUser: null,
|
||||||
|
useTime: null,
|
||||||
|
isDel: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null,
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
businessKey: [{ required: true, message: "请选择所属项目", trigger: "blur" }],
|
projId: [{ required: true, message: "请选择项目名称", trigger: "blur" }],
|
||||||
files: [{ required: true, message: "请上传申请内容", trigger: "blur" }],
|
applyReason: [{ required: true, message: "请输入申请原因", trigger: "blur" }],
|
||||||
remark: [
|
|
||||||
{ required: false, message: "请输入申请说明", trigger: "blur" },
|
|
||||||
{
|
|
||||||
max: 500,
|
|
||||||
message: "申请说明最多输入500字",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
},
|
||||||
],
|
projectOptions: [],
|
||||||
},
|
|
||||||
projectOptions: null,
|
|
||||||
deptName: null,
|
deptName: null,
|
||||||
nickName: null,
|
nickName: null,
|
||||||
disPro: false,
|
disPro: false,
|
||||||
|
@ -126,6 +336,16 @@
|
||||||
taskTitle: null,
|
taskTitle: null,
|
||||||
taskOpen: false,
|
taskOpen: false,
|
||||||
daterangeMarksTime: [],
|
daterangeMarksTime: [],
|
||||||
|
flowRecordList: [],
|
||||||
|
showjd: true,
|
||||||
|
labelStyle: { width: "160px" },
|
||||||
|
initData: {},
|
||||||
|
showAssetsVersion: false,
|
||||||
|
proProjectApplyDetailList: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedProProjectApplyDetail: [],
|
||||||
|
AssetsTypeOptions: [],
|
||||||
|
unitOptions: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -134,28 +354,59 @@
|
||||||
mounted() {},
|
mounted() {},
|
||||||
beforeDestroy() {},
|
beforeDestroy() {},
|
||||||
methods: {
|
methods: {
|
||||||
// 项目选择
|
// 查询和我相关的项目信息
|
||||||
projectChage(val) {
|
initMyProject() {
|
||||||
let projectName = "";
|
// 获取项目列表的接口
|
||||||
this.projectOptions.forEach((item) => {
|
findMyDeptProject().then((response) => {
|
||||||
if ((item.id = val)) {
|
if (response.code == 200) {
|
||||||
projectName = item.projectName;
|
this.projectOptions = response.data;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.form.projectName = projectName;
|
},
|
||||||
|
initCategoryAssetsType(val) {
|
||||||
|
// 获取项目列表的接口
|
||||||
|
findAllByCategory(val).then((response) => {
|
||||||
|
if (response.code == 200 && response.data) {
|
||||||
|
this.AssetsTypeOptions = response.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 项目选择
|
||||||
|
projectChage(val) {
|
||||||
|
this.$forceUpdate();
|
||||||
|
for (let i = 0; i < this.projectOptions.length; i++) {
|
||||||
|
if (this.projectOptions[i].id == val) {
|
||||||
|
this.form.projName = this.projectOptions[i].name;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doCanel() {
|
doCanel() {
|
||||||
this.onOpen = false;
|
this.onOpen = false;
|
||||||
},
|
},
|
||||||
show(options) {
|
show(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.onOpen = true;
|
this.initMyProject();
|
||||||
|
//物资设备类需要输入规格
|
||||||
|
if (options.category == 1) {
|
||||||
|
this.showAssetsVersion = true;
|
||||||
|
} else {
|
||||||
|
this.showAssetsVersion = false;
|
||||||
|
}
|
||||||
|
this.initCategoryAssetsType(options.category);
|
||||||
this.title = options.procDefName;
|
this.title = options.procDefName;
|
||||||
this.initFormDate(options.procInsId);
|
this.form.applyType = options.category;
|
||||||
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
|
this.form.parProjName = options.businessKeyParName;
|
||||||
|
this.nickName = options.startUserName;
|
||||||
|
this.deptName = options.startDeptName;
|
||||||
|
this.onOpen = true;
|
||||||
|
this.getFlowRecordList(options.procInsId, options.deployId);
|
||||||
|
this.initFormDate(options.businessKey);
|
||||||
|
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
|
||||||
|
(res) => {
|
||||||
this.initFlowImage(res.data);
|
this.initFlowImage(res.data);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
async initFlowImage(data) {
|
async initFlowImage(data) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
@ -167,55 +418,85 @@
|
||||||
await self.bpmnViewer.importXML(data.xmlData);
|
await self.bpmnViewer.importXML(data.xmlData);
|
||||||
// 自适应
|
// 自适应
|
||||||
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
|
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
|
||||||
if (data.nodeData !==undefined && data.nodeData.length > 0 ) {
|
if (data.nodeData !== undefined && data.nodeData.length > 0) {
|
||||||
self.fillColor(data.nodeData)
|
self.fillColor(data.nodeData);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err.message, err.warnings);
|
console.error(err.message, err.warnings);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 流程表单数据 */
|
/** 流程表单数据 */
|
||||||
initFormDate(procInsId, deployId) {
|
initFormDate(businessKey) {
|
||||||
this.projectOptions=[{id:this.options.businessKey,projectName:this.options.businessKeyName}];
|
getProjectApply(businessKey)
|
||||||
const params = {procInsId: procInsId}
|
.then((res) => {
|
||||||
findFormDatasByProcInsId(params).then(res => {
|
if (res.code == 200) {
|
||||||
this.form = res.data;
|
this.initData = res.data;
|
||||||
this.deptName = this.options.startDeptName;
|
this.form.id = res.data.id;
|
||||||
this.nickName = this.options.startUserName;
|
this.form.projId = res.data.projId;
|
||||||
this.form.taskId = this.options.taskId;
|
this.form.applyReason = res.data.applyReason;
|
||||||
this.form.taskName = this.options.taskName;
|
this.form.applyFiles = res.data.applyFiles;
|
||||||
this.form.userId = store.getters.userId;
|
let applyDetailList = [];
|
||||||
this.form.assignee = store.getters.name;
|
if (
|
||||||
this.form.procInsId = this.options.procInsId;
|
res.data.proProjectApplyDetailList &&
|
||||||
this.form.instanceId = this.options.procInsId;
|
res.data.proProjectApplyDetailList.length > 0
|
||||||
}).catch(res => {
|
) {
|
||||||
this.$message.error("数据异常,请联系管理员...");
|
for (let i = 0; i < res.data.proProjectApplyDetailList.length; i++) {
|
||||||
})
|
this.selectAssetsId(res.data.proProjectApplyDetailList[i].assetsId);
|
||||||
},
|
applyDetailList.push({
|
||||||
fileInput(files) {
|
index: i + 1,
|
||||||
let fileUrls = "";
|
assetsId: res.data.proProjectApplyDetailList[i].assetsId,
|
||||||
if (files.length > 0) {
|
number: res.data.proProjectApplyDetailList[i].number,
|
||||||
fileUrls = "";
|
assetsUnit: res.data.proProjectApplyDetailList[i].assetsUnit,
|
||||||
files.forEach((item) => {
|
assetsVersion: res.data.proProjectApplyDetailList[i].assetsVersion,
|
||||||
fileUrls += "," + item.url;
|
useReason: res.data.proProjectApplyDetailList[i].useReason,
|
||||||
});
|
});
|
||||||
fileUrls = fileUrls.substring(1);
|
|
||||||
}
|
}
|
||||||
this.form.files = fileUrls;
|
this.proProjectApplyDetailList = applyDetailList;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error("数据异常,请联系管理员...");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$message.error("数据异常,请联系管理员...");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
if (this.proProjectApplyDetailList.length == 0) {
|
||||||
this.form.variables={
|
this.$modal.msgWarning("请添加申请明细信息...");
|
||||||
businessKey:this.form.businessKey,
|
return false;
|
||||||
projectName:this.form.projectName,
|
|
||||||
files:this.form.files,
|
|
||||||
remark:this.form.remark,
|
|
||||||
INITIATOR:this.form.INITIATOR
|
|
||||||
}
|
}
|
||||||
complete(this.form).then(res => {
|
for (let i = 0; i < this.proProjectApplyDetailList.length; i++) {
|
||||||
this.$store.dispatch('initMyTaskNum');
|
if (!this.proProjectApplyDetailList[i].assetsId) {
|
||||||
|
this.$modal.msgWarning("申请明细第 ”" + (i + 1) + "“行未选择...");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this.proProjectApplyDetailList[i].number) {
|
||||||
|
this.$modal.msgWarning("申请明细第 ”" + (i + 1) + "“行数量未输入...");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this.proProjectApplyDetailList[i].assetsUnit) {
|
||||||
|
this.$modal.msgWarning("申请明细第 ”" + (i + 1) + "“行单位未选择...");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this.proProjectApplyDetailList[i].useReason) {
|
||||||
|
this.$modal.msgWarning("申请明细第 ”" + (i + 1) + "“行申请说明未输入...");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.form.proProjectApplyDetailList = this.proProjectApplyDetailList;
|
||||||
|
let flowTaskVo = {
|
||||||
|
taskId:this.options.taskId,
|
||||||
|
instanceId:this.options.procInsId,
|
||||||
|
instanceId:this.options.procInsId,
|
||||||
|
comment:store.getters.name+" 重新修改并重新提交申请。",
|
||||||
|
proProjectApply:this.form
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
completeAndModify(flowTaskVo).then((res) => {
|
||||||
|
this.$store.dispatch("initMyTaskNum");
|
||||||
this.$modal.msgSuccess("任务提交成功");
|
this.$modal.msgSuccess("任务提交成功");
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
//关闭并刷新列表
|
//关闭并刷新列表
|
||||||
|
@ -226,79 +507,285 @@
|
||||||
},
|
},
|
||||||
// 设置高亮颜色的
|
// 设置高亮颜色的
|
||||||
fillColor(nodeData) {
|
fillColor(nodeData) {
|
||||||
const canvas = this.bpmnViewer.get('canvas')
|
const canvas = this.bpmnViewer.get("canvas");
|
||||||
this.bpmnViewer.getDefinitions().rootElements[0].flowElements.forEach(n => {
|
this.bpmnViewer.getDefinitions().rootElements[0].flowElements.forEach((n) => {
|
||||||
const completeTask = nodeData.find(m => m.key === n.id)
|
const completeTask = nodeData.find((m) => m.key === n.id);
|
||||||
const todoTask = nodeData.find(m => !m.completed)
|
const todoTask = nodeData.find((m) => !m.completed);
|
||||||
const endTask = nodeData[nodeData.length - 1]
|
const endTask = nodeData[nodeData.length - 1];
|
||||||
if (n.$type === 'bpmn:UserTask') {
|
if (n.$type === "bpmn:UserTask") {
|
||||||
if (completeTask) {
|
if (completeTask) {
|
||||||
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
|
canvas.addMarker(
|
||||||
n.outgoing?.forEach(nn => {
|
n.id,
|
||||||
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
|
completeTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
n.outgoing?.forEach((nn) => {
|
||||||
|
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||||
if (targetTask) {
|
if (targetTask) {
|
||||||
if (todoTask && completeTask.key === todoTask.key && !todoTask.completed){
|
if (
|
||||||
canvas.addMarker(nn.id, todoTask.completed ? 'highlight' : 'highlight-todo')
|
todoTask &&
|
||||||
canvas.addMarker(nn.targetRef.id, todoTask.completed ? 'highlight' : 'highlight-todo')
|
completeTask.key === todoTask.key &&
|
||||||
}else {
|
!todoTask.completed
|
||||||
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
) {
|
||||||
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
canvas.addMarker(
|
||||||
|
nn.id,
|
||||||
|
todoTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
canvas.addMarker(
|
||||||
|
nn.targetRef.id,
|
||||||
|
todoTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
canvas.addMarker(
|
||||||
|
nn.id,
|
||||||
|
targetTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
canvas.addMarker(
|
||||||
|
nn.targetRef.id,
|
||||||
|
targetTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 排他网关
|
// 排他网关
|
||||||
else if (n.$type === 'bpmn:ExclusiveGateway') {
|
else if (n.$type === "bpmn:ExclusiveGateway") {
|
||||||
if (completeTask) {
|
if (completeTask) {
|
||||||
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
|
canvas.addMarker(
|
||||||
n.outgoing?.forEach(nn => {
|
n.id,
|
||||||
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
|
completeTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
n.outgoing?.forEach((nn) => {
|
||||||
|
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||||
if (targetTask) {
|
if (targetTask) {
|
||||||
|
canvas.addMarker(
|
||||||
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
nn.id,
|
||||||
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
targetTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
canvas.addMarker(
|
||||||
|
nn.targetRef.id,
|
||||||
|
targetTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 并行网关
|
// 并行网关
|
||||||
else if (n.$type === 'bpmn:ParallelGateway') {
|
else if (n.$type === "bpmn:ParallelGateway") {
|
||||||
if (completeTask) {
|
if (completeTask) {
|
||||||
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
|
canvas.addMarker(
|
||||||
n.outgoing?.forEach(nn => {
|
n.id,
|
||||||
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
|
completeTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
n.outgoing?.forEach((nn) => {
|
||||||
|
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||||
if (targetTask) {
|
if (targetTask) {
|
||||||
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
canvas.addMarker(
|
||||||
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
nn.id,
|
||||||
|
targetTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
|
canvas.addMarker(
|
||||||
|
nn.targetRef.id,
|
||||||
|
targetTask.completed ? "highlight" : "highlight-todo"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
} else if (n.$type === "bpmn:StartEvent") {
|
||||||
else if (n.$type === 'bpmn:StartEvent') {
|
n.outgoing.forEach((nn) => {
|
||||||
n.outgoing.forEach(nn => {
|
const completeTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||||
const completeTask = nodeData.find(m => m.key === nn.targetRef.id)
|
|
||||||
if (completeTask) {
|
if (completeTask) {
|
||||||
canvas.addMarker(nn.id, 'highlight')
|
canvas.addMarker(nn.id, "highlight");
|
||||||
canvas.addMarker(n.id, 'highlight')
|
canvas.addMarker(n.id, "highlight");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
} else if (n.$type === "bpmn:EndEvent") {
|
||||||
else if (n.$type === 'bpmn:EndEvent') {
|
|
||||||
if (endTask.key === n.id && endTask.completed) {
|
if (endTask.key === n.id && endTask.completed) {
|
||||||
canvas.addMarker(n.id, 'highlight')
|
canvas.addMarker(n.id, "highlight");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 项目申请明细序号 */
|
||||||
|
rowProProjectApplyDetailIndex({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex + 1;
|
||||||
|
},
|
||||||
|
/** 项目申请明细添加按钮操作 */
|
||||||
|
handleAddProProjectApplyDetail() {
|
||||||
|
let obj = {};
|
||||||
|
obj.superTypeId = "";
|
||||||
|
obj.superTypeName = "";
|
||||||
|
obj.typeId = "";
|
||||||
|
obj.typeName = "";
|
||||||
|
obj.assetsId = "";
|
||||||
|
obj.assetsName = "";
|
||||||
|
obj.assetsUnit = "";
|
||||||
|
obj.number = "";
|
||||||
|
obj.useTime = "";
|
||||||
|
obj.useReason = "";
|
||||||
|
obj.price = "";
|
||||||
|
obj.totalPrice = "";
|
||||||
|
obj.isDel = "";
|
||||||
|
obj.remark = "";
|
||||||
|
this.proProjectApplyDetailList.push(obj);
|
||||||
|
},
|
||||||
|
/** 项目申请明细删除按钮操作 */
|
||||||
|
handleDeleteProProjectApplyDetail() {
|
||||||
|
if (this.checkedProProjectApplyDetail.length == 0) {
|
||||||
|
this.$modal.msgError("请先选择要删除的项目申请明细数据");
|
||||||
|
} else {
|
||||||
|
const proProjectApplyDetailList = this.proProjectApplyDetailList;
|
||||||
|
const checkedProProjectApplyDetail = this.checkedProProjectApplyDetail;
|
||||||
|
this.proProjectApplyDetailList = proProjectApplyDetailList.filter(function (
|
||||||
|
item
|
||||||
|
) {
|
||||||
|
return checkedProProjectApplyDetail.indexOf(item.index) == -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 复选框选中数据 */
|
||||||
|
handleProProjectApplyDetailSelectionChange(selection) {
|
||||||
|
this.checkedProProjectApplyDetail = selection.map((item) => item.index);
|
||||||
|
},
|
||||||
|
selectAssetsId(val) {
|
||||||
|
for (let i = 0; i < this.AssetsTypeOptions.length; i++) {
|
||||||
|
for (
|
||||||
|
let x = 0;
|
||||||
|
x < this.AssetsTypeOptions[i].childrenAssetsTypeList.length;
|
||||||
|
x++
|
||||||
|
) {
|
||||||
|
if (this.AssetsTypeOptions[i].childrenAssetsTypeList[x].id == val) {
|
||||||
|
if (this.getUnitOptions(val) == null) {
|
||||||
|
this.unitOptions.push({
|
||||||
|
id: val,
|
||||||
|
data: this.AssetsTypeOptions[i].childrenAssetsTypeList[x].unit.split(","),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getUnitOptions(val) {
|
||||||
|
for (let i = 0; i < this.unitOptions.length; i++) {
|
||||||
|
if (this.unitOptions[i].id == val) {
|
||||||
|
return this.unitOptions[i].data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
setIcon(row) {
|
||||||
|
if (row.endTime) {
|
||||||
|
if (row.commentResult == "驳回") {
|
||||||
|
return "el-icon-close";
|
||||||
|
} else {
|
||||||
|
return "el-icon-check";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "el-icon-time";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setColor(row) {
|
||||||
|
if (row.endTime) {
|
||||||
|
if (row.commentResult == "驳回") {
|
||||||
|
return "#f56c6c";
|
||||||
|
} else {
|
||||||
|
return "#2bc418";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "#b3bdbb";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getSort(i) {
|
||||||
|
let num = this.flowRecordList.length - i;
|
||||||
|
if (num < 10) {
|
||||||
|
num = "0" + num;
|
||||||
|
}
|
||||||
|
return num + ". ";
|
||||||
|
},
|
||||||
|
/** 流程流转记录 */
|
||||||
|
getFlowRecordList(procInsId, deployId) {
|
||||||
|
const that = this;
|
||||||
|
const params = { procInsId: procInsId };
|
||||||
|
findCommentByProcInsId(params)
|
||||||
|
.then((res) => {
|
||||||
|
that.flowRecordList = res.data;
|
||||||
})
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$message.error("数据异常,请联系管理员...");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDeleteReason(val) {
|
||||||
|
val = val.replace("Change activity to ", "");
|
||||||
|
let flowRecordList = this.flowRecordList;
|
||||||
|
for (let i = 0; i < flowRecordList.length; i++) {
|
||||||
|
if (flowRecordList[i].taskDefKey == val) {
|
||||||
|
return "驳回至" + flowRecordList[i].taskName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getDurationDateStr(val) {
|
||||||
|
// 计算出相差天数
|
||||||
|
let days = Math.floor(val / (24 * 3600 * 1000));
|
||||||
|
// 计算出小时数
|
||||||
|
let leave1 = val % (24 * 3600 * 1000); // 计算天数后剩余的毫秒数
|
||||||
|
let hours = Math.floor(leave1 / (3600 * 1000));
|
||||||
|
// 计算相差分钟数
|
||||||
|
let leave2 = leave1 % (3600 * 1000); // 计算小时数后剩余的毫秒数
|
||||||
|
let minutes = Math.floor(leave2 / (60 * 1000));
|
||||||
|
// 计算相差秒数
|
||||||
|
let leave3 = leave2 % (60 * 1000); // 计算分钟数后剩余的毫秒数
|
||||||
|
let seconds = Math.round(leave3 / 1000);
|
||||||
|
if (days > 0) {
|
||||||
|
if (days < 10) days = "0" + days;
|
||||||
|
if (hours < 10) hours = "0" + hours;
|
||||||
|
if (minutes < 10) minutes = "0" + minutes;
|
||||||
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
|
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
|
||||||
|
}
|
||||||
|
if (hours > 0) {
|
||||||
|
if (hours < 10) hours = "0" + hours;
|
||||||
|
if (minutes < 10) minutes = "0" + minutes;
|
||||||
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
|
return hours + "小时" + minutes + "分钟" + seconds + "秒";
|
||||||
|
}
|
||||||
|
if (minutes > 0) {
|
||||||
|
if (minutes < 10) minutes = "0" + minutes;
|
||||||
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
|
return minutes + "分钟" + seconds + "秒";
|
||||||
|
}
|
||||||
|
if (seconds > 0) {
|
||||||
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
|
return seconds + "秒";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.app-editTaskDrawer {
|
||||||
|
.drawer {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
.drawerLeft {
|
||||||
|
width: 40%;
|
||||||
|
min-width: 280px;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
border-right: 1px solid #dcdfe6;
|
||||||
|
overflow-y: scroll;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
.drawerRight {
|
||||||
|
width: 60%;
|
||||||
|
min-width: 400px;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
padding-left: 20px;
|
||||||
.bjs-powered-by {
|
.bjs-powered-by {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
@ -307,15 +794,16 @@
|
||||||
height: 100px;
|
height: 100px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
top: 66px;
|
top: 77px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.app-container{
|
|
||||||
.containers {
|
.containers {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 150px;
|
height: 100px;
|
||||||
.canvas {
|
.canvas {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 150px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
.panel {
|
.panel {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -326,20 +814,17 @@
|
||||||
.load {
|
.load {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.el-form-item__label{
|
.el-form-item__label {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
.djs-palette {
|
||||||
.djs-palette{
|
left: 0px !important;
|
||||||
left: 0px!important;
|
|
||||||
top: 0px;
|
top: 0px;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.djs-container svg {
|
.djs-container svg {
|
||||||
min-height: 150px;
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight.djs-shape .djs-visual > :nth-child(1) {
|
.highlight.djs-shape .djs-visual > :nth-child(1) {
|
||||||
fill: green !important;
|
fill: green !important;
|
||||||
stroke: green !important;
|
stroke: green !important;
|
||||||
|
@ -374,6 +859,5 @@
|
||||||
top: -20px !important;
|
top: -20px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
</el-form>
|
<div style="text-align: right;">
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="handleStopClick">确 定</el-button>
|
<el-button type="primary" @click="handleStopClick">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancelStop">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</el-form>
|
||||||
</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,6 +417,7 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
stopOpen: false,
|
||||||
src: "",
|
src: "",
|
||||||
definitionList: [],
|
definitionList: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
|
@ -511,6 +512,9 @@ export default {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
cancelStop() {
|
||||||
|
this.stopOpen = false;
|
||||||
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
|
@ -586,16 +590,6 @@ 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,6 +62,7 @@
|
||||||
<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>
|
||||||
|
@ -180,7 +181,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>
|
||||||
|
@ -216,7 +217,7 @@ export default {
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
deptId: null,
|
deptId: null,
|
||||||
projId: null,
|
projId: 0,
|
||||||
projName: null,
|
projName: null,
|
||||||
parProjName: null,
|
parProjName: null,
|
||||||
applyType: null,
|
applyType: null,
|
||||||
|
@ -281,6 +282,7 @@ 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,21 +90,45 @@
|
||||||
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="taskId"
|
prop="businessKeyParName"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="流程名称" align="center" prop="procDefName" />
|
<el-table-column
|
||||||
|
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">
|
<el-table-column label="流程发起人" align="center" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<label
|
<label
|
||||||
>{{ scope.row.startUserName }}
|
>{{ scope.row.startUserName }}
|
||||||
|
@ -112,7 +136,12 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="接收时间" align="center" prop="createTime" width="180" />
|
<el-table-column label="接收时间" align="center" prop="createTime" width="160" />
|
||||||
|
<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
|
||||||
|
@ -133,6 +162,8 @@
|
||||||
: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>
|
||||||
|
|
||||||
|
@ -210,26 +241,20 @@ 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.data.records;
|
this.todoList = response.rows;
|
||||||
this.total = response.data.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 跳转到处理页面
|
// 跳转到处理页面
|
||||||
handleProcess(row) {
|
handleProcess(row) {
|
||||||
this.$router.push({
|
//if (row.taskName == "提交申请") {
|
||||||
path: "/flowable/task/todo/detail/index",
|
this.$refs.editTaskDrawer.show(row);
|
||||||
query: {
|
//} else {
|
||||||
procInsId: row.procInsId,
|
// this.$refs.approveDrawer.show(row);
|
||||||
executionId: row.executionId,
|
//}
|
||||||
deployId: row.deployId,
|
|
||||||
taskId: row.taskId,
|
|
||||||
taskName: row.taskName,
|
|
||||||
startUser: row.startUserName + "-" + row.startDeptName,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -250,7 +275,7 @@ export default {
|
||||||
parentDeploymentId: null,
|
parentDeploymentId: null,
|
||||||
engineVersion: null,
|
engineVersion: null,
|
||||||
};
|
};
|
||||||
this.daterangeCheckTime=[];
|
this.daterangeCheckTime = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
@ -261,7 +286,7 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.daterangeCheckTime=[];
|
this.daterangeCheckTime = [];
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|
Loading…
Reference in New Issue