基于jeecgboot-vue3的Flowable流程-我的任务(三)

2024-06-02 11:04

本文主要是介绍基于jeecgboot-vue3的Flowable流程-我的任务(三),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

因为这个项目license问题无法开源,更多技术支持与服务请加入我的知识星球。

这一部分主要讲我的任务里的详情,看流程情况

1、主要调用record/index.vue,调用参数如下:

/*** 详情*/function handleDetail(record: Recordable) {console.log("handleDetail record",record)router.push({ path: '/flowable/task/record/index',query: {procInsId: record.procInsId,deployId: record.deployId,taskId: record.taskId,businessKey: record.businessKey,appType: record.appType,finished: false}})}

2、表单显示部分,用的VForm3,所以是下面的显示代码,根据需要可以修改成formdesigner

<!--流程处理表单设计器模块,从flowable表里获取表单数据--><el-col :span="16" :offset="4" v-if="variableOpen"><div><!--处理流程过程中显示formdesigner表单信息--><v-form-renderv-if="startUserForm.isStartUserNode && startUserForm.editFormType === 'oa' && finished === 'true'"ref="refStartBuilder":form-json="formModel":form-data="formData"/><v-form-render v-else :form-json="formModel" :form-data="formData" ref="refStartBuilder" /></div>

3、获取上面的相应值从下面的接口获取

/** 获取流程变量内容 */const processVariables = (taskId, deployId) => {if (taskId) {// 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示getProcessVariables(taskId, deployId).then((res) => {console.log('getProcessVariables res=', res);variables.value = res.result.variables;if (res.success) {if (res.result.hasOwnProperty('variables')) {formData.value = res.result.variables;variableOpen.value = true;formModel.value = res.result.formModel;taskForm.values = formData.value;}getNextFlowNodeInfo(taskForm.taskId);} else {createMessage.error(res.message);}});}};

4、审批记录相关代码如下:

<!--流程流转记录--><el-card class="box-card" v-if="flowRecordList"><template #header class="clearfix"><span class="el-icon-notebook-1">审批记录</span></template><el-col :span="16" :offset="4"><div class="block"><el-timeline><el-timeline-itemv-for="(item, index) in flowRecordList":key="index":icon="setIcon(item.finishTime)":color="setColor(item.finishTime)"><p style="font-weight: 700">{{ item.taskName }}</p><el-card v-if="item.activityType === 'startEvent'" class="box-card" shadow="hover">{{ item.assigneeName }} 在 {{ item.createTime }} 发起流程</el-card><el-card v-if="item.activityType === 'userTask'" :body-style="{ padding: '10px' }"><label v-if="item.assigneeName" style="font-weight: normal; margin-right: 30px">实际办理:{{ item.assigneeName }}<el-tag type="info" size="small">{{ 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 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.listFlowCommentDto.length > 0" v-for="(commentitem, index) in item.listFlowCommentDto" :key="index"><el-tag type="success" v-if="commentitem.type === '1'"> {{ commentitem.comment }}</el-tag><el-tag type="warning" v-if="commentitem.type === '2'"> {{ '退回: ' + commentitem.comment }}</el-tag> <el-tag type="danger" v-if="commentitem.type === '3'"> {{ '驳回: ' + commentitem.comment }}</el-tag><el-tag type="success" v-if="commentitem.type === '4'"> {{ commentitem.comment }}</el-tag><el-tag type="success" v-if="commentitem.type === '5'"> {{ commentitem.comment }}</el-tag><el-tag type="warning" v-if="commentitem.type === '7'"> {{ '撤回: ' + commentitem.comment }}</el-tag><!--撤回信息--><el-tag type="warning" v-if="commentitem.type === '6'"> {{ commentitem.comment }}</el-tag><!--终止信息--><el-tag type="warning" v-if="commentitem.type === '8'"> {{ commentitem.comment }}</el-tag><!--跳过信息--><el-tag type="success" v-if="commentitem.type === '9'"> {{ commentitem.comment }}</el-tag><!--前加签--><el-tag type="success" v-if="commentitem.type === '10'"> {{ commentitem.comment }}</el-tag><!--后加签--><el-tag type="success" v-if="commentitem.type === '11'"> {{ commentitem.comment }}</el-tag><!--多实例加签--><el-tag type="success" v-if="commentitem.type === '12'"> {{ commentitem.comment }}</el-tag><!--跳转信息--></p></el-card><el-card v-if="item.activityType === 'endEvent'" class="box-card" shadow="hover"> {{ item.createTime }} 流程结束 </el-card></el-timeline-item></el-timeline></div></el-col></el-card>

目前上面的审批记录没有考虑上传文件的显示与处理,后续再根据需要处理

5、流程图,这里采用process-viewer

<el-card class="box-card"><template #header class="clearfix"><span class="el-icon-picture-outline">流程图</span></template><!-- 流程图 --><process-viewer:key="`designer-${loadIndex}`":style="'height:' + height" :xml="xmlData":finishedInfo="taskList":allCommentList="historyProcNodeList"ref="refNode"/> </el-card>

6、相应的上面值代码如下,目前还没有考虑historyProcNodeList

/** xml 文件 */const getModelDetail = (deployId) => {// 发送请求,获取xmlreadXml(deployId).then((res) => {console.log('readXml res', res);xmlData.value = res.result;getFlowViewerById(taskForm.procInsId);});};const getFlowViewerById = (procInsId) => {getFlowViewer(procInsId).then((res) => {taskList.value = res.result || [];console.log('taskList=', taskList.value);//fillColor();});};

7、效果图如下:

这篇关于基于jeecgboot-vue3的Flowable流程-我的任务(三)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1023780

相关文章

部署Vue项目到服务器后404错误的原因及解决方案

《部署Vue项目到服务器后404错误的原因及解决方案》文章介绍了Vue项目部署步骤以及404错误的解决方案,部署步骤包括构建项目、上传文件、配置Web服务器、重启Nginx和访问域名,404错误通常是... 目录一、vue项目部署步骤二、404错误原因及解决方案错误场景原因分析解决方案一、Vue项目部署步骤

Linux流媒体服务器部署流程

《Linux流媒体服务器部署流程》文章详细介绍了流媒体服务器的部署步骤,包括更新系统、安装依赖组件、编译安装Nginx和RTMP模块、配置Nginx和FFmpeg,以及测试流媒体服务器的搭建... 目录流媒体服务器部署部署安装1.更新系统2.安装依赖组件3.解压4.编译安装(添加RTMP和openssl模块

前端原生js实现拖拽排课效果实例

《前端原生js实现拖拽排课效果实例》:本文主要介绍如何实现一个简单的课程表拖拽功能,通过HTML、CSS和JavaScript的配合,我们实现了课程项的拖拽、放置和显示功能,文中通过实例代码介绍的... 目录1. 效果展示2. 效果分析2.1 关键点2.2 实现方法3. 代码实现3.1 html部分3.2

0基础租个硬件玩deepseek,蓝耘元生代智算云|本地部署DeepSeek R1模型的操作流程

《0基础租个硬件玩deepseek,蓝耘元生代智算云|本地部署DeepSeekR1模型的操作流程》DeepSeekR1模型凭借其强大的自然语言处理能力,在未来具有广阔的应用前景,有望在多个领域发... 目录0基础租个硬件玩deepseek,蓝耘元生代智算云|本地部署DeepSeek R1模型,3步搞定一个应

CSS弹性布局常用设置方式

《CSS弹性布局常用设置方式》文章总结了CSS布局与样式的常用属性和技巧,包括视口单位、弹性盒子布局、浮动元素、背景和边框样式、文本和阴影效果、溢出隐藏、定位以及背景渐变等,通过这些技巧,可以实现复杂... 一、单位元素vm 1vm 为视口的1%vh 视口高的1%vmin 参照长边vmax 参照长边re

CSS3中使用flex和grid实现等高元素布局的示例代码

《CSS3中使用flex和grid实现等高元素布局的示例代码》:本文主要介绍了使用CSS3中的Flexbox和Grid布局实现等高元素布局的方法,通过简单的两列实现、每行放置3列以及全部代码的展示,展示了这两种布局方式的实现细节和效果,详细内容请阅读本文,希望能对你有所帮助... 过往的实现方法是使用浮动加

css渐变色背景|<gradient示例详解

《css渐变色背景|<gradient示例详解》CSS渐变是一种从一种颜色平滑过渡到另一种颜色的效果,可以作为元素的背景,它包括线性渐变、径向渐变和锥形渐变,本文介绍css渐变色背景|<gradien... 使用渐变色作为背景可以直接将渐China编程变色用作元素的背景,可以看做是一种特殊的背景图片。(是作为背

springboot启动流程过程

《springboot启动流程过程》SpringBoot简化了Spring框架的使用,通过创建`SpringApplication`对象,判断应用类型并设置初始化器和监听器,在`run`方法中,读取配... 目录springboot启动流程springboot程序启动入口1.创建SpringApplicat

通过prometheus监控Tomcat运行状态的操作流程

《通过prometheus监控Tomcat运行状态的操作流程》文章介绍了如何安装和配置Tomcat,并使用Prometheus和TomcatExporter来监控Tomcat的运行状态,文章详细讲解了... 目录Tomcat安装配置以及prometheus监控Tomcat一. 安装并配置tomcat1、安装

MySQL的cpu使用率100%的问题排查流程

《MySQL的cpu使用率100%的问题排查流程》线上mysql服务器经常性出现cpu使用率100%的告警,因此本文整理一下排查该问题的常规流程,文中通过代码示例讲解的非常详细,对大家的学习或工作有一... 目录1. 确认CPU占用来源2. 实时分析mysql活动3. 分析慢查询与执行计划4. 检查索引与表