当前位置:   article > 正文

基于jeecgboot-vue3的Flowable流程-待办任务(一)_vue3集成flowable

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

1、ToDo.data.ts的数据信息如下

  1. import {BasicColumn} from '/@/components/Table';
  2. import {FormSchema} from '/@/components/Table';
  3. import { rules} from '/@/utils/helper/validator';
  4. import { render } from '/@/utils/common/renderUtils';
  5. //列表数据
  6. export const columns: BasicColumn[] = [
  7. {
  8. title: '#',
  9. dataIndex: '',
  10. key:'rowIndex',
  11. width:60,
  12. align:"center"
  13. },
  14. {
  15. title:'任务编号',
  16. align:"center",
  17. dataIndex: 'procInsId',
  18. },
  19. {
  20. title:'流程名称',
  21. align:"center",
  22. dataIndex: 'procDefName',
  23. },
  24. {
  25. title:'任务节点',
  26. align:"center",
  27. dataIndex: 'taskName',
  28. },
  29. {
  30. title:'流程类别',
  31. align:"center",
  32. dataIndex: 'category'
  33. },
  34. {
  35. title:'流程版本',
  36. align:"center",
  37. dataIndex: 'procDefVersion'
  38. },
  39. {
  40. title:'业务主键',
  41. align:"center",
  42. dataIndex: 'businessKey'
  43. },
  44. {
  45. title:'流程发起人',
  46. align:"center",
  47. dataIndex: 'startUserName'
  48. },
  49. {
  50. title:'接收时间',
  51. align:"center",
  52. dataIndex: 'createTime'
  53. },
  54. ];
  55. //查询数据
  56. export const searchFormSchema: FormSchema[] = [
  57. {
  58. label: "流程名称",
  59. field: 'procDefName',
  60. component: 'Input',
  61. },
  62. {
  63. label: "开始日期",
  64. field: 'createTime',
  65. component: 'DatePicker',
  66. },
  67. ];
  68. //表单数据
  69. export const formSchema: FormSchema[] = [
  70. {
  71. title:'任务编号',
  72. align:"center",
  73. dataIndex: 'procInsId',
  74. },
  75. {
  76. title:'流程名称',
  77. align:"center",
  78. dataIndex: 'procDefName',
  79. },
  80. {
  81. title:'任务节点',
  82. align:"center",
  83. dataIndex: 'taskName',
  84. },
  85. {
  86. title:'流程类别',
  87. align:"center",
  88. dataIndex: 'category'
  89. },
  90. {
  91. title:'流程版本',
  92. align:"center",
  93. dataIndex: 'procDefVersion'
  94. },
  95. {
  96. title:'业务主键',
  97. align:"center",
  98. dataIndex: 'businessKey'
  99. },
  100. {
  101. title:'流程发起人',
  102. align:"center",
  103. dataIndex: 'startUserName'
  104. },
  105. {
  106. title:'接收时间',
  107. align:"center",
  108. dataIndex: 'createTime'
  109. },
  110. // TODO 主键隐藏字段,目前写死为ID
  111. {
  112. label: '',
  113. field: 'id',
  114. component: 'Input',
  115. show: false,
  116. },
  117. ];
  118. // 高级查询数据
  119. export const superQuerySchema = {
  120. procInsId: {title: '任务编号',order: 0,view: 'text', type: 'string',},
  121. procDefName: {title: '流程名称',order: 1,view: 'text', type: 'string',},
  122. taskName: {title: '任务节点',order: 2,view: 'text', type: 'string',},
  123. category: {title: '流程类别',order: 2,view: 'text', type: 'string',},
  124. procDefVersion: {title: '流程版本',order: 3,view: 'text', type: 'string',},
  125. businessKey: {title: '业务主键',order: 4,view: 'text', type: 'string',},
  126. startUserName: {title: '流程发起人',order: 4,view: 'text', type: 'string',},
  127. createTime: {title: '接收时间',order: 5,view: 'date', type: 'string',},
  128. };

2、表格数据用todoListNew接口

  1. //注册table数据
  2. const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
  3. tableProps: {
  4. title: 'toDo',
  5. api: todoListNew,
  6. columns,
  7. canResize:false,
  8. useSearchForm: false,
  9. actionColumn: {
  10. width: 120,
  11. fixed: 'right',
  12. },
  13. beforeFetch: (params) => {
  14. return Object.assign(params, queryParam);
  15. },
  16. },
  17. exportConfig: {
  18. name: "toDo",
  19. url: getExportUrl,
  20. params: queryParam,
  21. },
  22. });

3、接口设置成如下,返回没有result这些信息,直接就是数据了

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

4、后端接口跟原先vue2版本一样

5、效果图如下:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/681017
推荐阅读
相关标签
  

闽ICP备14008679号