workflow-editor 0.0.89-up → 0.0.89-up-cdnTmp1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  2. package/es/index.mjs +18 -0
  3. package/es/plugins/formValidatorUtil.mjs +262 -0
  4. package/es/plugins/index.mjs +7 -0
  5. package/es/src/i18n/i18n.mjs +7 -0
  6. package/es/src/i18n/langs/cn.mjs +4 -0
  7. package/es/src/i18n/langs/en.mjs +4 -0
  8. package/es/style.css +1 -0
  9. package/es/workflow-editor/index.mjs +10 -0
  10. package/es/workflow-editor/src/api.mjs +6 -0
  11. package/es/workflow-editor/src/assets/wf-editor-icons.mjs +43 -0
  12. package/es/workflow-editor/src/json-object-templates/auto-task.mjs +7 -0
  13. package/es/workflow-editor/src/json-object-templates/copy-task.mjs +7 -0
  14. package/es/workflow-editor/src/json-object-templates/decision.mjs +7 -0
  15. package/es/workflow-editor/src/json-object-templates/end.mjs +7 -0
  16. package/es/workflow-editor/src/json-object-templates/fork.mjs +7 -0
  17. package/es/workflow-editor/src/json-object-templates/human-decision.mjs +7 -0
  18. package/es/workflow-editor/src/json-object-templates/human-task.mjs +7 -0
  19. package/es/workflow-editor/src/json-object-templates/join.mjs +7 -0
  20. package/es/workflow-editor/src/json-object-templates/process.mjs +9 -0
  21. package/es/workflow-editor/src/json-object-templates/start.mjs +7 -0
  22. package/es/workflow-editor/src/json-object-templates/subprocess.mjs +7 -0
  23. package/es/workflow-editor/src/json-object-templates/transition.mjs +6 -0
  24. package/es/workflow-editor/src/main/admin-save-dialog.vue.mjs +13 -0
  25. package/es/workflow-editor/src/main/canvas.vue.mjs +130 -0
  26. package/es/workflow-editor/src/main/canvas.vue2.mjs +4 -0
  27. package/es/workflow-editor/src/main/context-menu.vue.mjs +33 -0
  28. package/es/workflow-editor/src/main/context-menu.vue2.mjs +4 -0
  29. package/es/workflow-editor/src/main/icon-svg.vue.mjs +12 -0
  30. package/es/workflow-editor/src/main/icon-svg.vue2.mjs +4 -0
  31. package/es/workflow-editor/src/main/selection-region.vue.mjs +17 -0
  32. package/es/workflow-editor/src/main/selection-region.vue2.mjs +4 -0
  33. package/es/workflow-editor/src/main/tache-history-tooltip.vue.mjs +10 -0
  34. package/es/workflow-editor/src/main/tache-history-tooltip.vue2.mjs +4 -0
  35. package/es/workflow-editor/src/main/tache-subprocess-history-dialog.vue.mjs +11 -0
  36. package/es/workflow-editor/src/main/tache-subprocess-history-dialog.vue2.mjs +4 -0
  37. package/es/workflow-editor/src/main/toolbox.vue.mjs +16 -0
  38. package/es/workflow-editor/src/main/toolbox.vue2.mjs +4 -0
  39. package/es/workflow-editor/src/main/wf-history-canvas.vue.mjs +86 -0
  40. package/es/workflow-editor/src/main/wf-history-canvas.vue2.mjs +4 -0
  41. package/es/workflow-editor/src/process-service.mjs +20 -0
  42. package/es/workflow-editor/src/properties-editors/auto-task/basic-properties.vue.mjs +25 -0
  43. package/es/workflow-editor/src/properties-editors/auto-task/basic-properties.vue2.mjs +4 -0
  44. package/es/workflow-editor/src/properties-editors/auto-task.vue.mjs +22 -0
  45. package/es/workflow-editor/src/properties-editors/auto-task.vue2.mjs +4 -0
  46. package/es/workflow-editor/src/properties-editors/common/additional-condition-utils.mjs +125 -0
  47. package/es/workflow-editor/src/properties-editors/common/additional-condition.vue.mjs +60 -0
  48. package/es/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.mjs +5 -0
  49. package/es/workflow-editor/src/properties-editors/common/auto-filled-fields.vue.mjs +72 -0
  50. package/es/workflow-editor/src/properties-editors/common/common-notice-tool.vue.mjs +18 -0
  51. package/es/workflow-editor/src/properties-editors/common/common-user-condition.vue.mjs +55 -0
  52. package/es/workflow-editor/src/properties-editors/common/form-fields-utils.mjs +14 -0
  53. package/es/workflow-editor/src/properties-editors/common/form-fields.vue.mjs +20 -0
  54. package/es/workflow-editor/src/properties-editors/common/form-fields.vue2.mjs +4 -0
  55. package/es/workflow-editor/src/properties-editors/common/i18n-input.vue.mjs +27 -0
  56. package/es/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue.mjs +36 -0
  57. package/es/workflow-editor/src/properties-editors/common/notice-reminder.vue.mjs +27 -0
  58. package/es/workflow-editor/src/properties-editors/common/notice-reminder.vue2.mjs +4 -0
  59. package/es/workflow-editor/src/properties-editors/common/notice.vue.mjs +31 -0
  60. package/es/workflow-editor/src/properties-editors/common/reminder.vue.mjs +46 -0
  61. package/es/workflow-editor/src/properties-editors/common/reminder.vue2.mjs +4 -0
  62. package/es/workflow-editor/src/properties-editors/common/select-mail-template.vue.mjs +20 -0
  63. package/es/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue.mjs +95 -0
  64. package/es/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue2.mjs +4 -0
  65. package/es/workflow-editor/src/properties-editors/common/system-role-tree.vue.mjs +16 -0
  66. package/es/workflow-editor/src/properties-editors/common/system-role-tree.vue2.mjs +4 -0
  67. package/es/workflow-editor/src/properties-editors/common/task-title.vue.mjs +61 -0
  68. package/es/workflow-editor/src/properties-editors/common/task-title.vue2.mjs +4 -0
  69. package/es/workflow-editor/src/properties-editors/common/task-title.vue3.mjs +4 -0
  70. package/es/workflow-editor/src/properties-editors/common/transactor-settings.vue.mjs +43 -0
  71. package/es/workflow-editor/src/properties-editors/common/user-selection.vue.mjs +116 -0
  72. package/es/workflow-editor/src/properties-editors/common/value-selection-dialog.vue.mjs +60 -0
  73. package/es/workflow-editor/src/properties-editors/common/value-selection-dialog.vue2.mjs +4 -0
  74. package/es/workflow-editor/src/properties-editors/common/variables.vue.mjs +41 -0
  75. package/es/workflow-editor/src/properties-editors/copy-task/basic-properties.vue.mjs +25 -0
  76. package/es/workflow-editor/src/properties-editors/copy-task/basic-properties.vue2.mjs +4 -0
  77. package/es/workflow-editor/src/properties-editors/copy-task/permission-settings.vue.mjs +30 -0
  78. package/es/workflow-editor/src/properties-editors/copy-task/permission-settings.vue2.mjs +4 -0
  79. package/es/workflow-editor/src/properties-editors/copy-task.vue.mjs +26 -0
  80. package/es/workflow-editor/src/properties-editors/copy-task.vue2.mjs +4 -0
  81. package/es/workflow-editor/src/properties-editors/decision.vue.mjs +24 -0
  82. package/es/workflow-editor/src/properties-editors/fork.vue.mjs +21 -0
  83. package/es/workflow-editor/src/properties-editors/human-decision.vue.mjs +15 -0
  84. package/es/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue.mjs +16 -0
  85. package/es/workflow-editor/src/properties-editors/human-task/basic-properties.vue.mjs +38 -0
  86. package/es/workflow-editor/src/properties-editors/human-task/basic-properties.vue2.mjs +4 -0
  87. package/es/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.mjs +84 -0
  88. package/es/workflow-editor/src/properties-editors/human-task/custom-actions.vue.mjs +62 -0
  89. package/es/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue.mjs +80 -0
  90. package/es/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue.mjs +86 -0
  91. package/es/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue.mjs +43 -0
  92. package/es/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue2.mjs +4 -0
  93. package/es/workflow-editor/src/properties-editors/human-task/editable-fields.vue.mjs +67 -0
  94. package/es/workflow-editor/src/properties-editors/human-task/events.vue.mjs +18 -0
  95. package/es/workflow-editor/src/properties-editors/human-task/permission-settings.vue.mjs +33 -0
  96. package/es/workflow-editor/src/properties-editors/human-task/permission-settings.vue2.mjs +4 -0
  97. package/es/workflow-editor/src/properties-editors/human-task/selection-conditions.vue.mjs +56 -0
  98. package/es/workflow-editor/src/properties-editors/human-task.vue.mjs +28 -0
  99. package/es/workflow-editor/src/properties-editors/human-task.vue2.mjs +4 -0
  100. package/es/workflow-editor/src/properties-editors/join.vue.mjs +15 -0
  101. package/es/workflow-editor/src/properties-editors/process/basic-properties.vue.mjs +88 -0
  102. package/es/workflow-editor/src/properties-editors/process/events.vue.mjs +21 -0
  103. package/es/workflow-editor/src/properties-editors/process/notice-settings.vue.mjs +25 -0
  104. package/es/workflow-editor/src/properties-editors/process/parameter-settings.vue.mjs +17 -0
  105. package/es/workflow-editor/src/properties-editors/process/permission-settings.vue.mjs +10 -0
  106. package/es/workflow-editor/src/properties-editors/process/selectPage.vue.mjs +28 -0
  107. package/es/workflow-editor/src/properties-editors/process.vue.mjs +34 -0
  108. package/es/workflow-editor/src/properties-editors/subprocess/basic-properties.vue.mjs +64 -0
  109. package/es/workflow-editor/src/properties-editors/subprocess/events.vue.mjs +9 -0
  110. package/es/workflow-editor/src/properties-editors/subprocess/field-mappings.vue.mjs +55 -0
  111. package/es/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue.mjs +20 -0
  112. package/es/workflow-editor/src/properties-editors/subprocess.vue.mjs +22 -0
  113. package/es/workflow-editor/src/properties-editors/subprocess.vue2.mjs +4 -0
  114. package/es/workflow-editor/src/properties-editors/transition/basic-properties.vue.mjs +14 -0
  115. package/es/workflow-editor/src/properties-editors/transition.vue.mjs +17 -0
  116. package/es/workflow-editor/src/properties-editors/transition.vue2.mjs +4 -0
  117. package/es/workflow-editor/src/properties-editors/user-condition.mjs +49 -0
  118. package/es/workflow-editor/src/store/getters.mjs +4 -0
  119. package/es/workflow-editor/src/store/workflow-editor.mjs +73 -0
  120. package/es/workflow-editor/src/taches/auto-task.vue.mjs +25 -0
  121. package/es/workflow-editor/src/taches/common-methods.mjs +13 -0
  122. package/es/workflow-editor/src/taches/copy-task.vue.mjs +25 -0
  123. package/es/workflow-editor/src/taches/custom-task.vue.mjs +16 -0
  124. package/es/workflow-editor/src/taches/decision.vue.mjs +25 -0
  125. package/es/workflow-editor/src/taches/decision.vue2.mjs +4 -0
  126. package/es/workflow-editor/src/taches/end.vue.mjs +14 -0
  127. package/es/workflow-editor/src/taches/end.vue2.mjs +4 -0
  128. package/es/workflow-editor/src/taches/fork.vue.mjs +25 -0
  129. package/es/workflow-editor/src/taches/fork.vue2.mjs +4 -0
  130. package/es/workflow-editor/src/taches/human-decision.vue.mjs +25 -0
  131. package/es/workflow-editor/src/taches/human-decision.vue2.mjs +4 -0
  132. package/es/workflow-editor/src/taches/human-task.vue.mjs +25 -0
  133. package/es/workflow-editor/src/taches/join.vue.mjs +16 -0
  134. package/es/workflow-editor/src/taches/join.vue2.mjs +4 -0
  135. package/es/workflow-editor/src/taches/joint.vue.mjs +54 -0
  136. package/es/workflow-editor/src/taches/joint.vue2.mjs +4 -0
  137. package/es/workflow-editor/src/taches/start.vue.mjs +14 -0
  138. package/es/workflow-editor/src/taches/start.vue2.mjs +4 -0
  139. package/es/workflow-editor/src/taches/subprocess.vue.mjs +25 -0
  140. package/es/workflow-editor/src/taches/tache-resizer.vue.mjs +30 -0
  141. package/es/workflow-editor/src/taches/tache-resizer.vue2.mjs +4 -0
  142. package/es/workflow-editor/src/transitions/broken-line.vue.mjs +32 -0
  143. package/es/workflow-editor/src/transitions/broken-line.vue2.mjs +4 -0
  144. package/es/workflow-editor/src/transitions/curve-line.vue.mjs +33 -0
  145. package/es/workflow-editor/src/transitions/curve-line.vue2.mjs +4 -0
  146. package/es/workflow-editor/src/transitions/straight-line.vue.mjs +13 -0
  147. package/es/workflow-editor/src/transitions/transition.vue.mjs +77 -0
  148. package/es/workflow-editor/src/transitions/transition.vue2.mjs +4 -0
  149. package/es/workflow-editor/src/transitions/virtual-transition.vue.mjs +17 -0
  150. package/es/workflow-editor/src/transitions/virtual-transition.vue2.mjs +4 -0
  151. package/es/workflow-editor/src/util.mjs +180 -0
  152. package/es/workflow-editor/src/workflow-editor.vue.mjs +212 -0
  153. package/es/workflow-editor/src/workflow-editor.vue2.mjs +4 -0
  154. package/es/workflow-editor/src/workflow-history.vue.mjs +35 -0
  155. package/es/workflow-editor/src/workflow-history.vue2.mjs +4 -0
  156. package/package.json +16 -8
  157. package/.prettierrc.json +0 -9
  158. package/index.html +0 -13
  159. package/lib/401-ff27e685.js +0 -101
  160. package/lib/404-33de0149.js +0 -26
  161. package/lib/authredirect-ae6e75b4.js +0 -10
  162. package/lib/iframe-page-1982a263.js +0 -33
  163. package/lib/index-369eae4a.js +0 -13
  164. package/lib/index-41d47f5c.js +0 -32779
  165. package/lib/tab-content-iframe-index-df889a3a.js +0 -33
  166. package/lib/tab-content-index-3d780597.js +0 -1260
  167. package/lib/tache-subprocess-history-33260653.js +0 -56
  168. package/lib/workflow-editor.css +0 -1
  169. package/lib/workflow-editor.js +0 -5
  170. package/lib/workflow-editor.umd.cjs +0 -90
  171. package/packages/index.js +0 -34
  172. package/packages/plugins/formValidatorUtil.js +0 -890
  173. package/packages/plugins/index.js +0 -8
  174. package/packages/workflow-editor/index.js +0 -14
  175. package/packages/workflow-editor/src/api.js +0 -7
  176. package/packages/workflow-editor/src/assets/tab-select.png +0 -0
  177. package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
  178. package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
  179. package/packages/workflow-editor/src/constant.js +0 -8
  180. package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
  181. package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
  182. package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
  183. package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
  184. package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
  185. package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
  186. package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
  187. package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
  188. package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
  189. package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
  190. package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
  191. package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
  192. package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
  193. package/packages/workflow-editor/src/main/canvas.vue +0 -493
  194. package/packages/workflow-editor/src/main/context-menu.vue +0 -147
  195. package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
  196. package/packages/workflow-editor/src/main/selection-region.vue +0 -66
  197. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
  198. package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
  199. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
  200. package/packages/workflow-editor/src/main/toolbox.vue +0 -60
  201. package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
  202. package/packages/workflow-editor/src/process-json.js +0 -624
  203. package/packages/workflow-editor/src/process-service.js +0 -69
  204. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
  205. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
  206. package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
  207. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -636
  208. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -300
  209. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
  210. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -268
  211. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
  212. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
  213. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
  214. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -114
  215. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -90
  216. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
  217. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -144
  218. package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
  219. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -307
  220. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
  221. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
  222. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
  223. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
  224. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -221
  225. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
  226. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
  227. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
  228. package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -139
  229. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
  230. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
  231. package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
  232. package/packages/workflow-editor/src/properties-editors/decision.vue +0 -88
  233. package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
  234. package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
  235. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
  236. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
  237. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
  238. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
  239. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
  240. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
  241. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
  242. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
  243. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
  244. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -231
  245. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
  246. package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -107
  247. package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
  248. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
  249. package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
  250. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
  251. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
  252. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
  253. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
  254. package/packages/workflow-editor/src/properties-editors/process.vue +0 -118
  255. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
  256. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
  257. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
  258. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
  259. package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
  260. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
  261. package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
  262. package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
  263. package/packages/workflow-editor/src/store/getters.js +0 -33
  264. package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
  265. package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
  266. package/packages/workflow-editor/src/taches/common-methods.js +0 -21
  267. package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
  268. package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
  269. package/packages/workflow-editor/src/taches/decision.vue +0 -102
  270. package/packages/workflow-editor/src/taches/end.vue +0 -76
  271. package/packages/workflow-editor/src/taches/fork.vue +0 -102
  272. package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
  273. package/packages/workflow-editor/src/taches/human-task.vue +0 -113
  274. package/packages/workflow-editor/src/taches/join.vue +0 -91
  275. package/packages/workflow-editor/src/taches/joint.vue +0 -177
  276. package/packages/workflow-editor/src/taches/start.vue +0 -76
  277. package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
  278. package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
  279. package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
  280. package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
  281. package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
  282. package/packages/workflow-editor/src/transitions/transition.vue +0 -229
  283. package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
  284. package/packages/workflow-editor/src/util.js +0 -499
  285. package/packages/workflow-editor/src/workflow-editor.vue +0 -869
  286. package/packages/workflow-editor/src/workflow-history.vue +0 -153
  287. package/public/vite.svg +0 -1
  288. package/src/i18n/i18n.js +0 -16
  289. package/src/i18n/langs/cn.js +0 -526
  290. package/src/i18n/langs/en.js +0 -534
  291. package/vite.config.js +0 -36
  292. /package/{lib → es}/vite.svg +0 -0
@@ -1,869 +0,0 @@
1
- <template>
2
- <div
3
- ref="wfEditor"
4
- style="position: relative; height: 100%"
5
- @mousedown="setContextMenuVisible(false)"
6
- @mousewheel="setContextMenuVisible(false)"
7
- >
8
- <el-row class="button-area">
9
- <el-button v-if="!readonly" type="primary" @click="saveXml">
10
- {{ $t('workflowEditorPublicModel.save') }}
11
- </el-button>
12
- <el-button
13
- v-if="!readonly"
14
- v-permission="'wf.workflowDefinition.adminSave'"
15
- class="button--default"
16
- @click="adminSave"
17
- >
18
- {{ $t('workflowEditorPublicModel.adminSave') }}
19
- </el-button>
20
- <el-button v-if="isShowEnable" class="button--default" @click="enableWf">
21
- {{ $t('workflowEditorPublicModel.enable') }}
22
- </el-button>
23
- <el-button class="button--default" @click="exportProcessFromClient">
24
- {{ $t('workflowEditorPublicModel.export') }}
25
- </el-button>
26
- <el-button v-if="!readonly" class="button--default" @click="selectProcessFile">
27
- {{ $t('workflowEditorPublicModel.open') }}
28
- <input
29
- ref="processFile"
30
- type="file"
31
- name="processFile"
32
- accept=".xml"
33
- style="display: none"
34
- @change="openXmlFromClient"
35
- />
36
- </el-button>
37
- <el-button type="primary" class="button--return" @click="$emit('back')">
38
- {{ $t('workflowEditorPublicModel.return') }}
39
- </el-button>
40
- <el-select
41
- v-if="isShowDefVersionList"
42
- v-model="defVersion"
43
- style="padding-left: 10px; width: 200px"
44
- @change="changeDefVersion"
45
- >
46
- <el-option
47
- v-for="systemInfo in workflowDefVersionList"
48
- :key="systemInfo.definitionVersion"
49
- :label="systemInfo.definitionVersion"
50
- :value="systemInfo.definitionVersion"
51
- />
52
- </el-select>
53
- </el-row>
54
- <div class="main" @mousedown="startDrag" @mousemove="drag" @mouseup="endDrag" @mouseleave="clearStatus">
55
- <toolbox v-if="!readonly" class="toolbox" onselectstart="return false" oncontextmenu="return false" />
56
- <section class="tabBox" :key="canvasKey">
57
- <el-tabs v-model="activeTab" class="tabs">
58
- <el-tab-pane :label="$t('workflowEditorPublicModel.flowChart')" name="canvas" class="tab-pane">
59
- <workflow-canvas
60
- onselectstart="return false"
61
- :process="process"
62
- class="canvas"
63
- @mouseup.native="addTache"
64
- @contextmenu.native.prevent="showContextMenu"
65
- />
66
- </el-tab-pane>
67
- <el-tab-pane label="XML" name="xml" class="tab-pane">
68
- <div style="width: 100%; height: 100%; background: #fff">
69
- <pre
70
- v-if="activeTab === 'xml'"
71
- class="xml line-numbers"
72
- ><code ref="xml" class="language-xml">{{ xml }}</code></pre>
73
- </div>
74
- </el-tab-pane>
75
- </el-tabs>
76
- </section>
77
- </div>
78
- <icon-svg
79
- v-if="componentToDraw"
80
- :style="{
81
- height: componentInfo.height,
82
- width: componentInfo.width,
83
- color: componentInfo.color,
84
- left: currentPosition.x + 'px',
85
- top: currentPosition.y + 'px'
86
- }"
87
- :icon="componentInfo.icon"
88
- class="component-icon"
89
- />
90
- <context-menu
91
- v-if="contextMenuVisible"
92
- :style="{
93
- position: 'absolute',
94
- left: contextMenuPosition.x + 'px',
95
- top: contextMenuPosition.y + 'px'
96
- }"
97
- />
98
- <admin-save-dialog v-if="isAdminSave" @close="isAdminSave = false" @update="updateWfVersion" @add="addWfVersion" />
99
- </div>
100
- </template>
101
- <script>
102
- import './assets/wf-editor-icons.js'
103
- import { mapGetters, mapMutations } from 'vuex'
104
- import { getMousePosition, removeTextProperty, getComponentInfo, initializeProcessData, processTemplate } from './util'
105
- import Toolbox from './main/toolbox.vue'
106
- import WorkflowCanvas from './main/canvas.vue'
107
- import IconSvg from './main/icon-svg.vue'
108
- import ContextMenu from './main/context-menu.vue'
109
- import convert from 'xml-js'
110
- import processService from './process-service'
111
- import FileSaver from 'file-saver'
112
- import Prism from 'prismjs'
113
- import AdminSaveDialog from './main/admin-save-dialog.vue'
114
- import authApi from 'agilebuilder-ui/src/utils/auth-api'
115
- import http from 'agilebuilder-ui/src/utils/request'
116
-
117
- export default {
118
- name: 'WorkflowEditor',
119
- components: {
120
- WorkflowCanvas,
121
- Toolbox,
122
- IconSvg,
123
- ContextMenu,
124
- AdminSaveDialog
125
- },
126
- props: {
127
- // 流程编码
128
- code: {
129
- type: String,
130
- default: null
131
- },
132
- // 流程版本
133
- version: {
134
- type: Number,
135
- default: null
136
- },
137
- // 流程id
138
- id: {
139
- type: Number,
140
- default: null
141
- },
142
- readonly: {
143
- type: Boolean,
144
- default: false
145
- },
146
- // 系统编码,新增时选中的系统编码,或修改时流程定义所属的系统编码
147
- systemCode: {
148
- type: String,
149
- default: null
150
- },
151
- // 系统版本号,修改时流程定义中的系统版本号,例如:v1.0.0,新增不会使用该属性
152
- systemPublishVersion: {
153
- type: Number,
154
- default: null
155
- },
156
- // 新页面设计中页面编码
157
- pageCode: {
158
- type: String,
159
- default: null
160
- }
161
- },
162
- data: function () {
163
- return {
164
- activeTab: 'canvas',
165
- count: 1,
166
- currentPosition: { x: 0, y: 0 },
167
- process: null,
168
- definitionId: null,
169
- xml: '',
170
- contextMenuPosition: null,
171
- isAdminSave: false, // 是否点击了管理员保存按钮
172
- isShowEnable: false, // 流程定义是否已启用,如果已启用,则不显示“启用”按钮,草稿和禁用时才显示启用按钮
173
- defVersion: 0, //流程定义版本
174
- workflowDefVersionList: [], // 流程定义各版本集合
175
- isShowDefVersionList: false, // 是否显示流程定义版本下拉选
176
- canvasKey: 0
177
- }
178
- },
179
- computed: {
180
- ...mapGetters('wfEditor', [
181
- 'componentToDraw',
182
- 'taches',
183
- 'selectedTaches',
184
- 'transitions',
185
- 'contextMenuVisible',
186
- 'systemVersion',
187
- 'tableCode',
188
- 'pageCode',
189
- 'sourceComponentType'
190
- ]),
191
- ...mapGetters(['sidebar']),
192
- componentInfo() {
193
- return getComponentInfo(this.componentToDraw)
194
- }
195
- },
196
- watch: {
197
- activeTab(name) {
198
- if (name === 'xml') {
199
- this.xml = this.getProcessXml()
200
- this.$nextTick(function () {
201
- Prism.highlightElement(this.$refs.xml)
202
- })
203
- }
204
- },
205
- sourceComponentType(newVal) {
206
- if (newVal) {
207
- this.copyTache()
208
- }
209
- }
210
- },
211
- created: function () {
212
- // if (this.systemPublishVersion) {
213
- // this.setSystemVersion(this.systemPublishVersion)
214
- // }
215
- authApi.setSessionCache('wf_editor_systemVersion', this.systemPublishVersion)
216
- this.setPageCode(this.pageCode)
217
- if (this.systemCode) {
218
- this.setSystemCode(this.systemCode)
219
- }
220
-
221
- // 请求版本所有列表
222
- if (this.systemCode) {
223
- this.getWorkflowDefVersionList()
224
- }
225
- // 打开或新建流程图时先清空画布,开发过程中代码热更新的时候可以避免节点重复
226
- this.clearCanvas()
227
- if (this.id) {
228
- this.definitionId = this.id
229
- }
230
- console.log('canvas-created=', this.code, this.id)
231
- if (this.code || this.id) {
232
- this.initShowDefinitionWhenUpdate(this.id, this.code, this.version)
233
- } else {
234
- this.isShowEnable = false
235
- window.$store.commit('wfEditor/setIsCreateDefinition', 'true')
236
- this.process = processTemplate.newProcess()
237
- initializeProcessData(this.process)
238
- }
239
- },
240
- mounted: function () {},
241
- methods: {
242
- ...mapMutations('wfEditor', [
243
- 'setComponentToDraw',
244
- 'clearCanvas',
245
- 'setContextMenuVisible',
246
- 'setSystemCode',
247
- 'setSystemVersion',
248
- 'setProcessCode',
249
- 'setPageCode',
250
- 'setSourceComponentForCopy'
251
- ]),
252
- initShowDefinitionWhenUpdate(defId, workflowCode, workflowVersion) {
253
- window.$store.commit('wfEditor/setIsCreateDefinition', 'false')
254
- let url = this.baseAPI + '/wf-editor/open-xmls/with-definitions'
255
- url = this.packageUrlParam(url, defId, workflowCode, workflowVersion)
256
- this.$http.get(url).then((data) => {
257
- const definition = data.definition
258
- if (definition) {
259
- this.definitionId = definition.id
260
- this.defVersion = definition.definitionVersion
261
- window.$store.commit('wfEditor/setTableCode', definition.tableCode)
262
- const state = definition.enable
263
- if (state && state === 'ENABLE') {
264
- this.isShowEnable = false
265
- } else {
266
- this.isShowEnable = true
267
- }
268
- if (definition.formCode) {
269
- // 表示在流程定义模块中创建的流程
270
- window.$store.commit('wfEditor/setIsHandleCreate', 'true')
271
- } else {
272
- // 表示在页面设计中创建的流程
273
- window.$store.commit('wfEditor/setIsHandleCreate', 'false')
274
- }
275
- }
276
- const xml = data.xml
277
- this.initProcessByXml(xml, definition)
278
- this.canvasKey++
279
- })
280
- },
281
- getWorkflowDefVersionList() {
282
- // 重新初始显示流程版本下拉选
283
- this.isShowDefVersionList = false
284
- let queryBody = {
285
- wfDefinitionCode: this.code,
286
- publishVersion: this.systemPublishVersion
287
- }
288
- http
289
- .post(
290
- window['$vueApp'].config.globalProperties.baseAPI +
291
- `/component/super-page-design/workflow-definitions/version-list`,
292
- queryBody
293
- )
294
- .then((res) => {
295
- this.workflowDefVersionList = res
296
- if (res.length > 0 && !this.defVersion) {
297
- this.defVersion = res[0].definitionVersion
298
- }
299
- this.isShowDefVersionList = true
300
- })
301
- },
302
- showContextMenu(event) {
303
- this.setContextMenuVisible(true)
304
- // 得到元素在页面上的位置信息,用来计算鼠标位置的偏移量
305
- const offset = this.$refs.wfEditor.getBoundingClientRect()
306
- this.contextMenuPosition = {
307
- x: event.clientX - offset.x,
308
- y: event.clientY - offset.y
309
- }
310
- },
311
- changeDefVersion(newDefVersion) {
312
- const defList = this.workflowDefVersionList.filter((def) => def.definitionVersion === newDefVersion)
313
- if (defList && defList.length > 0) {
314
- const newDef = defList[0]
315
- // 打开或新建流程图时先清空画布,开发过程中代码热更新的时候可以避免节点重复
316
- this.clearCanvas()
317
- this.initShowDefinitionWhenUpdate(newDef.id, newDef.code, newDef.definitionVersion)
318
- this.$emit('changeDefVersion', newDef)
319
- }
320
- },
321
- initProcessByXml(xml, definition) {
322
- if (!xml) {
323
- // xml内容为空,则初始化xml
324
- this.process = processTemplate.newProcess()
325
- this.initProcessBaseInfo(definition)
326
- } else {
327
- const options = {
328
- nativeType: true,
329
- attributesKey: 'attr',
330
- compact: true,
331
- ignoreComment: true,
332
- spaces: 4
333
- }
334
- const processObj = convert.xml2js(xml, options)
335
- removeTextProperty(processObj.process)
336
- this.process = processObj.process
337
- }
338
- if (this.process && this.process.properties && this.process.properties.basicProperties) {
339
- this.setSystemCode(this.process.properties.basicProperties.systemCode)
340
- } else {
341
- // 新增时,将传过来的系统编码缓存起来
342
- this.setSystemCode(this.systemCode)
343
- }
344
- if (this.process && this.process.attr) {
345
- this.setProcessCode(this.process.attr.code)
346
- }
347
- this.checkPageCode()
348
- // 得到表单字段放到vuex
349
- this.fetchFormFields()
350
- this.clearCanvas()
351
- initializeProcessData(this.process)
352
- this.count = this.getMaxCount() + 1
353
- },
354
- initProcessBaseInfo(definition) {
355
- this.process.attr.name = definition.name
356
- this.process.attr.code = definition.code
357
- this.process.properties.basicProperties.systemCode = definition.systemCode
358
- if (this.pageCode) {
359
- if (!this.process.properties.parameterSettings) {
360
- this.process.properties.parameterSettings = {}
361
- }
362
- if (!this.process.properties.parameterSettings.doTask) {
363
- this.process.properties.parameterSettings.doTask = {}
364
- }
365
- this.process.properties.parameterSettings.doTask.url = 'page:' + this.pageCode
366
- }
367
- },
368
- fetchFormFields() {
369
- const processProperties = this.process.properties.basicProperties
370
- const formCode = processProperties.formCode
371
- const formVersion = processProperties.formVersion
372
- console.log('fetchFormFields---this.tableCode=', this.tableCode)
373
- if (formCode && formCode !== '' && formVersion) {
374
- // 取出formFields放到vuex中
375
- processService.fetchFormFields(
376
- processProperties.formCode,
377
- processProperties.formVersion,
378
- null,
379
- this.systemPublishVersion
380
- )
381
- } else if (this.tableCode) {
382
- // TODO: 根据数据表获得字段集合 表示在页面设计中创建的流程
383
- processService.fetchFormFields(null, null, this.tableCode, this.systemPublishVersion)
384
- }
385
- },
386
- packageUrlParam(url, defId, workflowCode, workflowVersion) {
387
- if (defId) {
388
- url = url + '?id=' + defId
389
- } else if (workflowCode) {
390
- url = url + '?code=' + workflowCode + '&version=' + workflowVersion
391
- }
392
- return url
393
- },
394
- // 获得流程定义xml
395
- getProcessXml() {
396
- const process = {
397
- start: [],
398
- humanTask: [],
399
- decision: [],
400
- transition: [],
401
- fork: [],
402
- join: [],
403
- subprocess: [],
404
- humanDecision: [],
405
- copyTask: [],
406
- autoTask: [],
407
- end: []
408
- }
409
- process.attr = this.process.attr
410
- process.properties = this.process.properties
411
- this.taches.map((tache) => {
412
- const type = tache.type
413
- // type的首字母小写形式就是process中各个数组的名字,ref才是真正的环节信息
414
- process[type.charAt(0).toLowerCase() + type.substring(1)].push(tache.ref)
415
- // 补充完整图形位置信息
416
- tache.ref.g = {
417
- x: tache.x,
418
- y: tache.y,
419
- width: tache.width,
420
- height: tache.height
421
- }
422
- })
423
- this.transitions.map((transition) => {
424
- // ref才是真正的流向信息
425
- process.transition.push(transition.ref)
426
- // 补充完整图形位置信息
427
- transition.ref.g = {
428
- fromJoint: transition.startJoint.position,
429
- toJoint: transition.endJoint.position,
430
- coordinate: '',
431
- lineType: transition.lineInfo.type
432
- }
433
- if (transition.lineInfo.type === 'CurveLine' && transition.lineInfo.controlPoint) {
434
- transition.ref.g.coordinate = transition.lineInfo.controlPoint.x + ',' + transition.lineInfo.controlPoint.y
435
- } else if (transition.lineInfo.type === 'BrokenLine' && transition.lineInfo.controlPoint) {
436
- let coordinate = ''
437
- transition.lineInfo.controlPoint.forEach((point) => {
438
- coordinate += point.x + ',' + point.y + ';'
439
- })
440
- transition.ref.g.coordinate = coordinate
441
- }
442
- })
443
- const options = { attributesKey: 'attr', compact: true, ignoreComment: true, spaces: 4 }
444
- let result = convert.json2xml({ process }, options)
445
- result = '<?xml version="1.0" encoding="utf-8"?>\n' + result
446
- return result
447
- },
448
- // 保存xml
449
- saveXml() {
450
- const xml = this.getProcessXml()
451
- // console.log(xml)
452
- // 保存流程定义xml
453
- if (this.code || this.id || this.definitionId) {
454
- // 表示修改
455
- this.saveWf(xml, this.baseAPI + '/wf-editor/workflow-definitions/updates').then(() => {
456
- // 表示新增版本后,流程定义状态是草稿
457
- this.isShowEnable = true
458
- window.$store.commit('wfEditor/setIsCreateDefinition', 'false')
459
- this.$alert(this.$t('workflowEditorMessage.updateSuccessful'))
460
- })
461
- } else {
462
- // 表示新建
463
- const param = {
464
- xml: xml,
465
- publishVersion: this.systemPublishVersion
466
- }
467
- this.$http.post(this.baseAPI + '/wf-editor/workflow-definitions', param).then((definition) => {
468
- // 表示草稿状态保存
469
- this.isShowEnable = true
470
- window.$store.commit('wfEditor/setIsCreateDefinition', 'false')
471
- this.definitionId = definition.id
472
- this.$alert(this.$t('workflowEditorMessage.savedSuccessfully'))
473
- // console.log('新建成功' + this.definitionId)
474
- })
475
- }
476
- },
477
- saveWf(xml, url, message) {
478
- return new Promise((resolve, reject) => {
479
- const param = this.packageSaveXmlParam(xml)
480
-
481
- this.$http.post(url, param).then((definition) => {
482
- this.definitionId = definition.id
483
- // console.log('更新成功' + this.definitionId)
484
- resolve()
485
- })
486
- })
487
- },
488
- packageSaveXmlParam(xml) {
489
- const param = {
490
- xml: xml,
491
- publishVersion: this.systemPublishVersion
492
- }
493
- if (this.definitionId) {
494
- // 表示已保存过,新流程定义的id
495
- param.id = this.definitionId
496
- } else {
497
- if (this.id) {
498
- param.id = this.id
499
- } else if (this.code) {
500
- param.code = this.code
501
- param.version = this.version
502
- }
503
- }
504
- return param
505
- },
506
- adminSave() {
507
- const xml = this.getProcessXml()
508
- // console.log(xml)
509
- // 保存流程定义xml
510
- if (this.code || this.id || this.definitionId) {
511
- // 表示修改
512
- const url = this.baseAPI + '/wf-editor/workflow-definitions/states'
513
- const param = {}
514
- if (this.definitionId) {
515
- // 表示已保存过,新流程定义的id
516
- param.id = this.definitionId
517
- } else {
518
- if (this.id) {
519
- param.id = this.id
520
- } else if (this.code) {
521
- param.code = this.code
522
- param.version = this.version
523
- }
524
- }
525
- this.$http.post(url, param).then((state) => {
526
- if (state === 'DRAFT') {
527
- // 如果是草稿状态直接保存
528
- this.saveWf(xml, this.baseAPI + '/wf-editor/workflow-definitions/updates').then(() => {
529
- // 表示草稿状态保存
530
- this.isShowEnable = true
531
- window.$store.commit('wfEditor/setIsCreateDefinition', 'false')
532
- this.$alert(this.$t('workflowEditorMessage.updateSuccessful'))
533
- })
534
- } else {
535
- // 如果是禁用或启用状态,让用户选择是增加版本还是更新版本
536
- this.isAdminSave = true
537
- }
538
- })
539
- } else {
540
- // 表示新建
541
- const param = {
542
- xml: xml,
543
- publishVersion: this.systemPublishVersion
544
- }
545
- this.$http.post(this.baseAPI + '/wf-editor/workflow-definitions', param).then((definition) => {
546
- // 表示草稿状态保存
547
- this.isShowEnable = true
548
- window.$store.commit('wfEditor/setIsCreateDefinition', 'false')
549
- this.definitionId = definition.id
550
- this.$alert(this.$t('workflowEditorMessage.savedSuccessfully'))
551
- // console.log('新建成功' + this.definitionId)
552
- })
553
- }
554
- },
555
- updateWfVersion() {
556
- const xml = this.getProcessXml()
557
- this.saveWf(xml, this.baseAPI + '/wf-editor/workflow-definitions/update-version').then(() => {
558
- window.$store.commit('wfEditor/setIsCreateDefinition', 'false')
559
- this.isAdminSave = false
560
- this.$alert(this.$t('workflowEditorMessage.updateVersionSuccessful'))
561
- })
562
- },
563
- addWfVersion() {
564
- const xml = this.getProcessXml()
565
- this.saveWf(xml, this.baseAPI + '/wf-editor/workflow-definitions/updates').then(() => {
566
- // 表示增加版本,所以流程定义状态是草稿状态
567
- this.isShowEnable = true
568
- window.$store.commit('wfEditor/setIsCreateDefinition', 'false')
569
- this.isAdminSave = false
570
- this.$alert(this.$t('workflowEditorMessage.addVersionSuccessful'))
571
- })
572
- },
573
- exportProcessFromClient() {
574
- const blob = new Blob([this.getProcessXml()], { type: 'text/xml;charset=utf-8' })
575
- FileSaver.saveAs(blob, this.process.attr.name + '.xml')
576
- },
577
- // 导出xml
578
- exportProcess() {
579
- const xml = this.getProcessXml()
580
- this.$http({
581
- method: 'post',
582
- url: this.baseAPI + '/wf-editor/save-as-xmls',
583
- data: {
584
- xmlContent: xml
585
- }
586
- }).then((response) => {
587
- this.download(response)
588
- console.log(this.$t('workflowEditorMessage.exportSucceeded'))
589
- })
590
- },
591
- // 下载文件
592
- download(data) {
593
- if (!data) {
594
- return
595
- }
596
- const url = window.URL.createObjectURL(new Blob([data]))
597
- const link = document.createElement('a')
598
- link.style.display = 'none'
599
- link.href = url
600
- link.setAttribute('download', 'myXml.xml')
601
-
602
- document.body.appendChild(link)
603
- link.click()
604
- },
605
- // 打开xml文件成功后
606
- uploadSuccess(response, file, fileList) {
607
- const xml = response
608
- // console.log('xml=', xml)
609
- // 打开或新建流程图时先清空画布,开发过程中代码热更新的时候可以避免节点重复
610
- this.clearCanvas()
611
- this.initProcessByXml(xml)
612
- this.$refs.upload.clearFiles()
613
- },
614
- getCurrentPosition(event) {
615
- if (this.componentToDraw) {
616
- const offset = this.$refs.wfEditor.getBoundingClientRect()
617
-
618
- this.currentPosition = {
619
- x: event.clientX - offset.x - 22,
620
- y: event.clientY - offset.y - 22
621
- }
622
- }
623
- },
624
- startDrag(event) {
625
- this.getCurrentPosition(event)
626
- },
627
- drag(event) {
628
- this.getCurrentPosition(event)
629
- },
630
- endDrag() {
631
- if (this.componentToDraw) {
632
- this.setComponentToDraw('')
633
- }
634
- },
635
-
636
- addTache(event) {
637
- if (this.componentToDraw) {
638
- const positionInSVG = getMousePosition(event)
639
- const ref = processTemplate['new' + this.componentToDraw]()
640
- // 组件类型转换为首字母小写形式
641
- ref.attr.id =
642
- this.componentToDraw.charAt(0).toLowerCase() + this.componentToDraw.substring(1) + '_' + this.count
643
- const tache = {
644
- // 默认id是组件类型加上下划线和数字序号,每次打开流程图的时候都需要动态计算最大的序号,然后加1作为count的的初始值
645
- id: ref.attr.id,
646
- name: ref.attr.name,
647
- x: positionInSVG.x - this.componentInfo.width / 2,
648
- y: positionInSVG.y - this.componentInfo.height / 2,
649
- width: this.componentInfo.width,
650
- height: this.componentInfo.height,
651
- type: this.componentToDraw,
652
- isSelected: false
653
- }
654
- tache.ref = ref
655
- this.taches.push(tache)
656
- this.count++
657
- }
658
- },
659
- copyTache() {
660
- const sourceTache = this.selectedTaches && this.selectedTaches.length > 0 ? this.selectedTaches[0] : null
661
- if (!sourceTache) {
662
- return
663
- }
664
- const tache = JSON.parse(JSON.stringify(sourceTache))
665
- const tacheType = tache.type
666
- const ref = tache.ref
667
- // 组件类型转换为首字母小写形式
668
- ref.attr.id = tacheType.charAt(0).toLowerCase() + tacheType.substring(1) + '_' + this.count
669
- ref.attr.name = sourceTache.name + '_copy'
670
- // 默认id是组件类型加上下划线和数字序号,每次打开流程图的时候都需要动态计算最大的序号,然后加1作为count的的初始值
671
- tache.id = ref.attr.id
672
- tache.name = ref.attr.name
673
- tache.x = sourceTache.x + 20 // 偏移20个像素
674
- tache.y = sourceTache.y + 20
675
- tache.isSelected = false
676
- tache.ref = ref
677
- this.taches.push(tache)
678
- this.count++
679
- // 还原拷贝的状态位
680
- this.setSourceComponentForCopy('')
681
- },
682
- clearStatus() {
683
- if (this.componentToDraw) {
684
- this.setComponentToDraw('')
685
- }
686
- },
687
- getMaxCount() {
688
- let max = 0
689
- this.taches.map((item) => {
690
- // 自动生成的id以下划线加数字编号结尾
691
- let index = item.id.substring(item.id.lastIndexOf('_') + 1)
692
- index = +index
693
- if (max < index) {
694
- max = index
695
- }
696
- })
697
- return max
698
- },
699
- selectProcessFile() {
700
- this.$refs.processFile.click()
701
- },
702
- openXmlFromClient() {
703
- if (this.$refs.processFile.value === '') return
704
- const file = this.$refs.processFile.files[0]
705
- const reader = new FileReader()
706
- // 本地直接读取文件
707
- reader.readAsText(file)
708
- const vm = this
709
- reader.onload = function () {
710
- // 打开或新建流程图时先清空画布,开发过程中代码热更新的时候可以避免节点重复
711
- vm.clearCanvas()
712
- vm.initProcessByXml(reader.result)
713
- vm.$refs.processFile.value = ''
714
- }
715
- },
716
- // 启用流程定义
717
- enableWf() {
718
- if (this.definitionId) {
719
- this.$http.put(this.baseAPI + '/wf-editor/workflow-editors/' + this.definitionId + '/states').then(() => {
720
- this.getWorkflowDefVersionList()
721
- this.isShowEnable = false
722
- this.$alert(this.$t('workflowEditorMessage.enabledSuccessfully'))
723
- })
724
- }
725
- },
726
- // 检查并更新页面编码
727
- checkPageCode() {
728
- if (this.pageCode) {
729
- if (this.process.properties) {
730
- if (this.process.properties.parameterSettings && this.process.properties.parameterSettings.doTask) {
731
- const url = this.process.properties.parameterSettings.doTask.url
732
- if (url && url.startsWith('page:')) {
733
- const existingPageCode = url.substring(5)
734
- if (existingPageCode !== this.pageCode) {
735
- this.process.properties.parameterSettings.doTask.url = 'page:' + this.pageCode
736
- }
737
- }
738
- }
739
- }
740
- }
741
- }
742
- }
743
- }
744
- </script>
745
-
746
- <style lang="scss" scoped>
747
- $toolboxWidth: 150px;
748
- $buttonAreaHeight: 50px;
749
- $tabsHeaderHeight: 41px;
750
- .button-area {
751
- padding: 5px 0 5px 5px;
752
- height: $buttonAreaHeight;
753
- background-color: #ffffff;
754
- }
755
- .el-row {
756
- border: 1px solid #f1f1f1;
757
- border-radius: 5px;
758
- }
759
- .el-col {
760
- padding-left: 5px;
761
- }
762
- .main {
763
- position: relative;
764
- display: flex;
765
- height: calc(100% - #{$buttonAreaHeight});
766
- width: 100%;
767
- }
768
- .canvas-container {
769
- position: relative;
770
- // display:flex;
771
- height: calc(100% - #{$buttonAreaHeight});
772
- width: 100%;
773
- }
774
- .toolbox {
775
- width: $toolboxWidth;
776
- overflow-y: auto;
777
- height: 100%;
778
- // border:1px solid black;
779
- background: #f7f7f7;
780
- padding: 10px;
781
- // min-height: 500px;
782
- text-align: center;
783
- flex: none;
784
- // min-width: 140px;
785
- // max-width:180px;
786
- }
787
- section {
788
- overflow: hidden;
789
- flex: 1 1 auto;
790
- height: 100%;
791
- padding: 0;
792
- // min-height: 500px;
793
- }
794
- .tabs {
795
- height: 100%;
796
- width: 100%;
797
- }
798
-
799
- .tabBox {
800
- padding: 20px;
801
- }
802
-
803
- .tab-pane {
804
- height: 100%;
805
- width: 100%;
806
- }
807
- // 在scss中需要使用/deep/这个别名来代替 '>>>'
808
- .tabs :deep(.el-tabs__content) {
809
- //height: calc(100% - #{$tabsHeaderHeight});
810
- height: calc(100vh - 138px);
811
- width: 100%;
812
- }
813
-
814
- .canvas,
815
- .xml {
816
- overflow: auto;
817
- height: 100%;
818
- width: 100%;
819
- // border:1px solid red;
820
- // background: #ffffff;
821
- padding: 0;
822
- min-height: 500px;
823
- }
824
- pre {
825
- margin: 0;
826
- font-size: 16px;
827
- }
828
- .component-icon {
829
- position: absolute;
830
- pointer-events: none;
831
- // border: 1px solid red;
832
- }
833
- .canvas :deep(.draggable) {
834
- cursor: move;
835
- }
836
-
837
- :deep(.el-tabs__header .el-tabs__item.is-active) {
838
- background-image: url('./assets/tab-select.png') !important;
839
- background-size: 100% 100%;
840
- min-width: 100px;
841
- text-align: center;
842
- }
843
-
844
- :deep(.el-tabs__header .el-tabs__item) {
845
- background-image: url('./assets/tab-selectWhite.png') !important;
846
- background-size: 100% 100%;
847
- min-width: 100px;
848
- text-align: center;
849
- }
850
-
851
- /* 去除table选中下划线 */
852
- :deep(.el-tabs__active-bar) {
853
- display: none;
854
- }
855
-
856
- :deep(.el-tabs__item) {
857
- padding: 0;
858
- }
859
-
860
- /* 去掉tab横线 */
861
- :deep(.el-tabs__nav-wrap::after) {
862
- width: 0;
863
- }
864
-
865
- /* 去掉卡片和tab表头的距离 */
866
- :deep(.el-tabs__header) {
867
- margin: 0;
868
- }
869
- </style>