/组件库/web流程设计器/myflow-min/myflow.jpdl4.js

https://github.com/zuopf769/notebook · JavaScript · 103 lines · 99 code · 4 blank · 0 comment · 0 complexity · 0df6d1b5b6ee91b31f7df69d597a8638 MD5 · raw file

  1. (function($){
  2. var myflow = $.myflow;
  3. $.extend(true,myflow.config.rect,{
  4. attr : {
  5. r : 8,
  6. fill : '#F6F7FF',
  7. stroke : '#03689A',
  8. "stroke-width" : 2
  9. }
  10. });
  11. $.extend(true,myflow.config.props.props,{
  12. name : {name:'name', label:'名称', value:'新建流程', editor:function(){return new myflow.editors.inputEditor();}},
  13. key : {name:'key', label:'标识', value:'', editor:function(){return new myflow.editors.inputEditor();}},
  14. desc : {name:'desc', label:'描述', value:'', editor:function(){return new myflow.editors.inputEditor();}}
  15. });
  16. $.extend(true,myflow.config.tools.states,{
  17. start : {
  18. showType: 'image',
  19. type : 'start',
  20. name : {text:'<<start>>'},
  21. text : {text:'开始'},
  22. img : {src : 'img/48/start_event_empty.png',width : 48, height:48},
  23. attr : {width:50 ,heigth:50 },
  24. props : {
  25. text: {name:'text',label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'开始'},
  26. temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  27. temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new myflow.editors.selectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
  28. }},
  29. end : {showType: 'image',type : 'end',
  30. name : {text:'<<end>>'},
  31. text : {text:'结束'},
  32. img : {src : 'img/48/end_event_terminate.png',width : 48, height:48},
  33. attr : {width:50 ,heigth:50 },
  34. props : {
  35. text: {name:'text',label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'结束'},
  36. temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  37. temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new myflow.editors.selectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
  38. }},
  39. 'end-cancel' : {showType: 'image',type : 'end-cancel',
  40. name : {text:'<<end-cancel>>'},
  41. text : {text:'取消'},
  42. img : {src : 'img/48/end_event_cancel.png',width : 48, height:48},
  43. attr : {width:50 ,heigth:50 },
  44. props : {
  45. text: {name:'text',label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'取消'},
  46. temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  47. temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new myflow.editors.selectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
  48. }},
  49. 'end-error' : {showType: 'image',type : 'end-error',
  50. name : {text:'<<end-error>>'},
  51. text : {text:'错误'},
  52. img : {src : 'img/48/end_event_error.png',width : 48, height:48},
  53. attr : {width:50 ,heigth:50 },
  54. props : {
  55. text: {name:'text',label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'错误'},
  56. temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  57. temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new myflow.editors.selectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
  58. }},
  59. state : {showType: 'text',type : 'state',
  60. name : {text:'<<state>>'},
  61. text : {text:'状态'},
  62. img : {src : 'img/48/task_empty.png',width : 48, height:48},
  63. props : {
  64. text: {name:'text',label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'状态'},
  65. temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  66. temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new myflow.editors.selectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
  67. }},
  68. fork : {showType: 'image',type : 'fork',
  69. name : {text:'<<fork>>'},
  70. text : {text:'分支'},
  71. img : {src : 'img/48/gateway_parallel.png',width :48, height:48},
  72. attr : {width:50 ,heigth:50 },
  73. props : {
  74. text: {name:'text', label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'分支'},
  75. temp1: {name:'temp1', label: '文本', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  76. temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new myflow.editors.selectEditor('select.json');}}
  77. }},
  78. join : {showType: 'image',type : 'join',
  79. name : {text:'<<join>>'},
  80. text : {text:'合并'},
  81. img : {src : 'img/48/gateway_parallel.png',width :48, height:48},
  82. attr : {width:50 ,heigth:50 },
  83. props : {
  84. text: {name:'text', label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'合并'},
  85. temp1: {name:'temp1', label: '文本', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  86. temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new myflow.editors.selectEditor('select.json');}}
  87. }},
  88. task : {showType: 'text',type : 'task',
  89. name : {text:'<<task>>'},
  90. text : {text:'任务'},
  91. img : {src : 'img/48/task_empty.png',width :48, height:48},
  92. props : {
  93. text: {name:'text', label: '显示', value:'', editor: function(){return new myflow.editors.textEditor();}, value:'任务'},
  94. assignee: {name:'assignee', label: '用户', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  95. form: {name:'form', label : '表单', value:'', editor: function(){return new myflow.editors.inputEditor();}},
  96. desc: {name:'desc', label : '描述', value:'', editor: function(){return new myflow.editors.inputEditor();}}
  97. }}
  98. });
  99. })(jQuery);