workflow-editor 0.0.81-up-tmp8 → 0.0.81-up-tmp10

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 (424) hide show
  1. package/dist/index.full.min.js +142 -138
  2. package/es/index.mjs +13 -15
  3. package/es/src/i18n/i18n.mjs +7 -0
  4. package/es/src/i18n/langs/cn.mjs +4 -0
  5. package/es/src/i18n/langs/en.mjs +4 -0
  6. package/es/style.css +153 -153
  7. package/es/workflow-editor/index.mjs +10 -0
  8. package/es/workflow-editor/src/api.mjs +6 -0
  9. package/es/workflow-editor/src/assets/wf-editor-icons.mjs +43 -0
  10. package/es/workflow-editor/src/json-object-templates/auto-task.mjs +7 -0
  11. package/es/workflow-editor/src/json-object-templates/copy-task.mjs +7 -0
  12. package/es/workflow-editor/src/json-object-templates/decision.mjs +7 -0
  13. package/es/workflow-editor/src/json-object-templates/end.mjs +7 -0
  14. package/es/workflow-editor/src/json-object-templates/fork.mjs +7 -0
  15. package/es/workflow-editor/src/json-object-templates/human-decision.mjs +7 -0
  16. package/es/workflow-editor/src/json-object-templates/human-task.mjs +7 -0
  17. package/es/workflow-editor/src/json-object-templates/join.mjs +7 -0
  18. package/es/workflow-editor/src/json-object-templates/process.mjs +9 -0
  19. package/es/workflow-editor/src/json-object-templates/start.mjs +7 -0
  20. package/es/workflow-editor/src/json-object-templates/subprocess.mjs +7 -0
  21. package/es/workflow-editor/src/json-object-templates/transition.mjs +6 -0
  22. package/es/workflow-editor/src/main/admin-save-dialog.vue.mjs +13 -0
  23. package/es/workflow-editor/src/main/canvas.vue.mjs +130 -0
  24. package/es/workflow-editor/src/main/canvas.vue2.mjs +4 -0
  25. package/es/workflow-editor/src/main/context-menu.vue.mjs +33 -0
  26. package/es/workflow-editor/src/main/context-menu.vue2.mjs +4 -0
  27. package/es/workflow-editor/src/main/icon-svg.vue.mjs +12 -0
  28. package/es/workflow-editor/src/main/icon-svg.vue2.mjs +4 -0
  29. package/es/workflow-editor/src/main/selection-region.vue.mjs +17 -0
  30. package/es/workflow-editor/src/main/selection-region.vue2.mjs +4 -0
  31. package/es/workflow-editor/src/main/tache-history-tooltip.vue.mjs +10 -0
  32. package/es/workflow-editor/src/main/tache-history-tooltip.vue2.mjs +4 -0
  33. package/es/workflow-editor/src/main/tache-subprocess-history-dialog.vue.mjs +11 -0
  34. package/es/workflow-editor/src/main/tache-subprocess-history-dialog.vue2.mjs +4 -0
  35. package/es/workflow-editor/src/main/toolbox.vue.mjs +16 -0
  36. package/es/workflow-editor/src/main/toolbox.vue2.mjs +4 -0
  37. package/es/workflow-editor/src/main/wf-history-canvas.vue.mjs +86 -0
  38. package/es/workflow-editor/src/main/wf-history-canvas.vue2.mjs +4 -0
  39. package/es/workflow-editor/src/process-service.mjs +21 -0
  40. package/es/workflow-editor/src/properties-editors/auto-task/basic-properties.vue.mjs +25 -0
  41. package/es/workflow-editor/src/properties-editors/auto-task/basic-properties.vue2.mjs +4 -0
  42. package/es/workflow-editor/src/properties-editors/auto-task.vue.mjs +22 -0
  43. package/es/workflow-editor/src/properties-editors/auto-task.vue2.mjs +4 -0
  44. package/es/workflow-editor/src/properties-editors/common/additional-condition-utils.mjs +125 -0
  45. package/es/workflow-editor/src/properties-editors/common/additional-condition.vue.mjs +60 -0
  46. package/es/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.mjs +5 -0
  47. package/es/workflow-editor/src/properties-editors/common/auto-filled-fields.vue.mjs +72 -0
  48. package/es/workflow-editor/src/properties-editors/common/common-notice-tool.vue.mjs +18 -0
  49. package/es/workflow-editor/src/properties-editors/common/common-user-condition.vue.mjs +55 -0
  50. package/es/workflow-editor/src/properties-editors/common/form-fields-utils.mjs +14 -0
  51. package/es/workflow-editor/src/properties-editors/common/form-fields.vue.mjs +20 -0
  52. package/es/workflow-editor/src/properties-editors/common/form-fields.vue2.mjs +4 -0
  53. package/es/workflow-editor/src/properties-editors/common/i18n-input.vue.mjs +25 -0
  54. package/es/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue.mjs +36 -0
  55. package/es/workflow-editor/src/properties-editors/common/notice-reminder.vue.mjs +27 -0
  56. package/es/workflow-editor/src/properties-editors/common/notice-reminder.vue2.mjs +4 -0
  57. package/es/workflow-editor/src/properties-editors/common/notice.vue.mjs +31 -0
  58. package/es/workflow-editor/src/properties-editors/common/reminder.vue.mjs +36 -0
  59. package/es/workflow-editor/src/properties-editors/common/reminder.vue2.mjs +4 -0
  60. package/es/workflow-editor/src/properties-editors/common/select-mail-template.vue.mjs +20 -0
  61. package/es/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue.mjs +95 -0
  62. package/es/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue2.mjs +4 -0
  63. package/es/workflow-editor/src/properties-editors/common/system-role-tree.vue.mjs +16 -0
  64. package/es/workflow-editor/src/properties-editors/common/system-role-tree.vue2.mjs +4 -0
  65. package/es/workflow-editor/src/properties-editors/common/task-title.vue.mjs +46 -0
  66. package/es/workflow-editor/src/properties-editors/common/task-title.vue2.mjs +4 -0
  67. package/es/workflow-editor/src/properties-editors/common/transactor-settings.vue.mjs +43 -0
  68. package/es/workflow-editor/src/properties-editors/common/user-selection.vue.mjs +116 -0
  69. package/es/workflow-editor/src/properties-editors/common/value-selection-dialog.vue.mjs +60 -0
  70. package/es/workflow-editor/src/properties-editors/common/value-selection-dialog.vue2.mjs +4 -0
  71. package/es/workflow-editor/src/properties-editors/common/variables.vue.mjs +41 -0
  72. package/es/workflow-editor/src/properties-editors/copy-task/basic-properties.vue.mjs +25 -0
  73. package/es/workflow-editor/src/properties-editors/copy-task/basic-properties.vue2.mjs +4 -0
  74. package/es/workflow-editor/src/properties-editors/copy-task/permission-settings.vue.mjs +30 -0
  75. package/es/workflow-editor/src/properties-editors/copy-task/permission-settings.vue2.mjs +4 -0
  76. package/es/workflow-editor/src/properties-editors/copy-task.vue.mjs +26 -0
  77. package/es/workflow-editor/src/properties-editors/copy-task.vue2.mjs +4 -0
  78. package/es/workflow-editor/src/properties-editors/decision.vue.mjs +24 -0
  79. package/es/workflow-editor/src/properties-editors/fork.vue.mjs +21 -0
  80. package/es/workflow-editor/src/properties-editors/human-decision.vue.mjs +15 -0
  81. package/es/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue.mjs +16 -0
  82. package/es/workflow-editor/src/properties-editors/human-task/basic-properties.vue.mjs +38 -0
  83. package/es/workflow-editor/src/properties-editors/human-task/basic-properties.vue2.mjs +4 -0
  84. package/es/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.mjs +84 -0
  85. package/es/workflow-editor/src/properties-editors/human-task/custom-actions.vue.mjs +62 -0
  86. package/es/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue.mjs +80 -0
  87. package/es/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue.mjs +86 -0
  88. package/es/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue.mjs +43 -0
  89. package/es/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue2.mjs +4 -0
  90. package/es/workflow-editor/src/properties-editors/human-task/editable-fields.vue.mjs +67 -0
  91. package/es/workflow-editor/src/properties-editors/human-task/events.vue.mjs +18 -0
  92. package/es/workflow-editor/src/properties-editors/human-task/permission-settings.vue.mjs +33 -0
  93. package/es/workflow-editor/src/properties-editors/human-task/permission-settings.vue2.mjs +4 -0
  94. package/es/workflow-editor/src/properties-editors/human-task/selection-conditions.vue.mjs +56 -0
  95. package/es/workflow-editor/src/properties-editors/human-task.vue.mjs +28 -0
  96. package/es/workflow-editor/src/properties-editors/human-task.vue2.mjs +4 -0
  97. package/es/workflow-editor/src/properties-editors/join.vue.mjs +15 -0
  98. package/es/workflow-editor/src/properties-editors/process/basic-properties.vue.mjs +88 -0
  99. package/es/workflow-editor/src/properties-editors/process/events.vue.mjs +21 -0
  100. package/es/workflow-editor/src/properties-editors/process/notice-settings.vue.mjs +25 -0
  101. package/es/workflow-editor/src/properties-editors/process/parameter-settings.vue.mjs +17 -0
  102. package/es/workflow-editor/src/properties-editors/process/permission-settings.vue.mjs +10 -0
  103. package/es/workflow-editor/src/properties-editors/process/selectPage.vue.mjs +28 -0
  104. package/es/workflow-editor/src/properties-editors/process.vue.mjs +34 -0
  105. package/es/workflow-editor/src/properties-editors/subprocess/basic-properties.vue.mjs +64 -0
  106. package/es/workflow-editor/src/properties-editors/subprocess/events.vue.mjs +9 -0
  107. package/es/workflow-editor/src/properties-editors/subprocess/field-mappings.vue.mjs +55 -0
  108. package/es/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue.mjs +20 -0
  109. package/es/workflow-editor/src/properties-editors/subprocess.vue.mjs +22 -0
  110. package/es/workflow-editor/src/properties-editors/subprocess.vue2.mjs +4 -0
  111. package/es/workflow-editor/src/properties-editors/transition/basic-properties.vue.mjs +14 -0
  112. package/es/workflow-editor/src/properties-editors/transition.vue.mjs +17 -0
  113. package/es/workflow-editor/src/properties-editors/transition.vue2.mjs +4 -0
  114. package/es/workflow-editor/src/properties-editors/user-condition.mjs +49 -0
  115. package/es/workflow-editor/src/store/getters.mjs +4 -0
  116. package/es/workflow-editor/src/store/workflow-editor.mjs +73 -0
  117. package/es/workflow-editor/src/taches/auto-task.vue.mjs +25 -0
  118. package/es/workflow-editor/src/taches/common-methods.mjs +13 -0
  119. package/es/workflow-editor/src/taches/copy-task.vue.mjs +25 -0
  120. package/es/workflow-editor/src/taches/custom-task.vue.mjs +16 -0
  121. package/es/workflow-editor/src/taches/decision.vue.mjs +25 -0
  122. package/es/workflow-editor/src/taches/decision.vue2.mjs +4 -0
  123. package/es/workflow-editor/src/taches/end.vue.mjs +14 -0
  124. package/es/workflow-editor/src/taches/end.vue2.mjs +4 -0
  125. package/es/workflow-editor/src/taches/fork.vue.mjs +25 -0
  126. package/es/workflow-editor/src/taches/fork.vue2.mjs +4 -0
  127. package/es/workflow-editor/src/taches/human-decision.vue.mjs +25 -0
  128. package/es/workflow-editor/src/taches/human-decision.vue2.mjs +4 -0
  129. package/es/workflow-editor/src/taches/human-task.vue.mjs +25 -0
  130. package/es/workflow-editor/src/taches/join.vue.mjs +16 -0
  131. package/es/workflow-editor/src/taches/join.vue2.mjs +4 -0
  132. package/es/workflow-editor/src/taches/joint.vue.mjs +54 -0
  133. package/es/workflow-editor/src/taches/joint.vue2.mjs +4 -0
  134. package/es/workflow-editor/src/taches/start.vue.mjs +14 -0
  135. package/es/workflow-editor/src/taches/start.vue2.mjs +4 -0
  136. package/es/workflow-editor/src/taches/subprocess.vue.mjs +25 -0
  137. package/es/workflow-editor/src/taches/tache-resizer.vue.mjs +30 -0
  138. package/es/workflow-editor/src/taches/tache-resizer.vue2.mjs +4 -0
  139. package/es/workflow-editor/src/transitions/broken-line.vue.mjs +32 -0
  140. package/es/workflow-editor/src/transitions/broken-line.vue2.mjs +4 -0
  141. package/es/workflow-editor/src/transitions/curve-line.vue.mjs +33 -0
  142. package/es/workflow-editor/src/transitions/curve-line.vue2.mjs +4 -0
  143. package/es/workflow-editor/src/transitions/straight-line.vue.mjs +13 -0
  144. package/es/workflow-editor/src/transitions/transition.vue.mjs +70 -0
  145. package/es/workflow-editor/src/transitions/transition.vue2.mjs +4 -0
  146. package/es/workflow-editor/src/transitions/virtual-transition.vue.mjs +17 -0
  147. package/es/workflow-editor/src/transitions/virtual-transition.vue2.mjs +4 -0
  148. package/es/workflow-editor/src/util.mjs +180 -0
  149. package/es/workflow-editor/src/workflow-editor.vue.mjs +205 -0
  150. package/es/workflow-editor/src/workflow-editor.vue2.mjs +4 -0
  151. package/es/workflow-editor/src/workflow-history.vue.mjs +35 -0
  152. package/es/workflow-editor/src/workflow-history.vue2.mjs +4 -0
  153. package/lib/index.cjs +4 -4
  154. package/lib/src/i18n/i18n.cjs +3 -0
  155. package/lib/src/i18n/langs/cn.cjs +2 -0
  156. package/lib/src/i18n/langs/en.cjs +2 -0
  157. package/lib/style.css +110 -110
  158. package/lib/workflow-editor/index.cjs +7 -0
  159. package/lib/workflow-editor/src/api.cjs +5 -0
  160. package/lib/workflow-editor/src/assets/wf-editor-icons.cjs +44 -0
  161. package/lib/workflow-editor/src/json-object-templates/auto-task.cjs +5 -0
  162. package/lib/workflow-editor/src/json-object-templates/copy-task.cjs +5 -0
  163. package/lib/workflow-editor/src/json-object-templates/decision.cjs +5 -0
  164. package/lib/workflow-editor/src/json-object-templates/end.cjs +5 -0
  165. package/lib/workflow-editor/src/json-object-templates/fork.cjs +5 -0
  166. package/lib/workflow-editor/src/json-object-templates/human-decision.cjs +5 -0
  167. package/lib/workflow-editor/src/json-object-templates/human-task.cjs +5 -0
  168. package/lib/workflow-editor/src/json-object-templates/join.cjs +5 -0
  169. package/lib/workflow-editor/src/json-object-templates/process.cjs +6 -0
  170. package/lib/workflow-editor/src/json-object-templates/start.cjs +5 -0
  171. package/lib/workflow-editor/src/json-object-templates/subprocess.cjs +5 -0
  172. package/lib/workflow-editor/src/json-object-templates/transition.cjs +4 -0
  173. package/lib/workflow-editor/src/main/admin-save-dialog.vue.cjs +11 -0
  174. package/lib/workflow-editor/src/main/canvas.vue.cjs +101 -0
  175. package/lib/workflow-editor/src/main/canvas.vue2.cjs +2 -0
  176. package/lib/workflow-editor/src/main/context-menu.vue.cjs +29 -0
  177. package/lib/workflow-editor/src/main/context-menu.vue2.cjs +2 -0
  178. package/lib/workflow-editor/src/main/icon-svg.vue.cjs +10 -0
  179. package/lib/workflow-editor/src/main/icon-svg.vue2.cjs +2 -0
  180. package/lib/workflow-editor/src/main/selection-region.vue.cjs +13 -0
  181. package/lib/workflow-editor/src/main/selection-region.vue2.cjs +2 -0
  182. package/lib/workflow-editor/src/main/tache-history-tooltip.vue.cjs +8 -0
  183. package/lib/workflow-editor/src/main/tache-history-tooltip.vue2.cjs +2 -0
  184. package/lib/workflow-editor/src/main/tache-subprocess-history-dialog.vue.cjs +9 -0
  185. package/lib/workflow-editor/src/main/tache-subprocess-history-dialog.vue2.cjs +2 -0
  186. package/lib/workflow-editor/src/main/toolbox.vue.cjs +11 -0
  187. package/lib/workflow-editor/src/main/toolbox.vue2.cjs +2 -0
  188. package/lib/workflow-editor/src/main/wf-history-canvas.vue.cjs +67 -0
  189. package/lib/workflow-editor/src/main/wf-history-canvas.vue2.cjs +2 -0
  190. package/lib/workflow-editor/src/process-service.cjs +20 -0
  191. package/lib/workflow-editor/src/properties-editors/auto-task/basic-properties.vue.cjs +20 -0
  192. package/lib/workflow-editor/src/properties-editors/auto-task/basic-properties.vue2.cjs +2 -0
  193. package/lib/workflow-editor/src/properties-editors/auto-task.vue.cjs +19 -0
  194. package/lib/workflow-editor/src/properties-editors/auto-task.vue2.cjs +2 -0
  195. package/lib/workflow-editor/src/properties-editors/common/additional-condition-utils.cjs +94 -0
  196. package/lib/workflow-editor/src/properties-editors/common/additional-condition.vue.cjs +54 -0
  197. package/lib/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.cjs +4 -0
  198. package/lib/workflow-editor/src/properties-editors/common/auto-filled-fields.vue.cjs +67 -0
  199. package/lib/workflow-editor/src/properties-editors/common/common-notice-tool.vue.cjs +16 -0
  200. package/lib/workflow-editor/src/properties-editors/common/common-user-condition.vue.cjs +50 -0
  201. package/lib/workflow-editor/src/properties-editors/common/form-fields-utils.cjs +11 -0
  202. package/lib/workflow-editor/src/properties-editors/common/form-fields.vue.cjs +17 -0
  203. package/lib/workflow-editor/src/properties-editors/common/form-fields.vue2.cjs +2 -0
  204. package/lib/workflow-editor/src/properties-editors/common/i18n-input.vue.cjs +20 -0
  205. package/lib/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue.cjs +31 -0
  206. package/lib/workflow-editor/src/properties-editors/common/notice-reminder.vue.cjs +22 -0
  207. package/lib/workflow-editor/src/properties-editors/common/notice-reminder.vue2.cjs +2 -0
  208. package/lib/workflow-editor/src/properties-editors/common/notice.vue.cjs +25 -0
  209. package/lib/workflow-editor/src/properties-editors/common/reminder.vue.cjs +31 -0
  210. package/lib/workflow-editor/src/properties-editors/common/reminder.vue2.cjs +2 -0
  211. package/lib/workflow-editor/src/properties-editors/common/select-mail-template.vue.cjs +17 -0
  212. package/lib/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue.cjs +93 -0
  213. package/lib/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue2.cjs +2 -0
  214. package/lib/workflow-editor/src/properties-editors/common/system-role-tree.vue.cjs +13 -0
  215. package/lib/workflow-editor/src/properties-editors/common/system-role-tree.vue2.cjs +2 -0
  216. package/lib/workflow-editor/src/properties-editors/common/task-title.vue.cjs +42 -0
  217. package/lib/workflow-editor/src/properties-editors/common/task-title.vue2.cjs +2 -0
  218. package/lib/workflow-editor/src/properties-editors/common/transactor-settings.vue.cjs +37 -0
  219. package/lib/workflow-editor/src/properties-editors/common/user-selection.vue.cjs +110 -0
  220. package/lib/workflow-editor/src/properties-editors/common/value-selection-dialog.vue.cjs +55 -0
  221. package/lib/workflow-editor/src/properties-editors/common/value-selection-dialog.vue2.cjs +2 -0
  222. package/lib/workflow-editor/src/properties-editors/common/variables.vue.cjs +39 -0
  223. package/lib/workflow-editor/src/properties-editors/copy-task/basic-properties.vue.cjs +20 -0
  224. package/lib/workflow-editor/src/properties-editors/copy-task/basic-properties.vue2.cjs +2 -0
  225. package/lib/workflow-editor/src/properties-editors/copy-task/permission-settings.vue.cjs +26 -0
  226. package/lib/workflow-editor/src/properties-editors/copy-task/permission-settings.vue2.cjs +2 -0
  227. package/lib/workflow-editor/src/properties-editors/copy-task.vue.cjs +19 -0
  228. package/lib/workflow-editor/src/properties-editors/copy-task.vue2.cjs +2 -0
  229. package/lib/workflow-editor/src/properties-editors/decision.vue.cjs +20 -0
  230. package/lib/workflow-editor/src/properties-editors/fork.vue.cjs +18 -0
  231. package/lib/workflow-editor/src/properties-editors/human-decision.vue.cjs +13 -0
  232. package/lib/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue.cjs +13 -0
  233. package/lib/workflow-editor/src/properties-editors/human-task/basic-properties.vue.cjs +31 -0
  234. package/lib/workflow-editor/src/properties-editors/human-task/basic-properties.vue2.cjs +2 -0
  235. package/lib/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.cjs +82 -0
  236. package/lib/workflow-editor/src/properties-editors/human-task/custom-actions.vue.cjs +56 -0
  237. package/lib/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue.cjs +75 -0
  238. package/lib/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue.cjs +80 -0
  239. package/lib/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue.cjs +39 -0
  240. package/lib/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue2.cjs +2 -0
  241. package/lib/workflow-editor/src/properties-editors/human-task/editable-fields.vue.cjs +60 -0
  242. package/lib/workflow-editor/src/properties-editors/human-task/events.vue.cjs +15 -0
  243. package/lib/workflow-editor/src/properties-editors/human-task/permission-settings.vue.cjs +26 -0
  244. package/lib/workflow-editor/src/properties-editors/human-task/permission-settings.vue2.cjs +2 -0
  245. package/lib/workflow-editor/src/properties-editors/human-task/selection-conditions.vue.cjs +49 -0
  246. package/lib/workflow-editor/src/properties-editors/human-task.vue.cjs +19 -0
  247. package/lib/workflow-editor/src/properties-editors/human-task.vue2.cjs +2 -0
  248. package/lib/workflow-editor/src/properties-editors/join.vue.cjs +13 -0
  249. package/lib/workflow-editor/src/properties-editors/process/basic-properties.vue.cjs +81 -0
  250. package/lib/workflow-editor/src/properties-editors/process/events.vue.cjs +18 -0
  251. package/lib/workflow-editor/src/properties-editors/process/notice-settings.vue.cjs +21 -0
  252. package/lib/workflow-editor/src/properties-editors/process/parameter-settings.vue.cjs +13 -0
  253. package/lib/workflow-editor/src/properties-editors/process/permission-settings.vue.cjs +7 -0
  254. package/lib/workflow-editor/src/properties-editors/process/selectPage.vue.cjs +23 -0
  255. package/lib/workflow-editor/src/properties-editors/process.vue.cjs +24 -0
  256. package/lib/workflow-editor/src/properties-editors/subprocess/basic-properties.vue.cjs +57 -0
  257. package/lib/workflow-editor/src/properties-editors/subprocess/events.vue.cjs +7 -0
  258. package/lib/workflow-editor/src/properties-editors/subprocess/field-mappings.vue.cjs +50 -0
  259. package/lib/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue.cjs +16 -0
  260. package/lib/workflow-editor/src/properties-editors/subprocess.vue.cjs +17 -0
  261. package/lib/workflow-editor/src/properties-editors/subprocess.vue2.cjs +2 -0
  262. package/lib/workflow-editor/src/properties-editors/transition/basic-properties.vue.cjs +10 -0
  263. package/lib/workflow-editor/src/properties-editors/transition.vue.cjs +12 -0
  264. package/lib/workflow-editor/src/properties-editors/transition.vue2.cjs +2 -0
  265. package/lib/workflow-editor/src/properties-editors/user-condition.cjs +33 -0
  266. package/lib/workflow-editor/src/store/getters.cjs +2 -0
  267. package/lib/workflow-editor/src/store/workflow-editor.cjs +71 -0
  268. package/lib/workflow-editor/src/taches/auto-task.vue.cjs +17 -0
  269. package/lib/workflow-editor/src/taches/common-methods.cjs +11 -0
  270. package/lib/workflow-editor/src/taches/copy-task.vue.cjs +17 -0
  271. package/lib/workflow-editor/src/taches/custom-task.vue.cjs +9 -0
  272. package/lib/workflow-editor/src/taches/decision.vue.cjs +19 -0
  273. package/lib/workflow-editor/src/taches/decision.vue2.cjs +2 -0
  274. package/lib/workflow-editor/src/taches/end.vue.cjs +9 -0
  275. package/lib/workflow-editor/src/taches/end.vue2.cjs +2 -0
  276. package/lib/workflow-editor/src/taches/fork.vue.cjs +19 -0
  277. package/lib/workflow-editor/src/taches/fork.vue2.cjs +2 -0
  278. package/lib/workflow-editor/src/taches/human-decision.vue.cjs +19 -0
  279. package/lib/workflow-editor/src/taches/human-decision.vue2.cjs +2 -0
  280. package/lib/workflow-editor/src/taches/human-task.vue.cjs +17 -0
  281. package/lib/workflow-editor/src/taches/join.vue.cjs +11 -0
  282. package/lib/workflow-editor/src/taches/join.vue2.cjs +2 -0
  283. package/lib/workflow-editor/src/taches/joint.vue.cjs +50 -0
  284. package/lib/workflow-editor/src/taches/joint.vue2.cjs +2 -0
  285. package/lib/workflow-editor/src/taches/start.vue.cjs +9 -0
  286. package/lib/workflow-editor/src/taches/start.vue2.cjs +2 -0
  287. package/lib/workflow-editor/src/taches/subprocess.vue.cjs +17 -0
  288. package/lib/workflow-editor/src/taches/tache-resizer.vue.cjs +27 -0
  289. package/lib/workflow-editor/src/taches/tache-resizer.vue2.cjs +2 -0
  290. package/lib/workflow-editor/src/transitions/broken-line.vue.cjs +28 -0
  291. package/lib/workflow-editor/src/transitions/broken-line.vue2.cjs +2 -0
  292. package/lib/workflow-editor/src/transitions/curve-line.vue.cjs +29 -0
  293. package/lib/workflow-editor/src/transitions/curve-line.vue2.cjs +2 -0
  294. package/lib/workflow-editor/src/transitions/straight-line.vue.cjs +9 -0
  295. package/lib/workflow-editor/src/transitions/transition.vue.cjs +63 -0
  296. package/lib/workflow-editor/src/transitions/transition.vue2.cjs +2 -0
  297. package/lib/workflow-editor/src/transitions/virtual-transition.vue.cjs +13 -0
  298. package/lib/workflow-editor/src/transitions/virtual-transition.vue2.cjs +2 -0
  299. package/lib/workflow-editor/src/util.cjs +139 -0
  300. package/lib/workflow-editor/src/workflow-editor.vue.cjs +191 -0
  301. package/lib/workflow-editor/src/workflow-editor.vue2.cjs +2 -0
  302. package/lib/workflow-editor/src/workflow-history.vue.cjs +28 -0
  303. package/lib/workflow-editor/src/workflow-history.vue2.cjs +2 -0
  304. package/package.json +1 -1
  305. package/packages/index.js +50 -0
  306. package/packages/plugins/formValidatorUtil.js +723 -0
  307. package/packages/plugins/index.js +8 -0
  308. package/packages/workflow-editor/index.js +14 -0
  309. package/packages/workflow-editor/src/api.js +7 -0
  310. package/packages/workflow-editor/src/assets/tab-select.png +0 -0
  311. package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
  312. package/packages/workflow-editor/src/assets/wf-editor-icons.js +2 -0
  313. package/packages/workflow-editor/src/constant.js +8 -0
  314. package/packages/workflow-editor/src/json-object-templates/auto-task.js +70 -0
  315. package/packages/workflow-editor/src/json-object-templates/copy-task.js +72 -0
  316. package/packages/workflow-editor/src/json-object-templates/decision.js +11 -0
  317. package/packages/workflow-editor/src/json-object-templates/end.js +14 -0
  318. package/packages/workflow-editor/src/json-object-templates/fork.js +10 -0
  319. package/packages/workflow-editor/src/json-object-templates/human-decision.js +9 -0
  320. package/packages/workflow-editor/src/json-object-templates/human-task.js +208 -0
  321. package/packages/workflow-editor/src/json-object-templates/join.js +10 -0
  322. package/packages/workflow-editor/src/json-object-templates/process.js +99 -0
  323. package/packages/workflow-editor/src/json-object-templates/start.js +13 -0
  324. package/packages/workflow-editor/src/json-object-templates/subprocess.js +31 -0
  325. package/packages/workflow-editor/src/json-object-templates/transition.js +26 -0
  326. package/packages/workflow-editor/src/main/admin-save-dialog.vue +67 -0
  327. package/packages/workflow-editor/src/main/canvas.vue +493 -0
  328. package/packages/workflow-editor/src/main/context-menu.vue +147 -0
  329. package/packages/workflow-editor/src/main/icon-svg.vue +32 -0
  330. package/packages/workflow-editor/src/main/selection-region.vue +66 -0
  331. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +38 -0
  332. package/packages/workflow-editor/src/main/tache-name-input.vue +19 -0
  333. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +40 -0
  334. package/packages/workflow-editor/src/main/toolbox.vue +60 -0
  335. package/packages/workflow-editor/src/main/wf-history-canvas.vue +309 -0
  336. package/packages/workflow-editor/src/process-json.js +624 -0
  337. package/packages/workflow-editor/src/process-service.js +68 -0
  338. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +81 -0
  339. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +155 -0
  340. package/packages/workflow-editor/src/properties-editors/auto-task.vue +74 -0
  341. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +568 -0
  342. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +320 -0
  343. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +34 -0
  344. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +268 -0
  345. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +81 -0
  346. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +242 -0
  347. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +23 -0
  348. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +117 -0
  349. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +88 -0
  350. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +143 -0
  351. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +149 -0
  352. package/packages/workflow-editor/src/properties-editors/common/notice.vue +108 -0
  353. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +272 -0
  354. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +92 -0
  355. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +66 -0
  356. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +354 -0
  357. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +68 -0
  358. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +165 -0
  359. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +275 -0
  360. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +426 -0
  361. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +272 -0
  362. package/packages/workflow-editor/src/properties-editors/common/variables.vue +139 -0
  363. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +90 -0
  364. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +155 -0
  365. package/packages/workflow-editor/src/properties-editors/copy-task.vue +95 -0
  366. package/packages/workflow-editor/src/properties-editors/decision.vue +95 -0
  367. package/packages/workflow-editor/src/properties-editors/fork.vue +77 -0
  368. package/packages/workflow-editor/src/properties-editors/human-decision.vue +49 -0
  369. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +62 -0
  370. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +184 -0
  371. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +359 -0
  372. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +256 -0
  373. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +405 -0
  374. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +257 -0
  375. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +430 -0
  376. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +206 -0
  377. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +60 -0
  378. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +224 -0
  379. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +499 -0
  380. package/packages/workflow-editor/src/properties-editors/human-task.vue +107 -0
  381. package/packages/workflow-editor/src/properties-editors/join.vue +49 -0
  382. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +336 -0
  383. package/packages/workflow-editor/src/properties-editors/process/events.vue +79 -0
  384. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +68 -0
  385. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +106 -0
  386. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +28 -0
  387. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +88 -0
  388. package/packages/workflow-editor/src/properties-editors/process.vue +115 -0
  389. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +201 -0
  390. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +26 -0
  391. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +216 -0
  392. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +66 -0
  393. package/packages/workflow-editor/src/properties-editors/subprocess.vue +80 -0
  394. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +53 -0
  395. package/packages/workflow-editor/src/properties-editors/transition.vue +75 -0
  396. package/packages/workflow-editor/src/properties-editors/user-condition.js +183 -0
  397. package/packages/workflow-editor/src/store/getters.js +33 -0
  398. package/packages/workflow-editor/src/store/workflow-editor.js +153 -0
  399. package/packages/workflow-editor/src/taches/auto-task.vue +99 -0
  400. package/packages/workflow-editor/src/taches/common-methods.js +21 -0
  401. package/packages/workflow-editor/src/taches/copy-task.vue +99 -0
  402. package/packages/workflow-editor/src/taches/custom-task.vue +88 -0
  403. package/packages/workflow-editor/src/taches/decision.vue +102 -0
  404. package/packages/workflow-editor/src/taches/end.vue +76 -0
  405. package/packages/workflow-editor/src/taches/fork.vue +102 -0
  406. package/packages/workflow-editor/src/taches/human-decision.vue +102 -0
  407. package/packages/workflow-editor/src/taches/human-task.vue +113 -0
  408. package/packages/workflow-editor/src/taches/join.vue +91 -0
  409. package/packages/workflow-editor/src/taches/joint.vue +177 -0
  410. package/packages/workflow-editor/src/taches/start.vue +76 -0
  411. package/packages/workflow-editor/src/taches/subprocess.vue +99 -0
  412. package/packages/workflow-editor/src/taches/tache-resizer.vue +80 -0
  413. package/packages/workflow-editor/src/transitions/broken-line.vue +91 -0
  414. package/packages/workflow-editor/src/transitions/curve-line.vue +91 -0
  415. package/packages/workflow-editor/src/transitions/straight-line.vue +26 -0
  416. package/packages/workflow-editor/src/transitions/transition.vue +209 -0
  417. package/packages/workflow-editor/src/transitions/virtual-transition.vue +43 -0
  418. package/packages/workflow-editor/src/util.js +499 -0
  419. package/packages/workflow-editor/src/workflow-editor.vue +852 -0
  420. package/packages/workflow-editor/src/workflow-history.vue +153 -0
  421. package/src/i18n/i18n.js +16 -0
  422. package/src/i18n/langs/cn.js +521 -0
  423. package/src/i18n/langs/en.js +529 -0
  424. package/.vscode/extensions.json +0 -3
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <el-dialog
3
+ model-value
4
+ :title="$t('workflowEditor.task.attributesOfManualJudgment')"
5
+ :center="true"
6
+ append-to-body
7
+ @open="$emit('open')"
8
+ @opend="$emit('opend')"
9
+ @close="$emit('close')"
10
+ @closed="$emit('closed')"
11
+ >
12
+ <el-form>
13
+ <el-form-item :label="$t('workflowEditor.task.name')" label-width="40px">
14
+ <el-input v-model="formModel.attr.name" />
15
+ </el-form-item>
16
+ </el-form>
17
+ </el-dialog>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ name: 'HumanDecisionPropertiesEditor',
23
+ props: {
24
+ model: {
25
+ type: Object,
26
+ default: null
27
+ }
28
+ },
29
+ data(){
30
+ return {
31
+ dialogVisible: true
32
+ }
33
+ },
34
+ computed: {
35
+ formModel() {
36
+ return this.model.ref
37
+ }
38
+ },
39
+ mounted() {
40
+ this.$watch('model.ref.attr.name', function(newVal) {
41
+ this.model.name = newVal
42
+ })
43
+ }
44
+ }
45
+ </script>
46
+
47
+ <style lang="scss" scoped>
48
+
49
+ </style>
@@ -0,0 +1,62 @@
1
+ <template>
2
+ <el-dialog
3
+ width="50%"
4
+ :title="$t('workflowEditor.task.setConditions')"
5
+ model-value
6
+ top="10vh"
7
+ append-to-body
8
+ class="properties-editor-noTab"
9
+ center
10
+ @close="$emit('close')"
11
+ >
12
+ <el-form-item>
13
+ <additional-condition v-model="condition" />
14
+ </el-form-item>
15
+ <template #footer>
16
+ <el-button type="primary" size="small" @click="setConditions">
17
+ {{ $t('workflowEditorPublicModel.determine') }}
18
+ </el-button>
19
+ <el-button size="small" @click="$emit('close')">
20
+ {{ $t('workflowEditorPublicModel.cancel') }}
21
+ </el-button>
22
+ </template>
23
+ </el-dialog>
24
+ </template>
25
+
26
+ <script>
27
+ import AdditionalCondition from '../common/additional-condition'
28
+ export default {
29
+ name: 'AdditionalConditionDialog',
30
+ components: {
31
+ AdditionalCondition
32
+ },
33
+ props: {
34
+ modelValue: {
35
+ type: String,
36
+ default: ''
37
+ }
38
+ },
39
+ data() {
40
+ return {
41
+ condition: this.modelValue,
42
+ dialogVisible: true
43
+ }
44
+ },
45
+ watch: {
46
+ value(val) {
47
+ this.condition = val
48
+ }
49
+ },
50
+ methods: {
51
+ setConditions() {
52
+ // this.$emit('input', this.condition)
53
+ this.$emit('update:modelValue', this.condition)
54
+ this.$emit('close')
55
+ }
56
+ }
57
+ }
58
+ </script>
59
+
60
+ <style lang="scss" scoped>
61
+
62
+ </style>
@@ -0,0 +1,184 @@
1
+ <template>
2
+ <el-form :model="formModel" label-width="110px">
3
+ <el-row>
4
+ <el-col :span="12">
5
+ <el-form-item :label="$t('workflowEditor.task.name')">
6
+ <!-- <el-input v-model="formModel.name" /> -->
7
+ <i18n-input
8
+ v-model="formModel.name"
9
+ :i18n-key="tache.i18nKey ? tache.i18nKey : 'name.' + formModel.id"
10
+ @setI18n="setI18nValue"
11
+ />
12
+ </el-form-item>
13
+ </el-col>
14
+ <el-col :span="12">
15
+ <el-form-item :label="$t('workflowEditor.task.code')">
16
+ <el-input v-model="formModel.id" @blur="validateId" />
17
+ </el-form-item>
18
+ </el-col>
19
+ </el-row>
20
+ <el-form-item :label="$t('workflowEditor.task.taskTitle')">
21
+ <task-title v-model="tache.taskTitle" />
22
+ </el-form-item>
23
+ <el-form-item :label="$t('workflowEditor.task.canItBeRejected')">
24
+ <el-switch v-model="tache.rebuttable" />
25
+ </el-form-item>
26
+ <el-form-item :label="$t('workflowEditor.task.emailNotification')">
27
+ <el-switch v-model="tache.mailNotice" />
28
+ </el-form-item>
29
+ <el-form-item v-if="tache.mailNotice" :label="$t('workflowEditor.task.selectNoticeTemplate')">
30
+ <select-mail-templates v-model="tache.mailTemplateCode" @set-value="setMailTemplateCode" />
31
+ </el-form-item>
32
+ <el-form-item v-if="tache.mailNotice" :label="$t('workflowEditor.task.selectMailTemplate')">
33
+ <select-mail-templates v-model="tache.mailPointTemplateCode" @set-value="setMailPointTemplateCode" />
34
+ </el-form-item>
35
+ <el-form-item :label="$t('workflowEditor.task.HandlingMethod')">
36
+ <el-radio-group v-model="tache.processingMode.type">
37
+ <el-radio label="EDIT">
38
+ {{ $t('workflowEditor.task.editorial') }}
39
+ </el-radio>
40
+ <el-radio label="APPROVE">
41
+ {{ $t('workflowEditor.task.approvalType') }}
42
+ </el-radio>
43
+ <el-radio label="COUNTERSIGN">
44
+ {{ $t('workflowEditor.task.countersign') }}
45
+ </el-radio>
46
+ <el-radio label="VOTE">
47
+ {{ $t('workflowEditor.task.voting') }}
48
+ </el-radio>
49
+ </el-radio-group>
50
+ </el-form-item>
51
+ <el-form-item
52
+ v-if="tache.processingMode.type === 'EDIT' || tache.processingMode.type === 'APPROVE'"
53
+ :label="$t('workflowEditorMessage.whenThereAreMultipleManagers')"
54
+ >
55
+ <el-radio-group v-model="tache.processingMode.moreTransactor">
56
+ <el-radio :label="false">
57
+ {{ $t('workflowEditor.task.anyOneCanHandleIt') }}
58
+ </el-radio>
59
+ <el-radio :label="true">
60
+ {{ $t('workflowEditor.task.forAll') }}
61
+ </el-radio>
62
+ </el-radio-group>
63
+ </el-form-item>
64
+ <el-form-item
65
+ v-if="tache.processingMode.type === 'COUNTERSIGN' || tache.processingMode.type === 'VOTE'"
66
+ :label="$t('workflowEditor.task.passRate')"
67
+ >
68
+ <el-input-number
69
+ v-model="tache.processingMode.passRate"
70
+ :step="10"
71
+ size="small"
72
+ :min="0"
73
+ :max="100"
74
+ />
75
+ <span class="percent"> % </span>
76
+ </el-form-item>
77
+ <el-form-item :label="$t('workflowEditor.task.modifyOperationName')">
78
+ <el-switch v-model="showActions" />
79
+ <custom-actions
80
+ v-if="showActions"
81
+ :model="tache.processingMode.actions"
82
+ @updateAction="updateAction"
83
+ />
84
+ </el-form-item>
85
+ <el-form-item :label="$t('workflowEditor.task.handlingPage')">
86
+ <el-input v-model="tache.taskUrl" />
87
+ </el-form-item>
88
+ <el-form-item :label="$t('workflowEditor.task.remarks')">
89
+ <el-input v-model="tache.remark" type="textarea" autosize />
90
+ </el-form-item>
91
+ </el-form>
92
+ </template>
93
+ <script>
94
+ import TaskTitle from '../common/task-title'
95
+ import CustomActions from './custom-actions'
96
+ import { validateTacheCode } from '../../util'
97
+ import i18nInput from '../common/i18n-input'
98
+ import SelectMailTemplates from '../common/select-mail-template.vue'
99
+ export default {
100
+ name: 'BasicProperties',
101
+ components: {
102
+ TaskTitle,
103
+ CustomActions,
104
+ i18nInput,
105
+ SelectMailTemplates
106
+ },
107
+ props: {
108
+ model: {
109
+ type: Object,
110
+ default: null
111
+ },
112
+ id: {
113
+ type: String,
114
+ default: null
115
+ },
116
+ name: {
117
+ type: String,
118
+ default: null
119
+ }
120
+ },
121
+ data() {
122
+ let showActions = false
123
+ const actions = this.model.processingMode.actions.action
124
+ if (actions) {
125
+ if (Array.isArray(actions) && actions.length === 0) {
126
+ showActions = false
127
+ } else {
128
+ showActions = true
129
+ }
130
+ }
131
+ return {
132
+ showActions,
133
+ formModel: {
134
+ name: this.name,
135
+ id: this.id,
136
+ tache: this.model
137
+ }
138
+ }
139
+ },
140
+ computed: {
141
+ tache() {
142
+ return this.model
143
+ }
144
+ },
145
+ created() {
146
+ if (!this.tache.processingMode.actions) {
147
+ this.tache.processingMode.actions = {}
148
+ // this.$set(this.tache.processingMode, 'actions', {})
149
+ }
150
+ },
151
+ mounted() {
152
+ // 支持.snyc修饰符的写法
153
+ this.$watch('formModel.name', function (newVal, oldVal) {
154
+ this.$emit('update:name', newVal)
155
+ })
156
+ },
157
+ methods: {
158
+ // 原来使用$watch来监听id的更改是不行的:input框每输入一个字符都会导致$watch的触发,输入过程中不应该触发(这时候没有输入完成,做的id重复判断是无效的),而是等blur后触发才能保证正确性
159
+ validateId() {
160
+ validateTacheCode(this)
161
+ },
162
+ // 关闭选择邮件模板弹框
163
+ setMailTemplateCode(mailTemplateCode) {
164
+ this.tache.mailTemplateCode = mailTemplateCode
165
+ },
166
+ setMailPointTemplateCode(mailTemplateCode){
167
+ this.tache.mailPointTemplateCode = mailTemplateCode
168
+ },
169
+ setI18nValue(i18nKey) {
170
+ this.tache.i18nKey = i18nKey
171
+ },
172
+ updateAction(action) {
173
+ this.tache.processingMode.actions.action = action
174
+ }
175
+ }
176
+ }
177
+ </script>
178
+ <style scoped>
179
+ .percent {
180
+ margin-left: 10px;
181
+ color: red;
182
+ font-size: 1.2em;
183
+ }
184
+ </style>
@@ -0,0 +1,359 @@
1
+ // import modulePageService from '@/subsystems/mms/api/module-page'
2
+ import { getI18n } from '../../../../workflow-editor/src/util'
3
+ const utiljs = {
4
+ // 格式化json
5
+ xmlToData(xmlData) {
6
+ const tableData = []
7
+ if (xmlData) {
8
+ const arr = xmlData.split(' ')
9
+ if (arr && arr.length > 0) {
10
+ let num = 1
11
+ let leftBracket = ''
12
+ let propName = ''
13
+ let operator = ''
14
+ let propValue = ''
15
+ let rightBracket = ''
16
+ let logicOperator = ''
17
+ let propValueType = null
18
+ for (var i = 0; i < arr.length; i++) {
19
+ var str = arr[i]
20
+ if (str.indexOf('(') !== -1) {
21
+ if (this.operationArr) {
22
+ this.operationArr.push([])
23
+ }
24
+ leftBracket = ''
25
+ propName = ''
26
+ operator = ''
27
+ propValue = ''
28
+ rightBracket = ''
29
+ logicOperator = ''
30
+ const leftarr = str.split('${field[')
31
+ leftBracket = leftarr[0]
32
+ propName = leftarr[1].replace(']}', '')
33
+ if (this.operationArr) {
34
+ const operatorsArr = this.getOperators(this.fieldMap[propName])
35
+ this.operationArr[num - 1] = operatorsArr
36
+ }
37
+ continue
38
+ }
39
+ if (str.indexOf('(') === -1 && str.indexOf('${field[') !== -1) {
40
+ if (this.operationArr) {
41
+ this.operationArr.push([])
42
+ }
43
+ leftBracket = ''
44
+ propName = ''
45
+ operator = ''
46
+ propValue = ''
47
+ rightBracket = ''
48
+ logicOperator = ''
49
+ propName = str.replace('${field[', '').replace(']}', '')
50
+ if (this.operationArr) {
51
+ const operatorsArr = this.getOperators(this.fieldMap[propName])
52
+ this.operationArr[num - 1] = operatorsArr
53
+ }
54
+ continue
55
+ }
56
+ if (str.indexOf('operator.') !== -1 && str.indexOf('condition.') === -1) {
57
+ operator = str
58
+ continue
59
+ }
60
+ if (operator !== '' && propValue === '') {
61
+ if (str.indexOf(')') !== -1) {
62
+ if (str.indexOf(')))') !== -1) {
63
+ propValue = str.replace(')))', '')
64
+ rightBracket = ')))'
65
+ } else if (str.indexOf('))') !== -1) {
66
+ propValue = str.replace('))', '')
67
+ rightBracket = '))'
68
+ } else if (str.indexOf(')') !== -1) {
69
+ propValue = str.replace(')', '')
70
+ rightBracket = ')'
71
+ }
72
+ } else {
73
+ propValue = str
74
+ }
75
+ if (propValue && propValue !== '') {
76
+ if (propValue.indexOf('${task.') !== -1) {
77
+ propValueType = 'task'
78
+ } else if (propValue.indexOf('${context.') !== -1) {
79
+ propValueType = 'context'
80
+ } else if (propValue.indexOf('${obj.') !== -1) {
81
+ propValueType = 'obj'
82
+ } else if (propValue.indexOf('${subObj.') !== -1) {
83
+ propValueType = 'subObj'
84
+ } else if (propValue.indexOf('${request.') !== -1) {
85
+ propValueType = 'request'
86
+ } else if (propValue.indexOf('${input.') !== -1) {
87
+ propValueType = 'input'
88
+ } else if (propValue.indexOf('${custom.') !== -1) {
89
+ propValueType = 'custom'
90
+ }
91
+ }
92
+ continue
93
+ }
94
+ if (str.indexOf('condition.') !== -1) {
95
+ logicOperator = str
96
+ tableData.push({
97
+ id: num,
98
+ leftBracket: leftBracket,
99
+ propName: propName,
100
+ operator: operator,
101
+ propValue: propValue,
102
+ rightBracket: rightBracket,
103
+ logicOperator: logicOperator,
104
+ propValueType: propValueType
105
+ })
106
+ num += 1
107
+ } else if (propValue && propValue !== '') {
108
+ if (!logicOperator || logicOperator === '') {
109
+ logicOperator = 'condition.operator.or'
110
+ tableData.push({
111
+ id: num,
112
+ leftBracket: leftBracket,
113
+ propName: propName,
114
+ operator: operator,
115
+ propValue: propValue,
116
+ rightBracket: rightBracket,
117
+ logicOperator: logicOperator,
118
+ propValueType: propValueType
119
+ })
120
+ num += 1
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ return tableData
127
+ },
128
+ getOperatorsArr(conditionList) {
129
+ if (conditionList && conditionList.length > 0) {
130
+ for (var i = 0; i < conditionList.length; i++) {
131
+ this.operationArr.push([])
132
+ const item = conditionList[i]
133
+ const operatorsArr = this.getOperators(this.fieldMap[item.propName])
134
+ this.operationArr[i] = operatorsArr
135
+ }
136
+ }
137
+ },
138
+ getRetunrOperatorsArr(conditionList, fieldMap) {
139
+ const operationArr = []
140
+ if (conditionList && conditionList.length > 0) {
141
+ for (var i = 0; i < conditionList.length; i++) {
142
+ operationArr.push([])
143
+ const item = conditionList[i]
144
+ const operatorsArr = this.getOperators(fieldMap[item.propName])
145
+ operationArr[i] = operatorsArr
146
+ }
147
+ }
148
+ return operationArr
149
+ },
150
+ dataToXml(tableData) {
151
+ let stringData = ''
152
+ if (tableData && tableData.length > 0) {
153
+ for (var i = 0; i < tableData.length; i++) {
154
+ var item = tableData[i]
155
+ let logicOperator = item.logicOperator
156
+ if (i === tableData.length - 1) {
157
+ logicOperator = ''
158
+ }
159
+
160
+ stringData =
161
+ stringData +
162
+ item.leftBracket +
163
+ '${field[' +
164
+ item.propName +
165
+ ']} ' +
166
+ item.operator +
167
+ ' ' +
168
+ item.propValue +
169
+ item.rightBracket +
170
+ ' ' +
171
+ logicOperator +
172
+ ' '
173
+ }
174
+ }
175
+ return stringData
176
+ },
177
+ formatConditionList(conditionList) {
178
+ let returnStr = ''
179
+ if (conditionList) {
180
+ if (typeof conditionList === 'string') {
181
+ // 先进行转换再解析
182
+ const dataList = this.xmlToData(conditionList)
183
+ returnStr = this.formatConditionListTwo(dataList)
184
+ } else {
185
+ returnStr = this.formatConditionListTwo(conditionList)
186
+ }
187
+ }
188
+ if (returnStr && returnStr !== '') {
189
+ const endStr = returnStr.substring(returnStr.length - 1)
190
+ if (endStr === '者' || endStr === '且') {
191
+ returnStr = returnStr.substring(0, returnStr.length - 2)
192
+ }
193
+ }
194
+ return returnStr
195
+ },
196
+ formatConditionListTwo(conditionList) {
197
+ let returnStr = ''
198
+ if (conditionList && conditionList.length > 0) {
199
+ for (var i = 0; i < conditionList.length; i++) {
200
+ const item = conditionList[i]
201
+ if (item && item.propName) {
202
+ const operatorsArr = this.getOperators(this.fieldMap[item.propName])
203
+ if (operatorsArr && operatorsArr.length > 0) {
204
+ const operator = operatorsArr.filter((operItem) => {
205
+ return operItem.name === item.operator
206
+ })
207
+ returnStr += item.leftBracket
208
+ if (this.fieldMap[item.propName] && this.fieldMap[item.propName].label) {
209
+ returnStr += this.fieldMap[item.propName].label + ' '
210
+ }
211
+
212
+ if (operator && operator.length > 0) {
213
+ returnStr += operator[0].label + ' '
214
+ }
215
+ returnStr += item.propValue + item.rightBracket + ' '
216
+ if (item.logicOperator) {
217
+ if (item.logicOperator === 'or') {
218
+ returnStr += '或者'
219
+ } else {
220
+ returnStr += '并且'
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }
226
+ }
227
+ return returnStr
228
+ },
229
+ // 实时根据类型改变连接符
230
+ getOperators(item) {
231
+ if (item) {
232
+ if (item.type === 'INTEGER' || item.type === 'LONG' || item.type === 'DOUBLE' || item.type === 'FLOAT') {
233
+ return [
234
+ {
235
+ name: 'operator.number.gt',
236
+ label: getI18n().t('workflowEditor.process.greaterThan')
237
+ },
238
+ {
239
+ name: 'operator.number.lt',
240
+ label: getI18n().t('workflowEditor.process.lessThan')
241
+ },
242
+ {
243
+ name: 'operator.number.eq',
244
+ label: getI18n().t('workflowEditor.process.beEqualTo')
245
+ },
246
+ {
247
+ name: 'operator.number.le',
248
+ label: getI18n().t('workflowEditor.process.notGreaterThan')
249
+ },
250
+ {
251
+ name: 'operator.number.ge',
252
+ label: getI18n().t('workflowEditor.process.notLessThan')
253
+ },
254
+ {
255
+ name: 'operator.number.ne',
256
+ label: getI18n().t('workflowEditor.process.notEqualTo')
257
+ },
258
+ {
259
+ name: 'operator.text.is.null',
260
+ label: getI18n().t('workflowEditor.process.isNull')
261
+ },
262
+ {
263
+ name: 'operator.text.not.null',
264
+ label: getI18n().t('workflowEditor.process.isNotNull')
265
+ }
266
+ ]
267
+ } else if (item.type === 'DATE' || item.type === 'TIME') {
268
+ return [
269
+ {
270
+ name: 'operator.date.gt',
271
+ label: getI18n().t('workflowEditor.process.laterThan')
272
+ },
273
+ {
274
+ name: 'operator.date.lt',
275
+ label: getI18n().t('workflowEditor.process.earlierThan')
276
+ },
277
+ {
278
+ name: 'operator.date.eq',
279
+ label: getI18n().t('workflowEditor.process.beEqualTo')
280
+ },
281
+ {
282
+ name: 'operator.date.le',
283
+ label: getI18n().t('workflowEditor.process.noLaterThan')
284
+ },
285
+ {
286
+ name: 'operator.date.ge',
287
+ label: getI18n().t('workflowEditor.process.noEarlierThan')
288
+ },
289
+ {
290
+ name: 'operator.text.is.null',
291
+ label: getI18n().t('workflowEditor.process.isNull')
292
+ },
293
+ {
294
+ name: 'operator.text.not.null',
295
+ label: getI18n().t('workflowEditor.process.isNotNull')
296
+ }
297
+ ]
298
+ } else if (item.type === 'TEXT') {
299
+ return [
300
+ {
301
+ name: 'operator.text.eq',
302
+ label: getI18n().t('workflowEditor.process.beEqualTo')
303
+ },
304
+ {
305
+ name: 'operator.text.neq',
306
+ label: getI18n().t('workflowEditor.process.notEqualTo')
307
+ },
308
+ {
309
+ name: 'operator.text.contain',
310
+ label: getI18n().t('workflowEditor.process.contain')
311
+ },
312
+ {
313
+ name: 'operator.text.contain.not',
314
+ label: getI18n().t('workflowEditor.process.notIncluded')
315
+ },
316
+ {
317
+ name: 'operator.text.is.null',
318
+ label: getI18n().t('workflowEditor.process.isNull')
319
+ },
320
+ {
321
+ name: 'operator.text.not.null',
322
+ label: getI18n().t('workflowEditor.process.isNotNull')
323
+ }
324
+ ]
325
+ } else {
326
+ return [
327
+ {
328
+ name: 'operator.text.eq',
329
+ label: getI18n().t('workflowEditor.process.beEqualTo')
330
+ },
331
+ {
332
+ name: 'operator.text.neq',
333
+ label: getI18n().t('workflowEditor.process.notEqualTo')
334
+ },
335
+ {
336
+ name: 'operator.text.is.null',
337
+ label: getI18n().t('workflowEditor.process.isNull')
338
+ },
339
+ {
340
+ name: 'operator.text.not.null',
341
+ label: getI18n().t('workflowEditor.process.isNotNull')
342
+ }
343
+ ]
344
+ }
345
+ } else {
346
+ return [
347
+ {
348
+ name: 'operator.text.eq',
349
+ label: getI18n().t('workflowEditor.process.beEqualTo')
350
+ },
351
+ {
352
+ name: 'operator.text.neq',
353
+ label: getI18n().t('workflowEditor.process.notEqualTo')
354
+ }
355
+ ]
356
+ }
357
+ }
358
+ }
359
+ export default utiljs