基于jeecgboot-vue3的Flowable流程-已办任务(一)

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

1、api接口部分

javascript 复制代码
import { defHttp } from '/@/utils/http/axios';

enum Api {
  flowRecord = '/flowable/task/flowRecord',
  finishedListNew = '/flowable/task/finishedListNew',
  revokeProcess = '/flowable/task/revokeProcess',
  recallProcess = '/flowable/task/recallProcess',
  
}

// 任务流转记录
export const flowRecord = (params: any) => defHttp.get({ url: Api.flowRecord, params },{ isTransformResponse: false });

// 查询已办任务列表
export const finishedListNew = (params: any) => defHttp.get({ url: Api.finishedListNew, params });

// 撤回任务
export const revokeProcess = (data: any) => defHttp.post({ url: Api.revokeProcess, data },{ isTransformResponse: false });

// 收回任务
export const recallProcess = (data: any) => defHttp.post({ url: Api.recallProcess, data },{ isTransformResponse: false });

2、列表数据显示部分

javascript 复制代码
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '#',
    dataIndex: '',
    key:'rowIndex',
    width:60,
    align:"center"
  },
  {
    title:'任务编号',
    align:"center",
    dataIndex: 'procInsId'
  },
  {
    title:'流程名称',
    align:"center",
    dataIndex: 'procDefName'
  },
  {
    title:'任务节点',
    align:"center",
    dataIndex: 'taskName'
  },
  {
    title:'流程类别',
    align:"center",
    dataIndex: 'category'
  },
  {
    title:'流程版本',
    align:"center",
    dataIndex: 'procDefVersion'
  },
  {
    title:'业务主键',
    align:"center",
    dataIndex: 'businessKey'
  },
  {
    title:'流程发起人',
    align:"center",
    dataIndex: 'startUserName'
  },
  {
    title:'接收时间',
    align:"center",
    dataIndex: 'createTime'
  },
  {
    title:'审批时间',
    align:"center",
    dataIndex: 'finishTime'
  },
  {
    title:'耗时',
    align:"center",
    dataIndex: 'duration'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "流程名称",
    field: 'procDefName',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "接收日期",
    field: 'createTime',
    component: 'DatePicker',
    //colProps: {span: 6},
  },
  {
    label: "创建人员",
    field: 'createBy',
    component: 'Input',
    //colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    title:'任务编号',
    align:"center",
    dataIndex: 'procInsId'
  },
  {
    title:'流程名称',
    align:"center",
    dataIndex: 'procDefName'
  },
  {
    title:'任务节点',
    align:"center",
    dataIndex: 'taskName'
  },
  {
    title:'流程类别',
    align:"center",
    dataIndex: 'category'
  },
  {
    title:'流程版本',
    align:"center",
    dataIndex: 'procDefVersion'
  },
  {
    title:'业务主键',
    align:"center",
    dataIndex: 'businessKey'
  },
  {
    title:'流程发起人',
    align:"center",
    dataIndex: 'startUserName'
  },
  {
    title:'接收时间',
    align:"center",
    dataIndex: 'createTime'
  },
  {
    title:'审批时间',
    align:"center",
    dataIndex: 'finishTime'
  },
  {
    title:'耗时',
    align:"center",
    dataIndex: 'duration'
  },
	// TODO 主键隐藏字段,目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  procInsId: {title: '任务编号',order: 0,view: 'text', type: 'string',},
  procDefName: {title: '流程名称',order: 1,view: 'text', type: 'string',},
  category: {title: '流程类别',order: 2,view: 'text', type: 'string',},
  procDefVersion: {title: '流程版本',order: 3,view: 'text', type: 'string',},
  businessKey: {title: '业务主键',order: 4,view: 'text', type: 'string',},
  startUserName: {title: '流程发起人',order: 5,view: 'text', type: 'string',},
  createTime: {title: '接收时间',order: 6,view: 'date', type: 'string',},
  finishTime: {title: '审批时间',order: 7,view: 'date', type: 'string',},
  duration: {title: '耗时',order: 8,view: 'text', type: 'string',},
  taskName: {title: '当前节点',order: 9,view: 'text', type: 'string',},
};

3、效果图如下

相关推荐
_安晓26 分钟前
Rust 中精确大小迭代器(ExactSizeIterator)的深度解析与实践
java·前端·python
烛阴26 分钟前
从create到yield:Lua协程完全上手指南
前端·lua
薛一半1 小时前
Vue3的Pinia详解
前端·javascript·vue.js
浅影歌年2 小时前
vue3模块中引用公共css变量文件
前端
盼哥PyAI实验室3 小时前
从搭建到打磨:我的纯前端个人博客开发复盘
前端·javascript
前端初见3 小时前
2025前端面试题大合集
前端
用户904706683573 小时前
vue3.5新特性——useTemplateRef
前端
嘉琪0013 小时前
vue3+ts面试题(一)JSX,SFC
前端·javascript·react.js
何贤3 小时前
🪐 行星科技概念官网!Hero Section 回归!(Three.js ✨)
前端·javascript·three.js
前端拿破轮3 小时前
ReactNative从入门到性能优化(一)
前端·react native·客户端