fix(流程管理): 修复流程图无法显示

approve-sys
DESKTOP-J8LE24C\cqjx 3 years ago
parent f02bd34865
commit ba170d9010

@ -491,8 +491,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
*/
@Override
public AjaxResult stopProcess(FlowTaskVo flowTaskVo) {
Task task = taskService.createTaskQuery().processInstanceId(flowTaskVo.getInstanceId()).singleResult();
if (task == null) {
List<Task> task = taskService.createTaskQuery().processInstanceId(flowTaskVo.getInstanceId()).list();
if (CollectionUtils.isEmpty(task)) {
throw new CustomException("流程未启动或已执行完成,取消申请失败");
}
@ -505,8 +505,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
List<EndEvent> endNodes = process.findFlowElementsOfType(EndEvent.class, false);
if (CollectionUtils.isNotEmpty(endNodes)) {
Authentication.setAuthenticatedUserId(loginUser.getUserId().toString());
taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.STOP.getType(),
StringUtils.isBlank(flowTaskVo.getComment()) ? "取消申请" : flowTaskVo.getComment());
// taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.STOP.getType(),
// StringUtils.isBlank(flowTaskVo.getComment()) ? "取消申请" : flowTaskVo.getComment());
String endId = endNodes.get(0).getId();
List<Execution> executions =
runtimeService.createExecutionQuery().parentId(processInstance.getProcessInstanceId()).list();

@ -159,7 +159,8 @@ export default {
await this.modeler.importXML(data)
this.adjustPalette()
this.fitViewport()
if (this.taskList) {
if (this.taskList !==undefined && this.taskList.length > 0 ) {
debugger
this.fillColor()
}
} catch (err) {

@ -72,7 +72,7 @@
<el-table-column label="流程编号" width="300" align="center" prop="deploymentId" />
<el-table-column label="流程标识" align="center" prop="key" />
<el-table-column label="流程分类" align="center" prop="category" />
<el-table-column label="流程名称" align="center">
<el-table-column label="流程名称(流程图)" align="center">
<template slot-scope="scope">
<el-button type="text" @click="handleReadImage(scope.row.deploymentId)">
<span>{{ scope.row.name }}</span>
@ -213,8 +213,9 @@
</el-dialog>
<!-- 流程图 -->
<el-dialog :title="readImage.title" :visible.sync="readImage.open" append-to-body>
<el-image :src="readImage.src"></el-image>
<el-dialog :title="readImage.title" :visible.sync="readImage.open" width="70%" append-to-body>
<!-- <el-image :src="readImage.src"></el-image> -->
<flow :xmlData="xmlData"/>
</el-dialog>
<!--表单配置详情-->
@ -235,15 +236,17 @@
</template>
<script>
import { listDefinition, updateState, delDeployment, addDeployment, updateDeployment, exportDeployment, definitionStart } from "@/api/flowable/definition";
import { listDefinition, updateState, delDeployment, addDeployment, updateDeployment, exportDeployment, definitionStart, readXml} from "@/api/flowable/definition";
import { getToken } from "@/utils/auth";
import { getForm, addDeployForm ,listForm } from "@/api/flowable/form";
import Parser from '@/components/parser/Parser'
import flow from '@/views/flowable/task/record/flow'
export default {
name: "Definition",
components: {
Parser
Parser,
flow
},
data() {
return {
@ -309,6 +312,8 @@ export default {
deployId: null
},
// xml
xmlData:"",
//
form: {},
//
@ -380,7 +385,11 @@ export default {
handleReadImage(deploymentId){
this.readImage.title = "流程图";
this.readImage.open = true;
this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
// this.readImage.src = process.env.VUE_APP_BASE_API + "/flowable/definition/readImage/" + deploymentId;
// xml
readXml(deploymentId).then(res =>{
this.xmlData = res.data
})
},
/** 表单查看 */
handleForm(formId){

@ -87,8 +87,8 @@
<label v-if="item.assigneeName" style="font-weight: normal;margin-right: 30px;">实际办理: {{item.assigneeName}} <el-tag type="info" size="mini">{{item.deptName}}</el-tag></label>
<label v-if="item.candidate" style="font-weight: normal;margin-right: 30px;"> {{item.candidate}}</label>
<label style="font-weight: normal">接收时间 </label><label style="color:#8a909c;font-weight: normal">{{item.createTime}}</label>
<label style="margin-left: 30px;font-weight: normal">办结时间 </label><label style="color:#8a909c;font-weight: normal">{{item.finishTime}}</label>
<label style="margin-left: 30px;font-weight: normal">耗时 </label><label style="color:#8a909c;font-weight: normal">{{item.duration}}</label>
<label v-if="item.finishTime" style="margin-left: 30px;font-weight: normal">办结时间: </label><label style="color:#8a909c;font-weight: normal">{{item.finishTime}}</label>
<label v-if="item.duration" style="margin-left: 30px;font-weight: normal">耗时: </label><label style="color:#8a909c;font-weight: normal">{{item.duration}}</label>
<p v-if="item.comment">
<el-tag type="success" v-if="item.comment.type === '1'"> {{item.comment.comment}}</el-tag>

Loading…
Cancel
Save