Compare commits

..

No commits in common. "8f66f73e52cddda75044561e4644ce2f0424c2da" and "d03c3cc09a938955291f28f9ff1b3ad02739bf8c" have entirely different histories.

17 changed files with 428 additions and 1036 deletions

View File

@ -139,55 +139,3 @@ 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')

View File

@ -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;

View File

@ -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")

View File

@ -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
* deletecompleteTask
*
* @author Tony
* @date 2021/4/20
*/
@Slf4j
@Component
public class FlowTaskEndListener implements ExecutionListener {
@Override
public void notify(DelegateExecution delegateExecution) {
log.info("任务结束监听器:{}", delegateExecution);
}
}

View File

@ -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(),可以通过监听器给任务执行人发送相应的通知消息
} }
} }

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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();
} }

View File

@ -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;

View File

@ -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
})
}

View File

@ -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) {

View File

@ -1,278 +1,76 @@
<template> <template>
<div class="app-editTaskDrawer"> <div class="app-container">
<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="70%" size="60%"
@close="closeCallBack" @close="closeCallBack"
> >
<template slot="title"> <template slot="title">
<div> <div>临时工程申请 {{ title }}</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="100px" label-width="120px"
style="padding-left: 25px; padding-right: 25px" style="padding-right: 35px"
> >
<div class="block containers"> <div class="block containers">
<div class="canvas" ref="flowCanvas"></div> <div class="canvas" ref="flowCanvas"></div>
<div class="maskLayer"></div> <div class="maskLayer" />
</div> </div>
<el-form-item label="项目单位"> <el-form-item label="所属项目" prop="businessKey">
{{ form.parProjName }}
</el-form-item>
<el-form-item label="项目名称" prop="projId">
<el-select <el-select
v-model="form.projId" v-model="form.businessKey"
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.name" :label="item.projectName"
: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="申请人"> <el-form-item label="审批内容" prop="files">
<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.applyFiles" v-model="form.files"
: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-divider content-position="left" style="margin-left" <el-form-item label="申请说明" prop="remark">
>申请明细信息</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="scope.row.assetsVersion" v-model="form.remark"
placeholder="请输入申请规格" placeholder="请输入申请说明"
rows="2" rows="5"
maxlength="200"
/> />
</template> </el-form-item>
</el-table-column> <div style="text-align: center">
<el-table-column prop="useReason" align="center"> <el-button type="primary" @click="submitForm"></el-button>
<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>
@ -281,11 +79,8 @@
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 { getProjectApply } from "@/api/project/projectApply"; import { findFormDatasByProcInsId } from "@/api/flowable/businessKey";
import { completeAndModify, getNextFlowNodeByStart } from "@/api/flowable/todo"; import { complete, 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: {},
@ -304,30 +99,25 @@ export default {
title: "", title: "",
// //
form: { form: {
id: null, businessKey: "",
deptId: null, projectName: "",
projId: 0, files: "",
projName: null, remark: "",
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: {
projId: [{ required: true, message: "请选择项目名称", trigger: "blur" }], businessKey: [{ required: true, message: "请选择所属项目", trigger: "blur" }],
applyReason: [{ required: true, message: "请输入申请原因", trigger: "blur" }], files: [{ 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,
@ -336,16 +126,6 @@ export default {
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: {},
@ -354,59 +134,28 @@ export default {
mounted() {}, mounted() {},
beforeDestroy() {}, beforeDestroy() {},
methods: { methods: {
//
initMyProject() {
//
findMyDeptProject().then((response) => {
if (response.code == 200) {
this.projectOptions = response.data;
}
});
},
initCategoryAssetsType(val) {
//
findAllByCategory(val).then((response) => {
if (response.code == 200 && response.data) {
this.AssetsTypeOptions = response.data;
}
});
},
// //
projectChage(val) { projectChage(val) {
this.$forceUpdate(); let projectName = "";
for (let i = 0; i < this.projectOptions.length; i++) { this.projectOptions.forEach((item) => {
if (this.projectOptions[i].id == val) { if ((item.id = val)) {
this.form.projName = this.projectOptions[i].name; projectName = item.projectName;
return false; return;
}
} }
});
this.form.projectName = projectName;
}, },
doCanel() { doCanel() {
this.onOpen = false; this.onOpen = false;
}, },
show(options) { show(options) {
this.options = options; this.options = options;
this.initMyProject();
//
if (options.category == 1) {
this.showAssetsVersion = true;
} else {
this.showAssetsVersion = false;
}
this.initCategoryAssetsType(options.category);
this.title = options.procDefName;
this.form.applyType = options.category;
this.form.parProjName = options.businessKeyParName;
this.nickName = options.startUserName;
this.deptName = options.startDeptName;
this.onOpen = true; this.onOpen = true;
this.getFlowRecordList(options.procInsId, options.deployId); this.title = options.procDefName;
this.initFormDate(options.businessKey); this.initFormDate(options.procInsId);
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then( flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
(res) => {
this.initFlowImage(res.data); this.initFlowImage(res.data);
} });
);
}, },
async initFlowImage(data) { async initFlowImage(data) {
const self = this; const self = this;
@ -419,84 +168,54 @@ export default {
// //
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(businessKey) { initFormDate(procInsId, deployId) {
getProjectApply(businessKey) this.projectOptions=[{id:this.options.businessKey,projectName:this.options.businessKeyName}];
.then((res) => { const params = {procInsId: procInsId}
if (res.code == 200) { findFormDatasByProcInsId(params).then(res => {
this.initData = res.data; this.form = res.data;
this.form.id = res.data.id; this.deptName = this.options.startDeptName;
this.form.projId = res.data.projId; this.nickName = this.options.startUserName;
this.form.applyReason = res.data.applyReason; this.form.taskId = this.options.taskId;
this.form.applyFiles = res.data.applyFiles; this.form.taskName = this.options.taskName;
let applyDetailList = []; this.form.userId = store.getters.userId;
if ( this.form.assignee = store.getters.name;
res.data.proProjectApplyDetailList && this.form.procInsId = this.options.procInsId;
res.data.proProjectApplyDetailList.length > 0 this.form.instanceId = this.options.procInsId;
) { }).catch(res => {
for (let i = 0; i < res.data.proProjectApplyDetailList.length; i++) {
this.selectAssetsId(res.data.proProjectApplyDetailList[i].assetsId);
applyDetailList.push({
index: i + 1,
assetsId: res.data.proProjectApplyDetailList[i].assetsId,
number: res.data.proProjectApplyDetailList[i].number,
assetsUnit: res.data.proProjectApplyDetailList[i].assetsUnit,
assetsVersion: res.data.proProjectApplyDetailList[i].assetsVersion,
useReason: res.data.proProjectApplyDetailList[i].useReason,
});
}
this.proProjectApplyDetailList = applyDetailList;
}
} else {
this.$message.error("数据异常,请联系管理员..."); this.$message.error("数据异常,请联系管理员...");
}
}) })
.catch((res) => { },
this.$message.error("数据异常,请联系管理员..."); fileInput(files) {
let fileUrls = "";
if (files.length > 0) {
fileUrls = "";
files.forEach((item) => {
fileUrls += "," + item.url;
}); });
fileUrls = fileUrls.substring(1);
}
this.form.files = fileUrls;
}, },
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.proProjectApplyDetailList.length == 0) {
this.$modal.msgWarning("请添加申请明细信息...");
return false;
}
for (let i = 0; i < this.proProjectApplyDetailList.length; i++) {
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; this.loading = true;
completeAndModify(flowTaskVo).then((res) => { this.form.variables={
this.$store.dispatch("initMyTaskNum"); businessKey:this.form.businessKey,
projectName:this.form.projectName,
files:this.form.files,
remark:this.form.remark,
INITIATOR:this.form.INITIATOR
}
complete(this.form).then(res => {
this.$store.dispatch('initMyTaskNum');
this.$modal.msgSuccess("任务提交成功"); this.$modal.msgSuccess("任务提交成功");
this.loading = false; this.loading = false;
// //
@ -507,285 +226,79 @@ export default {
}, },
// //
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( canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.id, n.outgoing?.forEach(nn => {
completeTask.completed ? "highlight" : "highlight-todo" const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
);
n.outgoing?.forEach((nn) => {
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
if (targetTask) { if (targetTask) {
if ( if (todoTask && completeTask.key === todoTask.key && !todoTask.completed){
todoTask && canvas.addMarker(nn.id, todoTask.completed ? 'highlight' : 'highlight-todo')
completeTask.key === todoTask.key && canvas.addMarker(nn.targetRef.id, todoTask.completed ? 'highlight' : 'highlight-todo')
!todoTask.completed
) {
canvas.addMarker(
nn.id,
todoTask.completed ? "highlight" : "highlight-todo"
);
canvas.addMarker(
nn.targetRef.id,
todoTask.completed ? "highlight" : "highlight-todo"
);
}else { }else {
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:ExclusiveGateway") { else if (n.$type === 'bpmn:ExclusiveGateway') {
if (completeTask) { if (completeTask) {
canvas.addMarker( canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.id, n.outgoing?.forEach(nn => {
completeTask.completed ? "highlight" : "highlight-todo" const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
);
n.outgoing?.forEach((nn) => {
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
if (targetTask) { if (targetTask) {
canvas.addMarker(
nn.id, canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
targetTask.completed ? "highlight" : "highlight-todo" canvas.addMarker(nn.targetRef.id, 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( canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
n.id, n.outgoing?.forEach(nn => {
completeTask.completed ? "highlight" : "highlight-todo" const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
);
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:StartEvent") {
n.outgoing.forEach((nn) => {
const completeTask = nodeData.find((m) => m.key === nn.targetRef.id);
if (completeTask) {
canvas.addMarker(nn.id, "highlight");
canvas.addMarker(n.id, "highlight");
return;
}
});
} else if (n.$type === "bpmn:EndEvent") {
if (endTask.key === n.id && endTask.completed) {
canvas.addMarker(n.id, "highlight");
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;
} }
} }
}, else if (n.$type === 'bpmn:StartEvent') {
getDurationDateStr(val) { n.outgoing.forEach(nn => {
// const completeTask = nodeData.find(m => m.key === nn.targetRef.id)
let days = Math.floor(val / (24 * 3600 * 1000)); if (completeTask) {
// canvas.addMarker(nn.id, 'highlight')
let leave1 = val % (24 * 3600 * 1000); // canvas.addMarker(n.id, 'highlight')
let hours = Math.floor(leave1 / (3600 * 1000)); return
//
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) { else if (n.$type === 'bpmn:EndEvent') {
if (minutes < 10) minutes = "0" + minutes; if (endTask.key === n.id && endTask.completed) {
if (seconds < 10) seconds = "0" + seconds; canvas.addMarker(n.id, 'highlight')
return minutes + "分钟" + seconds + "秒"; return
} }
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;
} }
@ -794,16 +307,15 @@ export default {
height: 100px; height: 100px;
position: absolute; position: absolute;
z-index: 9999; z-index: 9999;
top: 77px; top: 66px;
}
}
} }
.app-container{
.containers { .containers {
width: 100%; width: 100%;
height: 100px; height: 150px;
.canvas { .canvas {
width: 100%; width: 100%;
height: 100px; height: 150px;
} }
.panel { .panel {
position: absolute; position: absolute;
@ -817,14 +329,17 @@ export default {
.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: 100px; min-height: 150px;
} }
.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;
@ -861,3 +376,4 @@ export default {
} }
} }
</style> </style>

View File

@ -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;

View File

@ -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;

View File

@ -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() {