BpmData.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /**
  2. * 存储流程设计相关参数
  3. */
  4. export default class BpmData {
  5. constructor() {
  6. this.controls = [] // 设计器控件
  7. this.init()
  8. }
  9. init() {
  10. this.controls = [
  11. {
  12. action: 'create.start-event',
  13. title: '开始'
  14. },
  15. {
  16. action: 'create.intermediate-event',
  17. title: '中间'
  18. },
  19. {
  20. action: 'create.end-event',
  21. title: '结束'
  22. },
  23. {
  24. action: 'create.exclusive-gateway',
  25. title: '网关'
  26. },
  27. {
  28. action: 'create.task',
  29. title: '任务'
  30. },
  31. {
  32. action: 'create.user-task',
  33. title: '用户任务'
  34. },
  35. {
  36. action: 'create.user-sign-task',
  37. title: '会签任务'
  38. },
  39. {
  40. action: 'create.subprocess-expanded',
  41. title: '子流程'
  42. },
  43. {
  44. action: 'create.data-object',
  45. title: '数据对象'
  46. },
  47. {
  48. action: 'create.data-store',
  49. title: '数据存储'
  50. },
  51. {
  52. action: 'create.participant-expanded',
  53. title: '扩展流程'
  54. },
  55. {
  56. action: 'create.group',
  57. title: '分组'
  58. }
  59. ]
  60. }
  61. // 获取控件配置信息
  62. getControl(action) {
  63. const result = this.controls.filter(item => item.action === action)
  64. return result[0] || {}
  65. }
  66. }