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

相关推荐
肖哥弹架构9 分钟前
策略模式(Strategy Pattern):电商平台的优惠券系统实战案例分析
前端·后端·程序员
瑶琴AI前端30 分钟前
CSS实现文字颜色渐变
前端·css
檀玥1 小时前
创建react的脚手架
前端·javascript·react.js
ScriptEcho1 小时前
使用Rough.js库在画布上绘制一只毛毛虫
前端
前端阿森纳1 小时前
解决npm与yarn痛点:幽灵依赖与依赖分身
前端·架构·npm
u0104058361 小时前
实现Java Web应用的高性能负载均衡方案
java·前端·负载均衡
专注成就自我1 小时前
vue+openlayers之几何图形交互绘制基础与实践
前端·vue.js·交互
Loveistravelling1 小时前
arcgis实现在地图上自定义图标和3d文字展示
前端·gis
肖哥弹架构1 小时前
组合模式(Composite Pattern): 在线教育平台课程管理实战案例分析
前端·后端·程序员
HaSaKing_7211 小时前
Vue 父子页面使用指南
前端·javascript·vue.js