workflow-editor 0.0.81-up-tmp11 → 0.0.81-up-tmp15

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 (436) hide show
  1. package/dist/index.full.min.js +3504 -0
  2. package/dist/style.css +526 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  4. package/es/index.mjs +17 -0
  5. package/es/plugins/formValidatorUtil.mjs +206 -0
  6. package/es/plugins/index.mjs +7 -0
  7. package/es/src/i18n/i18n.mjs +7 -0
  8. package/es/src/i18n/langs/cn.mjs +4 -0
  9. package/es/src/i18n/langs/en.mjs +4 -0
  10. package/es/style.css +525 -0
  11. package/es/vite.svg +1 -0
  12. package/es/workflow-editor/index.mjs +10 -0
  13. package/es/workflow-editor/src/api.mjs +6 -0
  14. package/es/workflow-editor/src/assets/wf-editor-icons.mjs +43 -0
  15. package/es/workflow-editor/src/json-object-templates/auto-task.mjs +7 -0
  16. package/es/workflow-editor/src/json-object-templates/copy-task.mjs +7 -0
  17. package/es/workflow-editor/src/json-object-templates/decision.mjs +7 -0
  18. package/es/workflow-editor/src/json-object-templates/end.mjs +7 -0
  19. package/es/workflow-editor/src/json-object-templates/fork.mjs +7 -0
  20. package/es/workflow-editor/src/json-object-templates/human-decision.mjs +7 -0
  21. package/es/workflow-editor/src/json-object-templates/human-task.mjs +7 -0
  22. package/es/workflow-editor/src/json-object-templates/join.mjs +7 -0
  23. package/es/workflow-editor/src/json-object-templates/process.mjs +9 -0
  24. package/es/workflow-editor/src/json-object-templates/start.mjs +7 -0
  25. package/es/workflow-editor/src/json-object-templates/subprocess.mjs +7 -0
  26. package/es/workflow-editor/src/json-object-templates/transition.mjs +6 -0
  27. package/es/workflow-editor/src/main/admin-save-dialog.vue.mjs +13 -0
  28. package/es/workflow-editor/src/main/canvas.vue.mjs +130 -0
  29. package/es/workflow-editor/src/main/canvas.vue2.mjs +4 -0
  30. package/es/workflow-editor/src/main/context-menu.vue.mjs +33 -0
  31. package/es/workflow-editor/src/main/context-menu.vue2.mjs +4 -0
  32. package/es/workflow-editor/src/main/icon-svg.vue.mjs +12 -0
  33. package/es/workflow-editor/src/main/icon-svg.vue2.mjs +4 -0
  34. package/es/workflow-editor/src/main/selection-region.vue.mjs +17 -0
  35. package/es/workflow-editor/src/main/selection-region.vue2.mjs +4 -0
  36. package/es/workflow-editor/src/main/tache-history-tooltip.vue.mjs +10 -0
  37. package/es/workflow-editor/src/main/tache-history-tooltip.vue2.mjs +4 -0
  38. package/es/workflow-editor/src/main/tache-subprocess-history-dialog.vue.mjs +11 -0
  39. package/es/workflow-editor/src/main/tache-subprocess-history-dialog.vue2.mjs +4 -0
  40. package/es/workflow-editor/src/main/toolbox.vue.mjs +16 -0
  41. package/es/workflow-editor/src/main/toolbox.vue2.mjs +4 -0
  42. package/es/workflow-editor/src/main/wf-history-canvas.vue.mjs +86 -0
  43. package/es/workflow-editor/src/main/wf-history-canvas.vue2.mjs +4 -0
  44. package/es/workflow-editor/src/process-service.mjs +21 -0
  45. package/es/workflow-editor/src/properties-editors/auto-task/basic-properties.vue.mjs +25 -0
  46. package/es/workflow-editor/src/properties-editors/auto-task/basic-properties.vue2.mjs +4 -0
  47. package/es/workflow-editor/src/properties-editors/auto-task.vue.mjs +22 -0
  48. package/es/workflow-editor/src/properties-editors/auto-task.vue2.mjs +4 -0
  49. package/es/workflow-editor/src/properties-editors/common/additional-condition-utils.mjs +125 -0
  50. package/es/workflow-editor/src/properties-editors/common/additional-condition.vue.mjs +60 -0
  51. package/es/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.mjs +5 -0
  52. package/es/workflow-editor/src/properties-editors/common/auto-filled-fields.vue.mjs +72 -0
  53. package/es/workflow-editor/src/properties-editors/common/common-notice-tool.vue.mjs +18 -0
  54. package/es/workflow-editor/src/properties-editors/common/common-user-condition.vue.mjs +55 -0
  55. package/es/workflow-editor/src/properties-editors/common/form-fields-utils.mjs +14 -0
  56. package/es/workflow-editor/src/properties-editors/common/form-fields.vue.mjs +20 -0
  57. package/es/workflow-editor/src/properties-editors/common/form-fields.vue2.mjs +4 -0
  58. package/es/workflow-editor/src/properties-editors/common/i18n-input.vue.mjs +25 -0
  59. package/es/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue.mjs +36 -0
  60. package/es/workflow-editor/src/properties-editors/common/notice-reminder.vue.mjs +27 -0
  61. package/es/workflow-editor/src/properties-editors/common/notice-reminder.vue2.mjs +4 -0
  62. package/es/workflow-editor/src/properties-editors/common/notice.vue.mjs +31 -0
  63. package/es/workflow-editor/src/properties-editors/common/reminder.vue.mjs +36 -0
  64. package/es/workflow-editor/src/properties-editors/common/reminder.vue2.mjs +4 -0
  65. package/es/workflow-editor/src/properties-editors/common/select-mail-template.vue.mjs +20 -0
  66. package/es/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue.mjs +95 -0
  67. package/es/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue2.mjs +4 -0
  68. package/es/workflow-editor/src/properties-editors/common/system-role-tree.vue.mjs +16 -0
  69. package/es/workflow-editor/src/properties-editors/common/system-role-tree.vue2.mjs +4 -0
  70. package/es/workflow-editor/src/properties-editors/common/task-title.vue.mjs +46 -0
  71. package/es/workflow-editor/src/properties-editors/common/task-title.vue2.mjs +4 -0
  72. package/es/workflow-editor/src/properties-editors/common/transactor-settings.vue.mjs +43 -0
  73. package/es/workflow-editor/src/properties-editors/common/user-selection.vue.mjs +116 -0
  74. package/es/workflow-editor/src/properties-editors/common/value-selection-dialog.vue.mjs +60 -0
  75. package/es/workflow-editor/src/properties-editors/common/value-selection-dialog.vue2.mjs +4 -0
  76. package/es/workflow-editor/src/properties-editors/common/variables.vue.mjs +41 -0
  77. package/es/workflow-editor/src/properties-editors/copy-task/basic-properties.vue.mjs +25 -0
  78. package/es/workflow-editor/src/properties-editors/copy-task/basic-properties.vue2.mjs +4 -0
  79. package/es/workflow-editor/src/properties-editors/copy-task/permission-settings.vue.mjs +30 -0
  80. package/es/workflow-editor/src/properties-editors/copy-task/permission-settings.vue2.mjs +4 -0
  81. package/es/workflow-editor/src/properties-editors/copy-task.vue.mjs +26 -0
  82. package/es/workflow-editor/src/properties-editors/copy-task.vue2.mjs +4 -0
  83. package/es/workflow-editor/src/properties-editors/decision.vue.mjs +24 -0
  84. package/es/workflow-editor/src/properties-editors/fork.vue.mjs +21 -0
  85. package/es/workflow-editor/src/properties-editors/human-decision.vue.mjs +15 -0
  86. package/es/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue.mjs +16 -0
  87. package/es/workflow-editor/src/properties-editors/human-task/basic-properties.vue.mjs +38 -0
  88. package/es/workflow-editor/src/properties-editors/human-task/basic-properties.vue2.mjs +4 -0
  89. package/es/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.mjs +84 -0
  90. package/es/workflow-editor/src/properties-editors/human-task/custom-actions.vue.mjs +62 -0
  91. package/es/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue.mjs +80 -0
  92. package/es/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue.mjs +86 -0
  93. package/es/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue.mjs +43 -0
  94. package/es/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue2.mjs +4 -0
  95. package/es/workflow-editor/src/properties-editors/human-task/editable-fields.vue.mjs +67 -0
  96. package/es/workflow-editor/src/properties-editors/human-task/events.vue.mjs +18 -0
  97. package/es/workflow-editor/src/properties-editors/human-task/permission-settings.vue.mjs +33 -0
  98. package/es/workflow-editor/src/properties-editors/human-task/permission-settings.vue2.mjs +4 -0
  99. package/es/workflow-editor/src/properties-editors/human-task/selection-conditions.vue.mjs +56 -0
  100. package/es/workflow-editor/src/properties-editors/human-task.vue.mjs +28 -0
  101. package/es/workflow-editor/src/properties-editors/human-task.vue2.mjs +4 -0
  102. package/es/workflow-editor/src/properties-editors/join.vue.mjs +15 -0
  103. package/es/workflow-editor/src/properties-editors/process/basic-properties.vue.mjs +88 -0
  104. package/es/workflow-editor/src/properties-editors/process/events.vue.mjs +21 -0
  105. package/es/workflow-editor/src/properties-editors/process/notice-settings.vue.mjs +25 -0
  106. package/es/workflow-editor/src/properties-editors/process/parameter-settings.vue.mjs +17 -0
  107. package/es/workflow-editor/src/properties-editors/process/permission-settings.vue.mjs +10 -0
  108. package/es/workflow-editor/src/properties-editors/process/selectPage.vue.mjs +28 -0
  109. package/es/workflow-editor/src/properties-editors/process.vue.mjs +34 -0
  110. package/es/workflow-editor/src/properties-editors/subprocess/basic-properties.vue.mjs +64 -0
  111. package/es/workflow-editor/src/properties-editors/subprocess/events.vue.mjs +9 -0
  112. package/es/workflow-editor/src/properties-editors/subprocess/field-mappings.vue.mjs +55 -0
  113. package/es/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue.mjs +20 -0
  114. package/es/workflow-editor/src/properties-editors/subprocess.vue.mjs +22 -0
  115. package/es/workflow-editor/src/properties-editors/subprocess.vue2.mjs +4 -0
  116. package/es/workflow-editor/src/properties-editors/transition/basic-properties.vue.mjs +14 -0
  117. package/es/workflow-editor/src/properties-editors/transition.vue.mjs +17 -0
  118. package/es/workflow-editor/src/properties-editors/transition.vue2.mjs +4 -0
  119. package/es/workflow-editor/src/properties-editors/user-condition.mjs +49 -0
  120. package/es/workflow-editor/src/store/getters.mjs +4 -0
  121. package/es/workflow-editor/src/store/workflow-editor.mjs +73 -0
  122. package/es/workflow-editor/src/taches/auto-task.vue.mjs +25 -0
  123. package/es/workflow-editor/src/taches/common-methods.mjs +13 -0
  124. package/es/workflow-editor/src/taches/copy-task.vue.mjs +25 -0
  125. package/es/workflow-editor/src/taches/custom-task.vue.mjs +16 -0
  126. package/es/workflow-editor/src/taches/decision.vue.mjs +25 -0
  127. package/es/workflow-editor/src/taches/decision.vue2.mjs +4 -0
  128. package/es/workflow-editor/src/taches/end.vue.mjs +14 -0
  129. package/es/workflow-editor/src/taches/end.vue2.mjs +4 -0
  130. package/es/workflow-editor/src/taches/fork.vue.mjs +25 -0
  131. package/es/workflow-editor/src/taches/fork.vue2.mjs +4 -0
  132. package/es/workflow-editor/src/taches/human-decision.vue.mjs +25 -0
  133. package/es/workflow-editor/src/taches/human-decision.vue2.mjs +4 -0
  134. package/es/workflow-editor/src/taches/human-task.vue.mjs +25 -0
  135. package/es/workflow-editor/src/taches/join.vue.mjs +16 -0
  136. package/es/workflow-editor/src/taches/join.vue2.mjs +4 -0
  137. package/es/workflow-editor/src/taches/joint.vue.mjs +54 -0
  138. package/es/workflow-editor/src/taches/joint.vue2.mjs +4 -0
  139. package/es/workflow-editor/src/taches/start.vue.mjs +14 -0
  140. package/es/workflow-editor/src/taches/start.vue2.mjs +4 -0
  141. package/es/workflow-editor/src/taches/subprocess.vue.mjs +25 -0
  142. package/es/workflow-editor/src/taches/tache-resizer.vue.mjs +30 -0
  143. package/es/workflow-editor/src/taches/tache-resizer.vue2.mjs +4 -0
  144. package/es/workflow-editor/src/transitions/broken-line.vue.mjs +32 -0
  145. package/es/workflow-editor/src/transitions/broken-line.vue2.mjs +4 -0
  146. package/es/workflow-editor/src/transitions/curve-line.vue.mjs +33 -0
  147. package/es/workflow-editor/src/transitions/curve-line.vue2.mjs +4 -0
  148. package/es/workflow-editor/src/transitions/straight-line.vue.mjs +13 -0
  149. package/es/workflow-editor/src/transitions/transition.vue.mjs +70 -0
  150. package/es/workflow-editor/src/transitions/transition.vue2.mjs +4 -0
  151. package/es/workflow-editor/src/transitions/virtual-transition.vue.mjs +17 -0
  152. package/es/workflow-editor/src/transitions/virtual-transition.vue2.mjs +4 -0
  153. package/es/workflow-editor/src/util.mjs +180 -0
  154. package/es/workflow-editor/src/workflow-editor.vue.mjs +205 -0
  155. package/es/workflow-editor/src/workflow-editor.vue2.mjs +4 -0
  156. package/es/workflow-editor/src/workflow-history.vue.mjs +35 -0
  157. package/es/workflow-editor/src/workflow-history.vue2.mjs +4 -0
  158. package/lib/_virtual/_plugin-vue_export-helper.cjs +7 -0
  159. package/lib/index.cjs +8 -0
  160. package/lib/plugins/formValidatorUtil.cjs +203 -0
  161. package/lib/plugins/index.cjs +5 -0
  162. package/lib/src/i18n/i18n.cjs +3 -0
  163. package/lib/src/i18n/langs/cn.cjs +2 -0
  164. package/lib/src/i18n/langs/en.cjs +2 -0
  165. package/lib/style.css +525 -0
  166. package/lib/vite.svg +1 -0
  167. package/lib/workflow-editor/index.cjs +7 -0
  168. package/lib/workflow-editor/src/api.cjs +5 -0
  169. package/lib/workflow-editor/src/assets/wf-editor-icons.cjs +44 -0
  170. package/lib/workflow-editor/src/json-object-templates/auto-task.cjs +5 -0
  171. package/lib/workflow-editor/src/json-object-templates/copy-task.cjs +5 -0
  172. package/lib/workflow-editor/src/json-object-templates/decision.cjs +5 -0
  173. package/lib/workflow-editor/src/json-object-templates/end.cjs +5 -0
  174. package/lib/workflow-editor/src/json-object-templates/fork.cjs +5 -0
  175. package/lib/workflow-editor/src/json-object-templates/human-decision.cjs +5 -0
  176. package/lib/workflow-editor/src/json-object-templates/human-task.cjs +5 -0
  177. package/lib/workflow-editor/src/json-object-templates/join.cjs +5 -0
  178. package/lib/workflow-editor/src/json-object-templates/process.cjs +6 -0
  179. package/lib/workflow-editor/src/json-object-templates/start.cjs +5 -0
  180. package/lib/workflow-editor/src/json-object-templates/subprocess.cjs +5 -0
  181. package/lib/workflow-editor/src/json-object-templates/transition.cjs +4 -0
  182. package/lib/workflow-editor/src/main/admin-save-dialog.vue.cjs +11 -0
  183. package/lib/workflow-editor/src/main/canvas.vue.cjs +101 -0
  184. package/lib/workflow-editor/src/main/canvas.vue2.cjs +2 -0
  185. package/lib/workflow-editor/src/main/context-menu.vue.cjs +29 -0
  186. package/lib/workflow-editor/src/main/context-menu.vue2.cjs +2 -0
  187. package/lib/workflow-editor/src/main/icon-svg.vue.cjs +10 -0
  188. package/lib/workflow-editor/src/main/icon-svg.vue2.cjs +2 -0
  189. package/lib/workflow-editor/src/main/selection-region.vue.cjs +13 -0
  190. package/lib/workflow-editor/src/main/selection-region.vue2.cjs +2 -0
  191. package/lib/workflow-editor/src/main/tache-history-tooltip.vue.cjs +8 -0
  192. package/lib/workflow-editor/src/main/tache-history-tooltip.vue2.cjs +2 -0
  193. package/lib/workflow-editor/src/main/tache-subprocess-history-dialog.vue.cjs +9 -0
  194. package/lib/workflow-editor/src/main/tache-subprocess-history-dialog.vue2.cjs +2 -0
  195. package/lib/workflow-editor/src/main/toolbox.vue.cjs +11 -0
  196. package/lib/workflow-editor/src/main/toolbox.vue2.cjs +2 -0
  197. package/lib/workflow-editor/src/main/wf-history-canvas.vue.cjs +67 -0
  198. package/lib/workflow-editor/src/main/wf-history-canvas.vue2.cjs +2 -0
  199. package/lib/workflow-editor/src/process-service.cjs +20 -0
  200. package/lib/workflow-editor/src/properties-editors/auto-task/basic-properties.vue.cjs +20 -0
  201. package/lib/workflow-editor/src/properties-editors/auto-task/basic-properties.vue2.cjs +2 -0
  202. package/lib/workflow-editor/src/properties-editors/auto-task.vue.cjs +19 -0
  203. package/lib/workflow-editor/src/properties-editors/auto-task.vue2.cjs +2 -0
  204. package/lib/workflow-editor/src/properties-editors/common/additional-condition-utils.cjs +94 -0
  205. package/lib/workflow-editor/src/properties-editors/common/additional-condition.vue.cjs +54 -0
  206. package/lib/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.cjs +4 -0
  207. package/lib/workflow-editor/src/properties-editors/common/auto-filled-fields.vue.cjs +67 -0
  208. package/lib/workflow-editor/src/properties-editors/common/common-notice-tool.vue.cjs +16 -0
  209. package/lib/workflow-editor/src/properties-editors/common/common-user-condition.vue.cjs +50 -0
  210. package/lib/workflow-editor/src/properties-editors/common/form-fields-utils.cjs +11 -0
  211. package/lib/workflow-editor/src/properties-editors/common/form-fields.vue.cjs +17 -0
  212. package/lib/workflow-editor/src/properties-editors/common/form-fields.vue2.cjs +2 -0
  213. package/lib/workflow-editor/src/properties-editors/common/i18n-input.vue.cjs +20 -0
  214. package/lib/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue.cjs +31 -0
  215. package/lib/workflow-editor/src/properties-editors/common/notice-reminder.vue.cjs +22 -0
  216. package/lib/workflow-editor/src/properties-editors/common/notice-reminder.vue2.cjs +2 -0
  217. package/lib/workflow-editor/src/properties-editors/common/notice.vue.cjs +25 -0
  218. package/lib/workflow-editor/src/properties-editors/common/reminder.vue.cjs +31 -0
  219. package/lib/workflow-editor/src/properties-editors/common/reminder.vue2.cjs +2 -0
  220. package/lib/workflow-editor/src/properties-editors/common/select-mail-template.vue.cjs +17 -0
  221. package/lib/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue.cjs +93 -0
  222. package/lib/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue2.cjs +2 -0
  223. package/lib/workflow-editor/src/properties-editors/common/system-role-tree.vue.cjs +13 -0
  224. package/lib/workflow-editor/src/properties-editors/common/system-role-tree.vue2.cjs +2 -0
  225. package/lib/workflow-editor/src/properties-editors/common/task-title.vue.cjs +42 -0
  226. package/lib/workflow-editor/src/properties-editors/common/task-title.vue2.cjs +2 -0
  227. package/lib/workflow-editor/src/properties-editors/common/transactor-settings.vue.cjs +37 -0
  228. package/lib/workflow-editor/src/properties-editors/common/user-selection.vue.cjs +110 -0
  229. package/lib/workflow-editor/src/properties-editors/common/value-selection-dialog.vue.cjs +55 -0
  230. package/lib/workflow-editor/src/properties-editors/common/value-selection-dialog.vue2.cjs +2 -0
  231. package/lib/workflow-editor/src/properties-editors/common/variables.vue.cjs +39 -0
  232. package/lib/workflow-editor/src/properties-editors/copy-task/basic-properties.vue.cjs +20 -0
  233. package/lib/workflow-editor/src/properties-editors/copy-task/basic-properties.vue2.cjs +2 -0
  234. package/lib/workflow-editor/src/properties-editors/copy-task/permission-settings.vue.cjs +26 -0
  235. package/lib/workflow-editor/src/properties-editors/copy-task/permission-settings.vue2.cjs +2 -0
  236. package/lib/workflow-editor/src/properties-editors/copy-task.vue.cjs +19 -0
  237. package/lib/workflow-editor/src/properties-editors/copy-task.vue2.cjs +2 -0
  238. package/lib/workflow-editor/src/properties-editors/decision.vue.cjs +20 -0
  239. package/lib/workflow-editor/src/properties-editors/fork.vue.cjs +18 -0
  240. package/lib/workflow-editor/src/properties-editors/human-decision.vue.cjs +13 -0
  241. package/lib/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue.cjs +13 -0
  242. package/lib/workflow-editor/src/properties-editors/human-task/basic-properties.vue.cjs +31 -0
  243. package/lib/workflow-editor/src/properties-editors/human-task/basic-properties.vue2.cjs +2 -0
  244. package/lib/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.cjs +82 -0
  245. package/lib/workflow-editor/src/properties-editors/human-task/custom-actions.vue.cjs +56 -0
  246. package/lib/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue.cjs +75 -0
  247. package/lib/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue.cjs +80 -0
  248. package/lib/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue.cjs +39 -0
  249. package/lib/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue2.cjs +2 -0
  250. package/lib/workflow-editor/src/properties-editors/human-task/editable-fields.vue.cjs +60 -0
  251. package/lib/workflow-editor/src/properties-editors/human-task/events.vue.cjs +15 -0
  252. package/lib/workflow-editor/src/properties-editors/human-task/permission-settings.vue.cjs +26 -0
  253. package/lib/workflow-editor/src/properties-editors/human-task/permission-settings.vue2.cjs +2 -0
  254. package/lib/workflow-editor/src/properties-editors/human-task/selection-conditions.vue.cjs +49 -0
  255. package/lib/workflow-editor/src/properties-editors/human-task.vue.cjs +19 -0
  256. package/lib/workflow-editor/src/properties-editors/human-task.vue2.cjs +2 -0
  257. package/lib/workflow-editor/src/properties-editors/join.vue.cjs +13 -0
  258. package/lib/workflow-editor/src/properties-editors/process/basic-properties.vue.cjs +81 -0
  259. package/lib/workflow-editor/src/properties-editors/process/events.vue.cjs +18 -0
  260. package/lib/workflow-editor/src/properties-editors/process/notice-settings.vue.cjs +21 -0
  261. package/lib/workflow-editor/src/properties-editors/process/parameter-settings.vue.cjs +13 -0
  262. package/lib/workflow-editor/src/properties-editors/process/permission-settings.vue.cjs +7 -0
  263. package/lib/workflow-editor/src/properties-editors/process/selectPage.vue.cjs +23 -0
  264. package/lib/workflow-editor/src/properties-editors/process.vue.cjs +24 -0
  265. package/lib/workflow-editor/src/properties-editors/subprocess/basic-properties.vue.cjs +57 -0
  266. package/lib/workflow-editor/src/properties-editors/subprocess/events.vue.cjs +7 -0
  267. package/lib/workflow-editor/src/properties-editors/subprocess/field-mappings.vue.cjs +50 -0
  268. package/lib/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue.cjs +16 -0
  269. package/lib/workflow-editor/src/properties-editors/subprocess.vue.cjs +17 -0
  270. package/lib/workflow-editor/src/properties-editors/subprocess.vue2.cjs +2 -0
  271. package/lib/workflow-editor/src/properties-editors/transition/basic-properties.vue.cjs +10 -0
  272. package/lib/workflow-editor/src/properties-editors/transition.vue.cjs +12 -0
  273. package/lib/workflow-editor/src/properties-editors/transition.vue2.cjs +2 -0
  274. package/lib/workflow-editor/src/properties-editors/user-condition.cjs +33 -0
  275. package/lib/workflow-editor/src/store/getters.cjs +2 -0
  276. package/lib/workflow-editor/src/store/workflow-editor.cjs +71 -0
  277. package/lib/workflow-editor/src/taches/auto-task.vue.cjs +17 -0
  278. package/lib/workflow-editor/src/taches/common-methods.cjs +11 -0
  279. package/lib/workflow-editor/src/taches/copy-task.vue.cjs +17 -0
  280. package/lib/workflow-editor/src/taches/custom-task.vue.cjs +9 -0
  281. package/lib/workflow-editor/src/taches/decision.vue.cjs +19 -0
  282. package/lib/workflow-editor/src/taches/decision.vue2.cjs +2 -0
  283. package/lib/workflow-editor/src/taches/end.vue.cjs +9 -0
  284. package/lib/workflow-editor/src/taches/end.vue2.cjs +2 -0
  285. package/lib/workflow-editor/src/taches/fork.vue.cjs +19 -0
  286. package/lib/workflow-editor/src/taches/fork.vue2.cjs +2 -0
  287. package/lib/workflow-editor/src/taches/human-decision.vue.cjs +19 -0
  288. package/lib/workflow-editor/src/taches/human-decision.vue2.cjs +2 -0
  289. package/lib/workflow-editor/src/taches/human-task.vue.cjs +17 -0
  290. package/lib/workflow-editor/src/taches/join.vue.cjs +11 -0
  291. package/lib/workflow-editor/src/taches/join.vue2.cjs +2 -0
  292. package/lib/workflow-editor/src/taches/joint.vue.cjs +50 -0
  293. package/lib/workflow-editor/src/taches/joint.vue2.cjs +2 -0
  294. package/lib/workflow-editor/src/taches/start.vue.cjs +9 -0
  295. package/lib/workflow-editor/src/taches/start.vue2.cjs +2 -0
  296. package/lib/workflow-editor/src/taches/subprocess.vue.cjs +17 -0
  297. package/lib/workflow-editor/src/taches/tache-resizer.vue.cjs +27 -0
  298. package/lib/workflow-editor/src/taches/tache-resizer.vue2.cjs +2 -0
  299. package/lib/workflow-editor/src/transitions/broken-line.vue.cjs +28 -0
  300. package/lib/workflow-editor/src/transitions/broken-line.vue2.cjs +2 -0
  301. package/lib/workflow-editor/src/transitions/curve-line.vue.cjs +29 -0
  302. package/lib/workflow-editor/src/transitions/curve-line.vue2.cjs +2 -0
  303. package/lib/workflow-editor/src/transitions/straight-line.vue.cjs +9 -0
  304. package/lib/workflow-editor/src/transitions/transition.vue.cjs +63 -0
  305. package/lib/workflow-editor/src/transitions/transition.vue2.cjs +2 -0
  306. package/lib/workflow-editor/src/transitions/virtual-transition.vue.cjs +13 -0
  307. package/lib/workflow-editor/src/transitions/virtual-transition.vue2.cjs +2 -0
  308. package/lib/workflow-editor/src/util.cjs +139 -0
  309. package/lib/workflow-editor/src/workflow-editor.vue.cjs +191 -0
  310. package/lib/workflow-editor/src/workflow-editor.vue2.cjs +2 -0
  311. package/lib/workflow-editor/src/workflow-history.vue.cjs +28 -0
  312. package/lib/workflow-editor/src/workflow-history.vue2.cjs +2 -0
  313. package/package.json +7 -1
  314. package/.prettierrc.json +0 -9
  315. package/index.html +0 -13
  316. package/packages/index.js +0 -50
  317. package/packages/plugins/formValidatorUtil.js +0 -723
  318. package/packages/plugins/index.js +0 -8
  319. package/packages/workflow-editor/index.js +0 -14
  320. package/packages/workflow-editor/src/api.js +0 -7
  321. package/packages/workflow-editor/src/assets/tab-select.png +0 -0
  322. package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
  323. package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
  324. package/packages/workflow-editor/src/constant.js +0 -8
  325. package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
  326. package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
  327. package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
  328. package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
  329. package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
  330. package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
  331. package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
  332. package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
  333. package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
  334. package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
  335. package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
  336. package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
  337. package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
  338. package/packages/workflow-editor/src/main/canvas.vue +0 -493
  339. package/packages/workflow-editor/src/main/context-menu.vue +0 -147
  340. package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
  341. package/packages/workflow-editor/src/main/selection-region.vue +0 -66
  342. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
  343. package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
  344. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
  345. package/packages/workflow-editor/src/main/toolbox.vue +0 -60
  346. package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
  347. package/packages/workflow-editor/src/process-json.js +0 -624
  348. package/packages/workflow-editor/src/process-service.js +0 -68
  349. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
  350. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
  351. package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
  352. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -568
  353. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -320
  354. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
  355. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -268
  356. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
  357. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
  358. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
  359. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -117
  360. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -88
  361. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
  362. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -149
  363. package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
  364. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -272
  365. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
  366. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
  367. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
  368. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
  369. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -165
  370. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
  371. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
  372. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
  373. package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -139
  374. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
  375. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
  376. package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
  377. package/packages/workflow-editor/src/properties-editors/decision.vue +0 -95
  378. package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
  379. package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
  380. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
  381. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
  382. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
  383. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
  384. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
  385. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
  386. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
  387. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
  388. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
  389. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -224
  390. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
  391. package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -107
  392. package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
  393. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
  394. package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
  395. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
  396. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
  397. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
  398. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
  399. package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
  400. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
  401. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
  402. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
  403. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
  404. package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
  405. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
  406. package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
  407. package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
  408. package/packages/workflow-editor/src/store/getters.js +0 -33
  409. package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
  410. package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
  411. package/packages/workflow-editor/src/taches/common-methods.js +0 -21
  412. package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
  413. package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
  414. package/packages/workflow-editor/src/taches/decision.vue +0 -102
  415. package/packages/workflow-editor/src/taches/end.vue +0 -76
  416. package/packages/workflow-editor/src/taches/fork.vue +0 -102
  417. package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
  418. package/packages/workflow-editor/src/taches/human-task.vue +0 -113
  419. package/packages/workflow-editor/src/taches/join.vue +0 -91
  420. package/packages/workflow-editor/src/taches/joint.vue +0 -177
  421. package/packages/workflow-editor/src/taches/start.vue +0 -76
  422. package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
  423. package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
  424. package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
  425. package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
  426. package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
  427. package/packages/workflow-editor/src/transitions/transition.vue +0 -209
  428. package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
  429. package/packages/workflow-editor/src/util.js +0 -499
  430. package/packages/workflow-editor/src/workflow-editor.vue +0 -852
  431. package/packages/workflow-editor/src/workflow-history.vue +0 -153
  432. package/src/i18n/i18n.js +0 -16
  433. package/src/i18n/langs/cn.js +0 -521
  434. package/src/i18n/langs/en.js +0 -529
  435. package/vite.config.js +0 -103
  436. /package/{public → dist}/vite.svg +0 -0
@@ -1,499 +0,0 @@
1
-
2
- import { getLanguageWithLocale } from 'agilebuilder-ui'
3
- import i18n from '../../../src/i18n/i18n'
4
- import newAutoTask from './json-object-templates/auto-task'
5
- import newCopyTask from './json-object-templates/copy-task'
6
- import newDecision from './json-object-templates/decision'
7
- import newEnd from './json-object-templates/end'
8
- import newFork from './json-object-templates/fork'
9
- import newHumanDecision from './json-object-templates/human-decision'
10
- import newHumanTask from './json-object-templates/human-task'
11
- import newJoin from './json-object-templates/join'
12
- import newProcess from './json-object-templates/process'
13
- import newStart from './json-object-templates/start'
14
- import newSubprocess from './json-object-templates/subprocess'
15
- import newTransition from './json-object-templates/transition'
16
- function getStore() {
17
- return window.$store
18
- }
19
- function getI18n() {
20
- if (!window.$locale) {
21
- i18n.locale = 'cn'
22
- } else {
23
- i18n.locale = window.$locale
24
- }
25
- return i18n.global
26
- }
27
- // 组件的初始信息
28
- export function getComponentList() {
29
- return [
30
- {
31
- name: 'Start',
32
- label: getI18n().t('workflowEditor.task.start'),
33
- icon: 'start',
34
- type: 'primary',
35
- class:'',
36
- round: true,
37
- width: 48,
38
- height: 48,
39
- color: '#67C23A'
40
- }, {
41
- name: 'HumanTask',
42
- label: getI18n().t('workflowEditor.task.humanTask'),
43
- icon: 'human-task',
44
- type: '',
45
- class:'',
46
- round: true,
47
- width: 80,
48
- height: 40,
49
- color: '#000'
50
- }, {
51
- name: 'Decision',
52
- label: getI18n().t('workflowEditor.task.conditionJudgment'),
53
- icon: 'decision',
54
- type: '',
55
- class:'',
56
- round: true,
57
- width: 48,
58
- height: 48,
59
- color: '#999'
60
- },
61
- {
62
- name: 'Fork',
63
- label: getI18n().t('workflowEditor.task.branch'),
64
- icon: 'fork',
65
- type: '',
66
- class:'',
67
- round: true,
68
- width: 48,
69
- height: 48,
70
- color: '#999'
71
- },
72
- {
73
- name: 'Join',
74
- label: getI18n().t('workflowEditor.task.converge'),
75
- icon: 'join',
76
- type: '',
77
- class:'',
78
- round: true,
79
- width: 48,
80
- height: 48,
81
- color: '#999'
82
- },
83
- {
84
- name: 'Subprocess',
85
- label: getI18n().t('workflowEditor.task.subprocess'),
86
- icon: 'subprocess',
87
- type: 'warning',
88
- class:'',
89
- round: true,
90
- width: 80,
91
- height: 40,
92
- color: '#0777D4'
93
- },
94
- {
95
- name: 'HumanDecision',
96
- label: getI18n().t('workflowEditor.task.manualJudgment'),
97
- icon: 'human-decision',
98
- type: '',
99
- class:'',
100
- round: true,
101
- width: 48,
102
- height: 48,
103
- color: '#999'
104
- },
105
- {
106
- name: 'CopyTask',
107
- label: getI18n().t('workflowEditor.task.cCtask'),
108
- icon: 'copy-task',
109
- type: '',
110
- class:'',
111
- round: true,
112
- width: 80,
113
- height: 40,
114
- color: '#0777D4'
115
- },
116
- {
117
- name: 'AutoTask',
118
- label: getI18n().t('workflowEditor.task.autoTask'),
119
- icon: 'human-task',
120
- type: '',
121
- class:'',
122
- round: true,
123
- width: 80,
124
- height: 40,
125
- color: '#0777D4'
126
- },
127
- {
128
- name: 'End',
129
- label: getI18n().t('workflowEditor.task.end'),
130
- icon: 'end',
131
- type: 'danger',
132
- class:'workflow-end-button',
133
- round: true,
134
- width: 48,
135
- height: 48,
136
- color: '#F56C6C'
137
- }
138
- ]
139
- }
140
- function getComponentInfo(name) {
141
- const component = getComponentList().filter(item => {
142
- return item.name === name
143
- })
144
- if (component.length > 0) {
145
- return component[0]
146
- } else {
147
- return null
148
- }
149
- }
150
- // 根据环节id找到环节对象
151
- function getParent(parent) {
152
- const taches = getStore().getters['wfEditor/taches']
153
- const tache = taches.filter(tache => {
154
- return tache.id === parent
155
- })
156
- return tache[0]
157
- }
158
- function getJoint(parent, position) {
159
- // 如果parent只是一个名称的时候需要先找到环节对象
160
- if (typeof (parent) === 'string') {
161
- parent = getParent(parent)
162
- }
163
- switch (position) {
164
- case 'up':
165
- case 'top':
166
- return { position: 'up', x: parent.x + parent.width / 2, y: parent.y }
167
- case 'right':
168
- return { position: 'right', x: parent.x + parent.width, y: parent.y + parent.height / 2 }
169
- case 'down':
170
- case 'bottom':
171
- return { position: 'down', x: parent.x + parent.width / 2, y: parent.y + parent.height }
172
- case 'left':
173
- return { position: 'left', x: parent.x, y: parent.y + parent.height / 2 }
174
- default:
175
- return { position: '', x: parent.x, y: parent.y }
176
- }
177
- }
178
- // 根据鼠标的位置clientX,clientY算出对应的SVG中的坐标
179
- function getMousePosition(evt) {
180
- const CTM = document.getElementById('svg').getScreenCTM()
181
- return {
182
- x: (evt.clientX - CTM.e) / CTM.a,
183
- y: (evt.clientY - CTM.f) / CTM.d
184
- }
185
- }
186
- // 根据svg中鼠标按下的位置算出对应在html中的鼠标位置
187
- function getClientMousePosition() {
188
- const CTM = document.getElementById('svg').getScreenCTM()
189
- const mouseDownPosition = getStore().getters['wfEditor/mouseDownPosition']
190
- return {
191
- x: mouseDownPosition.x * CTM.a + CTM.e,
192
- y: mouseDownPosition.y * CTM.d + CTM.f
193
- }
194
- }
195
- function getMouseOffset(event, tache) {
196
- if (event.target.classList.contains('draggable')) {
197
- const offset = getMousePosition(event)
198
- offset.x -= tache.x
199
- offset.y -= tache.y
200
- return offset
201
- }
202
- }
203
- function getVirtualRegion(startPoint, endPoint) {
204
- if (!startPoint || !endPoint) {
205
- return {}
206
- }
207
- const { x: x1, y: y1 } = startPoint
208
- const { x: x2, y: y2 } = endPoint
209
- var area = {
210
- x: 0,
211
- y: 0,
212
- width: Math.abs(x2 - x1),
213
- height: Math.abs(y2 - y1)
214
- }
215
- if (x1 <= x2) {
216
- if (y1 <= y2) { // p2在p1的右下方
217
- area.x = x1
218
- area.y = y1
219
- } else { // p2在p1的右上方
220
- area.x = x1
221
- area.y = y2
222
- }
223
- } else {
224
- if (y1 >= y2) { // p2在p1的左上方
225
- area.x = x2
226
- area.y = y2
227
- } else {
228
- area.x = x2
229
- area.y = y1
230
- }
231
- }
232
- return area
233
- }
234
- // 根据选中的环节裁剪选择区域
235
- function getRealRegion(taches) {
236
- let minX, minY
237
- minX = minY = 10000
238
- let maxX, maxY
239
- maxX = maxY = 0
240
- for (const tache of taches) {
241
- if (minX > tache.x) {
242
- minX = tache.x
243
- }
244
- if (minY > tache.y) {
245
- minY = tache.y
246
- }
247
- if (maxX < (tache.x + tache.width)) {
248
- maxX = tache.x + tache.width
249
- }
250
- if (maxY < (tache.y + tache.height)) {
251
- maxY = tache.y + tache.height
252
- }
253
- }
254
- return {
255
- x: minX - 10,
256
- y: minY - 10,
257
- width: maxX - minX + 20,
258
- height: maxY - minY + 20
259
- }
260
- }
261
- function startDragTache(event, vm) {
262
- // 清除选中的环节或者流向
263
- clearAllSelectedComponents()
264
- // 清除选择区域
265
- vm.$parent.region = null
266
- // 不是显示流转历史的时候,需要选中当前环节
267
- if (!vm.$parent.showHistory) {
268
- vm.model.isSelected = true
269
- }
270
-
271
- getStore().getters['wfEditor/selectedTaches'].push(vm.model)
272
-
273
- const mouseDownPosition = getMousePosition(event)
274
- getStore().commit('wfEditor/setMouseDownPosition', mouseDownPosition)
275
- getStore().commit('wfEditor/setMovingTache', true)
276
- }
277
- function endDragTache() {
278
- getStore().commit('wfEditor/setMovingTache', false)
279
- getStore().commit('wfEditor/setMouseDownPosition', null)
280
- }
281
- function unselectTaches() {
282
- for (const tache of getStore().getters['wfEditor/selectedTaches']) {
283
- tache.isSelected = false
284
- }
285
- getStore().commit('wfEditor/setSelectedTaches', [])
286
- }
287
- /**
288
- * 包括选中的环节(可能有多个)和流向(0个或1个)
289
- */
290
- function clearAllSelectedComponents() {
291
- unselectTaches()
292
- if (getStore().getters['wfEditor/selectedTransition']) {
293
- getStore().getters['wfEditor/selectedTransition'].isSelected = false
294
- }
295
- getStore().commit('wfEditor/setSelectedTransition', null)
296
- }
297
-
298
- /**
299
- * 通过xml-js库生成的js对象包含_text属性,需要把这个属性去掉,把值复制给父属性
300
- * 如x:{_text:50}需要变成x:50
301
- * @param {包含_text属性的对象} obj
302
- */
303
- function removeTextProperty(obj) {
304
- const keys = Object.getOwnPropertyNames(obj)
305
- keys.forEach(function (key) {
306
- if (typeof obj[key] === 'object') {
307
- if (obj[key]._text !== undefined) {
308
- obj[key] = obj[key]._text
309
- return
310
- } else {
311
- if (Object.keys(obj[key]).length > 0) {
312
- removeTextProperty(obj[key])
313
- } else {
314
- // 如果是空对象就转换为字符串,js-xml库会把每个xml节点都转换为对象,对底层的空节点应该是字符串,其他类型应该给默认值,true,0等
315
- // variables和events节点不是最底层节点,有时候也会为空,不能处理他们
316
- const specialNodes = ['variables', 'events', 'autoFilledFields']
317
- if (specialNodes.indexOf(key) < 0) {
318
- obj[key] = ''
319
- }
320
- }
321
- }
322
- }
323
- })
324
- }
325
- function generateTaches(type, arr) {
326
- if (!arr) arr = []
327
- if (!Array.isArray(arr)) {
328
- arr = [arr]
329
- }
330
- const taches = getStore().getters['wfEditor/taches']
331
- for (const task of arr) {
332
- const tache = {
333
- id: task.attr.id,
334
- name: task.attr.name,
335
- // +号是把文本转换成数字的快捷方式
336
- x: task.g.x,
337
- y: task.g.y,
338
- width: task.g.width,
339
- height: task.g.height,
340
- type: type,
341
- isSelected: false,
342
- ref: task
343
- }
344
- taches.push(tache)
345
- }
346
- }
347
- function generateTransitions(type, arr) {
348
- if (!arr) arr = []
349
- if (!Array.isArray(arr)) {
350
- arr = [arr]
351
- }
352
- const transitions = getStore().getters['wfEditor/transitions']
353
- for (const transition of arr) {
354
- const remark = transition.basicProperties.remark || ''
355
- const model = {
356
- id: transition.attr.id,
357
- startJoint: { parent: findTacheById(transition.attr.from), position: transition.g.fromJoint },
358
- endJoint: { parent: findTacheById(transition.attr.to), position: transition.g.toJoint },
359
- isSelected: false,
360
- remark: remark,
361
- lineInfo: {
362
- type: transition.g.lineType,
363
- controlPoint: null
364
- },
365
- ref: transition
366
- }
367
- // 曲线的话会有控制点,如果以后要存多个控制点,就以'x1,y1 x2,y2 x3,y3'的形式来保存,目前只有一个控制点
368
- if (transition.g.lineType === 'CurveLine' && transition.g.coordinate) {
369
- const point = transition.g.coordinate.split(',')
370
- model.lineInfo.controlPoint = {
371
- x: point[0],
372
- y: point[1]
373
- }
374
- } else if (transition.g.lineType === 'BrokenLine' && transition.g.coordinate) {
375
- const points = transition.g.coordinate.split(';')
376
- const controlPoints = []
377
- points.forEach(pointXY => {
378
- if (pointXY !== '') {
379
- const point = pointXY.split(',')
380
- controlPoints.push({ x: point[0], y: point[1] })
381
- }
382
- })
383
- model.lineInfo.controlPoint = controlPoints
384
- }
385
- transitions.push(model)
386
- }
387
- }
388
- function initializeProcessData(process) {
389
- if (!process) return
390
- generateTaches('HumanTask', process.humanTask)
391
- generateTaches('Decision', process.decision)
392
- generateTaches('Fork', process.fork)
393
- generateTaches('Join', process.join)
394
- generateTaches('Subprocess', process.subprocess)
395
- generateTaches('HumanDecision', process.humanDecision)
396
- generateTaches('CopyTask', process.copyTask)
397
- generateTaches('AutoTask', process.autoTask)
398
- generateTaches('Start', process.start)
399
- generateTaches('End', process.end)
400
- generateTransitions('Transition', process.transition)
401
- }
402
- function findOutgoingTransitionsByTacheId(tacheId) {
403
- const transitions = getStore().getters['wfEditor/transitions']
404
- const result = transitions.filter(transition => {
405
- return transition.startJoint.parent.id === tacheId || transition.ref.attr.from === tacheId
406
- })
407
- return result
408
- }
409
-
410
- function findIncomingTransitionsByTacheId(tacheId) {
411
- const transitions = getStore().getters['wfEditor/transitions']
412
- const result = transitions.filter(transition => {
413
- return transition.endJoint.parent.id === tacheId || transition.ref.attr.to === tacheId
414
- })
415
- return result
416
- }
417
-
418
- function findTacheById(tacheId) {
419
- const taches = getStore().getters['wfEditor/taches']
420
- const tache = taches.filter(tache => {
421
- return tache.ref.attr.id === tacheId
422
- })
423
- if (tache.length > 0) {
424
- return tache[0]
425
- } else {
426
- return null
427
- }
428
- }
429
- function deepCopy(source) {
430
- return JSON.parse(JSON.stringify(source))
431
- }
432
-
433
- function updateTransitionsWhenTacheIdChanged(newId, oldId) {
434
- const incomingTransitions = findIncomingTransitionsByTacheId(oldId)
435
- incomingTransitions.map(item => {
436
- item.ref.attr.to = newId
437
- item.ref.attr.id = 'flow_' + item.ref.attr.from + '_to_' + item.ref.attr.to
438
- item.id = item.ref.attr.id
439
- })
440
- const outgoingTransitions = findOutgoingTransitionsByTacheId(oldId)
441
- outgoingTransitions.map(item => {
442
- item.ref.attr.from = newId
443
- item.ref.attr.id = 'flow_' + item.ref.attr.from + '_to_' + item.ref.attr.to
444
- item.id = item.ref.attr.id
445
- })
446
- return true
447
- }
448
- function validateTacheCode(vm) {
449
- const tache = findTacheById(vm.formModel.id)
450
- if (tache && tache.id !== vm.id) {
451
- vm.$alert(getI18n().t('workflowEditorMessage.itIsTheSameAsTheExistingLink', { name: tache.name }))
452
- // 编码重复,立即还原id
453
- vm.formModel.id = vm.id
454
- return
455
- }
456
- // 环节编码不重复的时候,就需要更新流入流向的to和流出流向的from属性了,同时把编码值回传给父组件
457
- updateTransitionsWhenTacheIdChanged(vm.formModel.id, vm.id)
458
- // 支持.snyc修饰符的写法
459
- vm.$emit('update:id', vm.formModel.id)
460
- }
461
-
462
- function watchShowName(vm, newVal) {
463
- let showName = ''
464
- if (vm.processI18n && vm.model.ref && vm.model.ref.basicProperties && vm.model.ref.basicProperties.i18nKey) {
465
- const i18nKey = vm.model.ref.basicProperties.i18nKey
466
- const language = getLanguageWithLocale()
467
- if (vm.processI18n[i18nKey]) {
468
- showName = vm.processI18n[i18nKey][language]
469
- }
470
- if (!showName) {
471
- showName = newVal
472
- }
473
- } else {
474
- showName = newVal
475
- }
476
- return showName
477
- }
478
- export {
479
- clearAllSelectedComponents, deepCopy, endDragTache, findIncomingTransitionsByTacheId, findOutgoingTransitionsByTacheId, findTacheById, getClientMousePosition, getComponentInfo, getI18n, getJoint, getMouseOffset, getMousePosition, getRealRegion, getVirtualRegion, initializeProcessData, removeTextProperty, startDragTache, updateTransitionsWhenTacheIdChanged,
480
- validateTacheCode, watchShowName
481
- }
482
-
483
- const processTemplate = {
484
- newProcess,
485
- newHumanTask,
486
- newDecision,
487
- newStart,
488
- newEnd,
489
- newTransition,
490
- newSubprocess,
491
- newFork,
492
- newJoin,
493
- newHumanDecision,
494
- newCopyTask,
495
- newAutoTask
496
- }
497
-
498
- export { processTemplate }
499
-