基于jeecgboot-vue3的Flowable流程-所有任务

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

       这个部分主要讲所有任务的功能

1、主要列表界面如下:

<template><div class="p-2"><!--查询区域--><div class="jeecg-basic-table-form-container"><a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"><a-row :gutter="24"><a-col :lg="6"><a-form-item name="procDefName"><template #label><span title="流程名称">流程名称</span></template><a-input placeholder="目前仅支持精确查询,请输入流程名称" v-model:value="queryParam.procDefName"></a-input></a-form-item></a-col><a-col :lg="6"><a-form-item name="createTime"><template #label><span title="开始日期">开始日期</span></template><a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择开始日期" v-model:value="queryParam.createTime" /></a-form-item></a-col><template v-if="toggleSearchStatus"><a-col :lg="6"><a-form-item name="createBy"><template #label><span title="创建人员">创建人员</span></template><a-input placeholder="请输入创建人员" v-model:value="queryParam.createBy"></a-input></a-form-item></a-col></template><a-col :xl="6" :lg="7" :md="8" :sm="24"><span style="float: left; overflow: hidden" class="table-page-search-submitButtons"><a-col :lg="6"><a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button><a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button><a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">{{ toggleSearchStatus ? '收起' : '展开' }}<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" /></a></a-col></span></a-col></a-row></a-form></div><!--引用表格--><BasicTable @register="registerTable" :rowSelection="rowSelection"><!--插槽:table标题--><template #tableTitle><a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button><a-button  type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button><a-dropdown v-if="selectedRowKeys.length > 0"><template #overlay><a-menu><a-menu-item key="1" @click="batchHandleDelete"><Icon icon="ant-design:delete-outlined"></Icon>删除</a-menu-item></a-menu></template><a-button>批量操作<Icon icon="mdi:chevron-down"></Icon></a-button></a-dropdown><!-- 高级查询 --><super-query :config="superQueryConfig" @search="handleSuperQuery" /></template><!--操作栏--><template #action="{ record }"><TableAction :dropDownActions="getDropDownAction(record)"/></template><template #bodyCell="{ column, record, index, text }"><label v-if="column.key === 'rowIndex'">{{index+1}}</label><a-tag color="blue" v-if="column.key === 'procDefVersion'">V{{ record.procDefVersion }}</a-tag><a-tag color="blue" v-if="column.key === 'finishTime' && record.finishTime == null" >进行中</a-tag><a-tag color="green" v-if="column.key === 'finishTime' &&  record.finishTime != null">已完成</a-tag><label v-if="column.key === 'assigneeName' && record.assigneeName">{{record.assigneeName}} <el-tag type="info" size="small">{{record.deptName}}</el-tag></label><label v-if="column.key === 'assigneeName' && record.candidate">{{record.candidate}}</label></template></BasicTable><!-- 发起流程 --><a-modal @cancel="open = false" :title="title" v-model:open="open" width="60%" append-to-body><el-form :model="queryProcessParams" ref="queryProcessForm" :inline="true" v-show="showSearch" label-width="68px"><el-form-item label="名称" prop="name"><el-inputv-model="queryProcessParams.name"placeholder="请输入名称"clearablesize="small"@keyup.enter.native="handleProcessQuery"/></el-form-item><el-form-item><el-button type="primary" icon="Search" size="small" @click="handleProcessQuery">搜索</el-button><el-button icon="Refresh" size="small" @click="resetProcessQuery">重置</el-button></el-form-item></el-form><el-table v-loading="processLoading" fit :data="definitionList" border ><el-table-column label="流程名称" align="center" prop="name" /><el-table-column label="流程版本" align="center"><template #default="scope"><el-tag size="large" >V{{ scope.row.version }}</el-tag></template></el-table-column><el-table-column label="流程分类" align="center" prop="category" /><el-table-column label="表单名称" align="center" prop="formName" /><el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width"><template #default="scope"><el-buttonsize="small"type="text"icon="el-icon-edit-outline"v-if="(scope.row.formId != null && (scope.row.appType == 'OA' || scope.row.appType == 'ONLINE'))"@click="handleStartProcess(scope.row)">发起流程</el-button></template></el-table-column></el-table><paginationv-show="processTotal > 0":total="processTotal"v-model:page="queryProcessParams.pageNum"v-model:limit="queryProcessParams.pageSize"@pagination="queryDefinition"/></a-modal><!-- 委派 转办 选择人员 --><a-modaltitle="选择委派或转办人员" width="900px"  :maskClosable="false":confirmLoading="confirmLoading"v-model:open="delegateassign":footer="null"@cancel="closeNode">   <a-form  v-if="delegateassign"><a-form-item class="ant-form-item-bottom" :label-col="labelCol" :wrapper-col="wrapperCol"  label="请选择委派或转办人员" v-show="true"><a-checkbox-group @change="spryType" v-model="spryTypes" ><!-- 1用户 5 部门负责人 4发起人的部门负责人--><a-checkbox value="1"> 直接选择人员 </a-checkbox><a-checkbox value="5"> 部门负责人 </a-checkbox><a-checkbox value="4">发起人的部门负责人<a-tooltip placement="topLeft" title="自动获取发起人所在部门的负责人,即其上级领导。(如果其本身就是部门负责人,则指向发起人自己。)"><a-icon type="exclamation-circle" /></a-tooltip></a-checkbox></a-checkbox-group></a-form-item><!--            1用户  4发起人的部门负责人--><a-form-item class="ant-form-item-bottom" :label-col="labelCol" :wrapper-col="wrapperCol" label="选择人员" v-if="spryTypes.indexOf('1')>-1" ><!--  通过部门选择用户控件 --><j-select-user-by-dept v-model="spry.userIds" :multi="false"></j-select-user-by-dept></a-form-item><a-form-item class="ant-form-item-bottom" :label-col="labelCol" :wrapper-col="wrapperCol" label="选择部门负责人" v-if="spryTypes.indexOf('5')>-1" ><j-select-dept v-model="spry.departmentManageIds" :multi="false"></j-select-dept></a-form-item><!--btn--><a-form-item class="a-form-item-submit" :wrapper-col="{ span: 12, offset: 10 }"><a-button @click="sprySubmit" type="primary" html-type="submit" :disabled="userNode.type==0||userNode.type==2||confirmLoading">提交</a-button><a-button @click="closeNode" style="margin-left: 50px">关闭</a-button></a-form-item></a-form></a-modal>  </div>
</template><script lang="ts" name="myProcess" setup>import { ref, reactive } from 'vue';import { useRouter, useRoute } from 'vue-router';import 'element-plus/dist/index.css'import 'element-plus/theme-chalk/display.css'import { Search, Refresh } from '@element-plus/icons-vue'import Pagination  from '/@/components/Pagination/index.vue'import { BasicTable, useTable, TableAction } from '/@/components/Table';import { useListPage } from '/@/hooks/system/useListPage';import { columns, superQuerySchema } from './AllProcess.data';import { getExportUrl } from './AllProcess.api'import { allProcessList, delDeployment, stopProcess } from "@/views/flowable/api/process"import { delegateTask,assignTask } from "@/views/flowable/api/todo";  import { listDefinition } from "@/views/flowable/api/definition";import { downloadFile } from '/@/utils/common/renderUtils';import { useUserStore } from '/@/store/modules/user';import { useMessage } from '/@/hooks/web/useMessage';import JSelectUserByDept from '/@/components/Form/src/jeecg/components/JSelectUserByDept.vue';import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';const formRef = ref();const queryParam = reactive<any>({});const toggleSearchStatus = ref<boolean>(false);const registerModal = ref();const userStore = useUserStore();const { createMessage, createConfirm } = useMessage();// 获取路由器对象 href跳转用到const router = useRouter();const route = useRoute();//注册table数据const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({tableProps: {title: 'AllProcess',api: allProcessList,columns,canResize:false,useSearchForm: false,actionColumn: {width: 120,fixed: 'right',},beforeFetch: (params) => {return Object.assign(params, queryParam);},},exportConfig: {name: "myProcess",url: getExportUrl,params: queryParam,},});const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;const labelCol = reactive({xs:24,sm:4,xl:6,xxl:4});const wrapperCol = reactive({xs: 24,sm: 20,});// 高级查询配置const superQueryConfig = reactive(superQuerySchema);//新建流程相关参数const processTotal = ref(0)const processLoading = ref(true)const title = ref('')const open = ref(false)const definitionList = ref<any>([])const queryProcessForm = ref(null)// 显示搜索条件const showSearch = ref(true)//流程查询参数const queryProcessParams = reactive<any> ({pageNum: 1,pageSize: 10,name: null,category: null,key: null,tenantId: null,deployTime: null,derivedFrom: null,derivedFromRoot: null,parentDeploymentId: null,engineVersion: null})//委派与转办选择用户界面const delegateassign = ref(false)const confirmLoading = ref(false)const current = ref(0)const userNode = ref<any>({})const spryTypes = ref<any>([])const spry = reactive({//选中的用户userIds: '',departmentManageIds: '',chooseSponsor: false,chooseDepHeader: false,})//传入处理委派或转办参数const assignee  = ref('');const taskId = ref('');const dataId = ref('');const type = ref('');const category = ref('');/*** 高级查询事件*/function handleSuperQuery(params) {Object.keys(params).map((k) => {queryParam[k] = params[k];});searchQuery();}/*** 新增事件*/function handleAdd() {open.value = true;title.value = "发起流程";queryDefinition();}/** 发起流程申请 */const handleStartProcess = (row) => {if(row.appType == 'OA') {/**  发起oa流程申请 */router.push({ path: '/flowable/task/record/index',query: {deployId: row.deploymentId,procDefId:row.id,category: row.category,finished: true}})}else if(row.appType == 'ONLINE'){//查询对于online表单数据进行选择流程提交申请router.push({ path: '/flowable/model/onlinetablelist',query: {deployId: row.deploymentId,procDefId:row.id,onlineId: row.formId,category: row.category,finished: true}})}  else {}}/** 搜索按钮操作 */function handleProcessQuery() {queryProcessParams.pageNum = 1;queryDefinition();}/** 重置按钮操作 */function resetProcessQuery() {queryProcessForm.value.resetFields();handleProcessQuery();}function queryDefinition() {processLoading.value = true;listDefinition(queryProcessParams).then(response => {console.log("listDefinition response",response)definitionList.value = response.result.records;processTotal.value = response.result.total;processLoading.value = false;});}/*** 详情*/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,category: record.category,appType: record.appType,finished: false}})}function spryType(types){spryTypes.value = types;/*  1用户 4发起人的部门负责人 5部门负责人*/if (spryTypes.value.indexOf('1')==-1) spry.userIds = '';if (spryTypes.value.indexOf('5')==-1) spry.departmentManageIds = '';//是否选中发起人的部门领导spry.chooseDepHeader = spryTypes.value.indexOf('4')>-1 ;console.log("spry",spry)}const sprySubmit = () => {if (spryTypes.value.length==0){createMessage.error("必须选择委托或转办人员!");return;}if (spry.userIds == ''){createMessage.error("必须选择委托或转办人员!");return;}delegateassign.value = false;      assignee.value = spry.userIds;console.log("assign=",assign.value);if(type.value == "1") { //委派handleDelegate();}else if(type.value == "2") { //转办handleAssign();}else {createMessage.error("不认识的类型,未知的错误!");}}//弹出选择委派或转办人员界面selType: 1-委派 2-转办function SelectUser(record: Recordable,selType: string){console.log("SelectUser selType",selType);taskId.value = record.taskId;dataId.value = record.businessKey;type.value = selType;category.value = record.category;delegateassign.value = true ;}//委派流程function handleDelegate(record: Recordable) {const params = {taskId: taskId.value,assignee: assignee.value,dataId: dataId.value,category: category.value,}delegateTask(params).then( res => {createMessage.success(res.message);reload();});}//转办流程function handleAssign(record: Recordable) {const params = {taskId: taskId.value,assignee: assignee.value,dataId: dataId.value,category: category.value,}assignTask(params).then( res => {createMessage.success(res.message);reload();});}  /*** 取消流程申请*/function handleCancel(record: Recordable) {const params = {instanceId: record.procInsId}stopProcess(params).then( res => {createMessage.success(res.message);reload();});}/*** 删除事件*/async function handleDelete(record) {//await deleteOne({ id: record.id }, handleSuccess);const ids = record.procInsId;const dataid = record.businessKey;delDeployment(ids,dataid).then((res) => {if (res.success) {createMessage.success("删除成功");reload();} else {createMessage.warning(res.message)}})}/*** 批量删除事件*/async function batchHandleDelete() {await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);}/*** 成功回调*/function handleSuccess() {(selectedRowKeys.value = []) && reload();}/*** 下拉操作栏*/function getDropDownAction(record) {return [{label: '详情',onClick: handleDetail.bind(null, record),},{label: '委派',onClick: SelectUser.bind(null,record, '1'),},{label: '转办',onClick: SelectUser.bind(null,record, '2'),},{label: '取消申请',onClick: handleCancel.bind(null, record),}, {label: '删除',popConfirm: {title: '是否确认删除',confirm: handleDelete.bind(null, record),placement: 'topLeft',}}]}/*** 查询*/function searchQuery() {reload();}/*** 重置*/function searchReset() {formRef.value.resetFields();selectedRowKeys.value = [];//刷新数据reload();}</script><style lang="less" scoped>.ant-form-item-bottom {margin-bottom: 60px; /* 调整表单项之间的间距 */}.a-form-item-submit { //调整提交按钮与底部的距离position: relative ;bottom: 30px; /* 距离底部的高度 */}.jeecg-basic-table-form-container {padding: 0;.table-page-search-submitButtons {display: block;margin-bottom: 24px;white-space: nowrap;}.query-group-cust{min-width: 100px !important;}.query-group-split-cust{width: 30px;display: inline-block;text-align: center}}
</style>

上面包含了委派与转办的界面与方法

2、主要界面如下:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/29214.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

艾伦脑图谱(Allen Brain Atlas)

文章目录 一、艾伦研究所&#xff08;Allen Institute&#xff09;1.1、艾伦脑图谱&#xff08;Allen Brain Map&#xff09;1.1.1、艾伦&#xff08;小鼠大脑&#xff09;通用坐标框架&#xff08;Allen Mouse Brain Common Coordinate Framework&#xff0c;CCFv3&#xff09…

Elasticsearch-使用Logstash同步Mysql

1.安装logstash es服务器版本必须和logstash版本一致 7.9.2 在/usr/local/src/下新建logstash文件夹&#xff0c;解压 下载logstash后查看是否安装成功&#xff0c;在logstash的bin目录下输入指令&#xff1a; ./logstash -e input { stdin { } } output { stdout {} }2.my…

NAND闪存市场彻底复苏

在全球内存市场逐渐走出阴霾、迎来复苏曙光之际&#xff0c;日本存储巨头铠侠&#xff08;Kioxia&#xff09;凭借敏锐的市场洞察力和及时的战略调整&#xff0c;成功实现了从生产紧缩到全面复苏的华丽转身。这一转变不仅彰显了企业在逆境中的生存智慧&#xff0c;也为全球半导…

OSPF 动态路由协议(思科、华为)

#交换设备 OSPF 动态路由协议 一、基本概念 1.中文翻译&#xff1a;开放式最短路径优先路由协议&#xff08;open shortest path first&#xff09;&#xff0c;是一个内部网关路由协议&#xff08;一个自治系统内&#xff09;2.也称为&#xff1a;链路状态路由协议&#xf…

VirtualBox 安装UOS统信服务器操作系统

1、准备 1.1安装VirtualBox 由于过程简单&#xff0c;不做赘述&#xff01; 1.2下载UOS服务器版本 下载免费版本即可 服务器与云计算操作系统-统信软件 (uniontech.com)https://uniontech.com/os-serverCloud.html 2、安装 2.1新建虚拟机 2.2选择虚拟机模式&#xff0c;这…

船舶行业信息安全解决方案介绍

船舶行业信息安全背景&#xff1a; 近年来随着经济复苏、疫情与国际形势影响国内外船舶海运业务蓬勃发展&#xff0c;在业务量激增的背景下出现多类信息安全事件。其中2017年&#xff0c;马士基集团遭到勒索软件攻击&#xff0c;内部业务系统和码头操作系统均受到严重影响&…

spring注解驱动系列-- spring容器创建原理

从源码开始探究spring容器的创建原理&#xff0c;下面是源码总步骤 Override public void refresh() throws BeansException, IllegalStateException {synchronized (this.startupShutdownMonitor) {// Prepare this context for refreshing.prepareRefresh();// Tell the subc…

利用反向代理编写HTTP抓包工具——可视化界面

手写HTTP抓包工具——可视化界面 项目描述语言golang可视化fynev2功能代理抓包、重发、记录 目录 1. 示例1.1 主界面1.2 开启反向代理1.3 抓包1.4 历史记录1.5 重发 2. 核心代码2.1 GUI2.1 抓包 3. 结语3.1 传送门 1. 示例 1.1 主界面 1.2 开启反向代理 1.3 抓包 1.4 历史记录…

两行css 实现瀑布流

html <ul ><li><a href"" ><img src"05094532gc6w.jpg" alt"111" /><p>传奇</p></a></li><li><a href"" ><img src"05094532gc6w.jpg" alt"111"…

汽车EDI:波森Boysen EDI项目案例

企业A作为Boysen 的供应商&#xff0c;为了响应Boysen的号召&#xff0c;需要与其实现EDI对接。由于企业A此前并没有EDI项目的实施经验&#xff0c;对EDI项目的实施流程、技术要求等内容不知道应该从何下手。 为了实现EDI对接意味着企业A需要具备自己的EDI系统&#xff0c;从而…

佑友FHQ backup 后台任意文件读取漏洞复现

0x01 产品简介 佑友FHQ是一款专业的网络安全设备,用于保护企业网络免受各种网络威胁和攻击。其功能包括流量过滤、入侵检测与阻断、应用程序控制、虚拟专用网络(VPN)支持等。通过深度包检测和实时流量分析,佑友防火墙能够及时识别和阻止潜在的威胁,提供全面的安全保护。同…

vue中axios从content-disposition响应头获取中文名

在Vue中使用axios请求文件时&#xff0c;服务器可能会返回带有Content-Disposition响应头的文件&#xff0c;其中可能包含文件名的编码信息。如果你需要解码这个文件名&#xff0c;可以使用JavaScript的内置URL API来处理。 Java中用于设置HTTP响应头的&#xff0c;通常在Web开…

浏览器开发公司Brave 将自己的搜索结果与其 Leo AI 助手集成

Brave Software是一家开发浏览器的公司&#xff0c;其主要产品是Brave浏览器。Brave浏览器基于Chromium项目开发&#xff0c;具有高性能和隐私保护的特点。此外&#xff0c;Brave浏览器还提供了“off record”模式&#xff0c;允许用户在不记录浏览历史的情况下使用浏览器。关于…

C# Secs源码 HsmsSecs测试

包含客户端和服务端 启动客户端和服务端即可互相模拟sece 通讯 也可使用secs仿真器进行测试 开启后进行相关操作&#xff0c;创建客户端连接仿真器进行操作 仿真器显示日志 相关文件&#xff0c;源码 4.9 私信即可或者看我博客描述那个地址 我是狗子&#xff0c;希望你幸…

广东工业大学领导一行莅临泰迪智能科技参观交流

6月13日&#xff0c;广东工业大学经济学院党委书记林伟英、经济学院党委副书记陈朝阳、党政办主任徐嘉靖、数学与统计学院徐圣兵莅临泰迪智能科技产教融合实训中心参观交流。泰迪智能科技董事长张良均、运营中心总监翁梦婷、校企合作经理吴桂锋进行了热情接待。 会上&#xff0…

JAVA小知识22:迭代器iterator与列表迭代器ListIterator

一、迭代器 在 Java 中&#xff0c;迭代器是一个设计模式&#xff0c;用于遍历集合中的元素。Java 提供了 Iterator 接口来实现这一功能。迭代器的主要作用是提供一种通用的遍历集合的方法&#xff0c;而不需要了解集合的具体实现细节。 1.1、迭代器的特点 统一接口&#xf…

性能测试、负载测试、压力测试、稳定性测试简单区分【超详细】

&#x1f345; 视频学习&#xff1a;文末有免费的配套视频可观看 &#x1f345; 点击文末小卡片 &#xff0c;免费获取软件测试全套资料&#xff0c;资料在手&#xff0c;涨薪更快 性能测试是一个总称&#xff0c;可细分为性能测试、负载测试、压力测试、稳定性测试。 性能测试…

超级微同城小程序源码系统 帮你轻松制作本地生活服务平台 带源码包+搭建部署教程

系统概述 "超级微同城小程序源码系统"基于主流的小程序开发框架&#xff0c;采用高效稳定的后端架构设计&#xff0c;旨在为用户提供一个包含信息发布、在线交易、社交互动等功能于一体的综合型本地生活服务平台。系统涵盖了餐饮外卖、生鲜配送、家政服务、二手交易…

入门机器视觉的正确打开方式——徒手撸一个python+opencv实现的机器视觉简易调试工具(上)

目录 1.引言2.框架思路3.环境搭建4.图像处理流程化的实现5.流水线上的算法块5.1 算法块的可视化 6.总结7.调试工具成品链接PS.扩展阅读ps1.六自由度机器人相关文章资源ps2.四轴机器相关文章资源ps3.移动小车相关文章资源 1.引言 在当今AI时代&#xff0c;关于视觉识别似乎已被…

数据可视化:Seaborn

安装Seaborn 进入虚拟环境&#xff0c;在终端中键入 pip install seaborn 即可安装。 初步使用Seaborn 在使用seaborn之前&#xff0c;我们先了解一下seaborn是什么&#xff0c;seaborn是以matplotlib为底层的更简便的python第三方库&#xff0c;它可以更快捷地去设置图形的一…