基于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、效果图如下

相关推荐
Ryan今天学习了吗1 分钟前
如何在浏览器中渲染100万个元素,并且保证页面不卡顿?超详细底层原理图文分享
前端
前端太佬1 分钟前
微信小程序支付全流程实战指南(Node.js后端篇)
前端·javascript·微信小程序
_十六2 分钟前
面试官最爱问的 TypeScript 装饰器:核心原理与实战技巧全解析.md
前端·typescript
代码搬运媛2 分钟前
mitt 事件发布-订阅库在 react 中的使用
前端
小桥风满袖3 分钟前
Three.js-硬要自学系列17 (拉伸、扫描、多边形轮廓简介、轮廓圆弧、多边形内孔)
前端·css·three.js
Ryan今天学习了吗4 分钟前
从零开始实现命令式组件ElMessage(附代码)
前端
用户2031196600964 分钟前
padding和frame在使用中的顺序问题
前端
资深前端外卖员6 分钟前
【nodejs高可用】Nodejs应用安全防范的问题总结
前端·javascript
袁煦丞6 分钟前
高效文件传输工具FastSend:cpolar内网穿透实验室第567个成功挑战
前端·程序员·远程工作