@jiangood/springboot-admin-starter 0.0.2 → 0.0.4

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 (266) hide show
  1. package/config/dist/config.js +32 -0
  2. package/config/dist/index.js +0 -1
  3. package/config/dist/plugins/form-plugin.js +2 -2
  4. package/package.json +12 -10
  5. package/src/forms/demoForm.jsx +5 -5
  6. package/src/framework/components/DownloadFileButton.jsx +2 -2
  7. package/src/framework/components/Ellipsis.jsx +2 -2
  8. package/src/framework/components/LinkButton.d.ts +4 -4
  9. package/src/framework/components/LinkButton.jsx +6 -9
  10. package/src/framework/components/Page/index.jsx +2 -2
  11. package/src/framework/components/PageLoading.tsx +27 -0
  12. package/src/framework/components/ProTable/components/ToolBar/index.jsx +6 -7
  13. package/src/framework/components/ProTable/index.d.ts +5 -1
  14. package/src/framework/components/ProTable/index.jsx +4 -6
  15. package/src/framework/components/ProTable/index.less +0 -1
  16. package/src/framework/components/ValueType/registry.jsx +9 -20
  17. package/src/framework/components/{index.js → index.ts} +2 -10
  18. package/src/framework/components/system/ButtonList.jsx +35 -0
  19. package/src/framework/components/system/HasPerm.tsx +14 -0
  20. package/src/framework/components/system/index.tsx +29 -0
  21. package/src/framework/components/view/ViewBooleanEnableDisable.tsx +20 -0
  22. package/src/framework/components/view/ViewEllipsis.jsx +2 -2
  23. package/src/framework/components/view/ViewFile.jsx +1 -2
  24. package/src/framework/components/view/ViewImage.jsx +2 -3
  25. package/src/framework/components/view/ViewText.tsx +16 -0
  26. package/src/framework/components/view/{index.js → index.ts} +0 -2
  27. package/src/framework/field-components/FieldBoolean.d.ts +13 -0
  28. package/src/framework/field-components/FieldBoolean.jsx +76 -0
  29. package/src/framework/field-components/FieldDate.d.ts +25 -0
  30. package/src/framework/field-components/FieldDate.jsx +109 -0
  31. package/src/framework/field-components/FieldDateRange.d.ts +6 -0
  32. package/src/framework/field-components/FieldDateRange.jsx +101 -0
  33. package/src/framework/field-components/FieldDictSelect.d.ts +13 -0
  34. package/src/framework/field-components/FieldDictSelect.jsx +16 -0
  35. package/src/framework/field-components/FieldEditor.d.ts +10 -0
  36. package/src/framework/field-components/FieldEditor.jsx +58 -0
  37. package/src/framework/field-components/FieldPercent.d.ts +12 -0
  38. package/src/framework/field-components/FieldPercent.jsx +27 -0
  39. package/src/framework/field-components/FieldRemoteSelect.d.ts +13 -0
  40. package/src/framework/field-components/FieldRemoteSelect.jsx +87 -0
  41. package/src/framework/field-components/FieldRemoteSelectMultiple.d.ts +13 -0
  42. package/src/framework/field-components/FieldRemoteSelectMultiple.jsx +86 -0
  43. package/src/framework/field-components/FieldRemoteSelectMultipleInline.d.ts +20 -0
  44. package/src/framework/field-components/FieldRemoteSelectMultipleInline.jsx +86 -0
  45. package/src/framework/field-components/FieldRemoteTree.d.ts +21 -0
  46. package/src/framework/field-components/FieldRemoteTree.jsx +45 -0
  47. package/src/framework/field-components/FieldRemoteTreeCascader.d.ts +23 -0
  48. package/src/framework/field-components/FieldRemoteTreeCascader.jsx +61 -0
  49. package/src/framework/field-components/FieldRemoteTreeSelect.d.ts +17 -0
  50. package/src/framework/field-components/FieldRemoteTreeSelect.jsx +67 -0
  51. package/src/framework/field-components/FieldRemoteTreeSelectMultiple.d.ts +17 -0
  52. package/src/framework/field-components/FieldRemoteTreeSelectMultiple.jsx +68 -0
  53. package/src/framework/field-components/FieldSysOrgTree.d.ts +12 -0
  54. package/src/framework/field-components/FieldSysOrgTree.jsx +23 -0
  55. package/src/framework/field-components/FieldSysOrgTreeSelect.d.ts +12 -0
  56. package/src/framework/field-components/FieldSysOrgTreeSelect.jsx +23 -0
  57. package/src/framework/{components/field/FieldEditTable/index.d.ts → field-components/FieldTable.d.ts} +5 -2
  58. package/src/framework/{components/field/FieldEditTable/index.jsx → field-components/FieldTable.jsx} +29 -21
  59. package/src/framework/{components/field/select/FieldTableSelect/index.d.ts → field-components/FieldTableSelect.d.ts} +4 -14
  60. package/src/framework/field-components/FieldTableSelect.jsx +59 -0
  61. package/src/framework/{components/field/upload → field-components}/FieldUploadFile.d.ts +0 -1
  62. package/src/framework/{components/field/upload → field-components}/FieldUploadFile.jsx +5 -9
  63. package/src/framework/field-components/index.ts +20 -0
  64. package/src/framework/{components/OrgTree.jsx → field-components/system/OrgTree.tsx} +8 -7
  65. package/src/framework/{components/RoleTree.jsx → field-components/system/RoleTree.tsx} +3 -3
  66. package/src/framework/field-components/system/index.ts +2 -0
  67. package/src/framework/index.ts +4 -0
  68. package/src/framework/utils/ArrUtils.ts +229 -0
  69. package/src/framework/utils/ColorsUtils.ts +378 -0
  70. package/src/framework/utils/{date.js → DateUtils.ts} +69 -69
  71. package/src/framework/utils/DeviceUtils.ts +46 -0
  72. package/src/framework/utils/DomUtils.ts +50 -0
  73. package/src/framework/utils/EventBusUtils.ts +143 -0
  74. package/src/framework/utils/MessageUtils.tsx +182 -0
  75. package/src/framework/utils/ObjectUtils.ts +113 -0
  76. package/src/framework/utils/StorageUtils.ts +67 -0
  77. package/src/framework/utils/StringUtils.ts +410 -0
  78. package/src/framework/utils/TreeUtils.ts +248 -0
  79. package/src/framework/utils/UrlUtils.ts +152 -0
  80. package/src/framework/utils/UuidUtils.ts +88 -0
  81. package/src/framework/utils/ValidateUtils.ts +28 -0
  82. package/src/framework/utils/index.ts +16 -0
  83. package/src/framework/utils/system/DictUtils.ts +97 -0
  84. package/src/framework/utils/system/FormRegistryUtils.ts +77 -0
  85. package/src/framework/utils/system/HttpUtils.ts +246 -0
  86. package/src/framework/utils/system/PageUtils.ts +153 -0
  87. package/src/framework/utils/system/PermUtils.ts +79 -0
  88. package/src/framework/utils/system/SysUtils.ts +97 -0
  89. package/src/framework/utils/system/ThemeUtils.ts +27 -0
  90. package/src/framework/utils/system/index.ts +7 -0
  91. package/src/framework/view-components/ViewBoolean.jsx +4 -0
  92. package/src/framework/view-components/index.js +3 -0
  93. package/src/layouts/PageRender.jsx +2 -2
  94. package/src/layouts/admin/HeaderRight.jsx +9 -9
  95. package/src/layouts/admin/TabPageRender.jsx +2 -2
  96. package/src/layouts/admin/index.jsx +27 -40
  97. package/src/layouts/admin/index.less +2 -1
  98. package/src/layouts/index.jsx +30 -38
  99. package/src/layouts/index.less +0 -21
  100. package/src/loading.jsx +2 -2
  101. package/src/{components → pages/flowable}/InstanceInfo.jsx +5 -4
  102. package/src/pages/flowable/design/customTranslate/customTranslate.js +16 -0
  103. package/src/pages/flowable/design/customTranslate/translations-properties-panel.js +10 -0
  104. package/src/pages/flowable/design/customTranslate/translations.js +144 -0
  105. package/src/pages/flowable/design/descriptors/flowable.json +1109 -0
  106. package/src/pages/flowable/design/index.jsx +61 -234
  107. package/src/pages/flowable/design/provider/FlowablePropertiesProvider.js +75 -0
  108. package/src/pages/flowable/design/provider/index.js +6 -0
  109. package/src/pages/flowable/design/provider/properties/ConditionDesign.jsx +175 -0
  110. package/src/pages/flowable/design/provider/properties/ConditionProps.jsx +76 -0
  111. package/src/pages/flowable/design/provider/properties/DelegateExpressionProps.js +54 -0
  112. package/src/pages/flowable/design/provider/properties/FormProps.js +55 -0
  113. package/src/pages/flowable/design/provider/properties/MultiInstanceProps.js +100 -0
  114. package/src/pages/flowable/design/provider/properties/UserTaskForm.jsx +48 -0
  115. package/src/pages/flowable/design/provider/properties/utils.jsx +35 -0
  116. package/src/pages/flowable/index.jsx +28 -69
  117. package/src/pages/flowable/monitor/definition.jsx +87 -0
  118. package/src/pages/flowable/monitor/instance/index.jsx +177 -0
  119. package/src/pages/flowable/monitor/instance/view.jsx +102 -0
  120. package/src/pages/flowable/monitor/task.jsx +93 -0
  121. package/src/pages/flowable/task/form.jsx +5 -5
  122. package/src/pages/flowable/task/index.jsx +5 -5
  123. package/src/pages/flowable/test/index.jsx +13 -10
  124. package/src/pages/index.jsx +8 -13
  125. package/src/pages/login.jsx +8 -8
  126. package/src/pages/{api/doc.jsx → system/api/ApiDoc.jsx} +56 -47
  127. package/src/pages/system/api/index.jsx +268 -0
  128. package/src/pages/system/api/perm.jsx +69 -0
  129. package/src/pages/system/config/index.jsx +3 -3
  130. package/src/pages/system/dict/Dict.jsx +2 -3
  131. package/src/pages/system/dict/DictItem.jsx +5 -5
  132. package/src/pages/system/file/index.jsx +13 -5
  133. package/src/pages/{job → system/job}/index.jsx +124 -39
  134. package/src/pages/system/log/index.jsx +3 -3
  135. package/src/pages/system/org/index.jsx +11 -12
  136. package/src/pages/system/role/index.jsx +11 -11
  137. package/src/pages/system/role/perm.jsx +8 -8
  138. package/src/pages/system/sysManual/index.jsx +6 -6
  139. package/src/pages/system/user/UserPerm.jsx +7 -42
  140. package/src/pages/system/user/index.jsx +13 -17
  141. package/src/pages/test.jsx +188 -3
  142. package/src/pages/ureport/index.jsx +4 -4
  143. package/src/pages/userCenter/ChangePassword.jsx +3 -4
  144. package/src/pages/userCenter/index.jsx +2 -2
  145. package/src/pages/userCenter/manual.jsx +3 -7
  146. package/src/pages/userCenter/message.jsx +5 -5
  147. package/config/dist/config.local.js +0 -23
  148. package/src/components/InstanceStatusInfo.jsx +0 -79
  149. package/src/components/StreamLog.jsx +0 -27
  150. package/src/components/flow/BpmnUtils.js +0 -85
  151. package/src/components/flow/customTranslate/customTranslate.js +0 -19
  152. package/src/components/flow/customTranslate/translations.js +0 -79
  153. package/src/components/flow/design/form/ConditionForm.jsx +0 -316
  154. package/src/components/flow/design/form/ServiceTaskForm.jsx +0 -55
  155. package/src/components/flow/design/form/TimerEventDefinitionForm.jsx +0 -62
  156. package/src/components/flow/design/form/UserTaskForm.jsx +0 -211
  157. package/src/components/flow/design/palette.js +0 -39
  158. package/src/components/monitor/AllDefinition.jsx +0 -46
  159. package/src/components/monitor/AllInstance.jsx +0 -76
  160. package/src/forms/driverForm.jsx +0 -18
  161. package/src/framework/components/ButtonList.jsx +0 -91
  162. package/src/framework/components/Echarts/index.d.ts +0 -10
  163. package/src/framework/components/Echarts/index.jsx +0 -49
  164. package/src/framework/components/EditTable/index.d.ts +0 -11
  165. package/src/framework/components/EditTable/index.jsx +0 -85
  166. package/src/framework/components/FieldRemoteTree.jsx +0 -20
  167. package/src/framework/components/HasPerm.jsx +0 -18
  168. package/src/framework/components/ImageView.d.ts +0 -12
  169. package/src/framework/components/ImageView.jsx +0 -64
  170. package/src/framework/components/MsgBox.jsx +0 -180
  171. package/src/framework/components/PageLoading.jsx +0 -31
  172. package/src/framework/components/Panel/index.d.ts +0 -11
  173. package/src/framework/components/Panel/index.jsx +0 -24
  174. package/src/framework/components/Panel/index.less +0 -0
  175. package/src/framework/components/field/FieldAutoTime/index.tsx +0 -46
  176. package/src/framework/components/field/FieldBoolean/index.tsx +0 -92
  177. package/src/framework/components/field/FieldEditTable/index.less +0 -29
  178. package/src/framework/components/field/FieldEditor.jsx +0 -48
  179. package/src/framework/components/field/FieldFileBase64/index.d.ts +0 -15
  180. package/src/framework/components/field/FieldFileBase64/index.jsx +0 -23
  181. package/src/framework/components/field/FieldImageBase64/index.d.ts +0 -15
  182. package/src/framework/components/field/FieldImageBase64/index.jsx +0 -22
  183. package/src/framework/components/field/FieldInput.jsx +0 -13
  184. package/src/framework/components/field/FieldOrgTree/index.tsx +0 -45
  185. package/src/framework/components/field/FieldPassword.jsx +0 -11
  186. package/src/framework/components/field/FieldProps.ts +0 -19
  187. package/src/framework/components/field/FieldRemoteTreeCascader.jsx +0 -75
  188. package/src/framework/components/field/FieldRemoteTreeCheckable.jsx +0 -81
  189. package/src/framework/components/field/FieldRemoteTreeMultipleSelect.jsx +0 -100
  190. package/src/framework/components/field/FieldRemoteTreeSelect.jsx +0 -82
  191. package/src/framework/components/field/FieldSelectPosition/index.tsx +0 -85
  192. package/src/framework/components/field/FieldTree.jsx +0 -45
  193. package/src/framework/components/field/dict/index.tsx +0 -110
  194. package/src/framework/components/field/flat-multiple-select/index.d.ts +0 -4
  195. package/src/framework/components/field/flat-multiple-select/index.jsx +0 -116
  196. package/src/framework/components/field/flat-multiple-select/index.less +0 -12
  197. package/src/framework/components/field/flat-select/index.d.ts +0 -4
  198. package/src/framework/components/field/flat-select/index.jsx +0 -107
  199. package/src/framework/components/field/flat-select/index.less +0 -12
  200. package/src/framework/components/field/index.js +0 -33
  201. package/src/framework/components/field/input-number-percent/index.d.ts +0 -11
  202. package/src/framework/components/field/input-number-percent/index.jsx +0 -28
  203. package/src/framework/components/field/select/FieldSelect/index.d.ts +0 -39
  204. package/src/framework/components/field/select/FieldSelect/index.jsx +0 -156
  205. package/src/framework/components/field/select/FieldTableSelect/index.jsx +0 -155
  206. package/src/framework/components/field/select/index.jsx +0 -2
  207. package/src/framework/components/field/switch-y-n/index.d.ts +0 -11
  208. package/src/framework/components/field/switch-y-n/index.jsx +0 -31
  209. package/src/framework/components/field/text/index.tsx +0 -7
  210. package/src/framework/components/field/time/DatePickerString.tsx +0 -37
  211. package/src/framework/components/field/time/DateTimePickerString.tsx +0 -42
  212. package/src/framework/components/field/time/FieldDateRange.d.ts +0 -9
  213. package/src/framework/components/field/time/FieldDateRange.jsx +0 -49
  214. package/src/framework/components/field/time/HHmmPickerString.tsx +0 -42
  215. package/src/framework/components/field/time/MonthPickerString.tsx +0 -45
  216. package/src/framework/components/field/time/TimePickerTool.ts +0 -14
  217. package/src/framework/components/field/time/YearPickerString.tsx +0 -41
  218. package/src/framework/components/field/time/YearQuarterString.tsx +0 -38
  219. package/src/framework/components/field/time/index.tsx +0 -7
  220. package/src/framework/components/field/upload/FieldUploadCropImage/index.d.ts +0 -22
  221. package/src/framework/components/field/upload/FieldUploadCropImage/index.jsx +0 -11
  222. package/src/framework/components/field/upload/FieldUploadImage.d.ts +0 -7
  223. package/src/framework/components/field/upload/FieldUploadImage.jsx +0 -16
  224. package/src/framework/components/field/upload/index.jsx +0 -3
  225. package/src/framework/components/system.jsx +0 -29
  226. package/src/framework/components/view/ViewBoolean.jsx +0 -15
  227. package/src/framework/components/view/ViewBooleanEnableDisable.jsx +0 -16
  228. package/src/framework/components/view/ViewText.jsx +0 -9
  229. package/src/framework/index.js +0 -3
  230. package/src/framework/system/dict.js +0 -88
  231. package/src/framework/system/formRegistry.js +0 -58
  232. package/src/framework/system/http.jsx +0 -290
  233. package/src/framework/system/index.js +0 -13
  234. package/src/framework/system/page.js +0 -109
  235. package/src/framework/system/permission.js +0 -44
  236. package/src/framework/system/sys.js +0 -60
  237. package/src/framework/system/theme.js +0 -17
  238. package/src/framework/utils/arr.js +0 -118
  239. package/src/framework/utils/browser.js +0 -24
  240. package/src/framework/utils/color.js +0 -269
  241. package/src/framework/utils/debounce.js +0 -33
  242. package/src/framework/utils/dom.js +0 -16
  243. package/src/framework/utils/eventBus.js +0 -70
  244. package/src/framework/utils/html.js +0 -13
  245. package/src/framework/utils/index.js +0 -17
  246. package/src/framework/utils/obj.js +0 -72
  247. package/src/framework/utils/storage.js +0 -37
  248. package/src/framework/utils/str.js +0 -297
  249. package/src/framework/utils/tree.js +0 -175
  250. package/src/framework/utils/uid.js +0 -76
  251. package/src/framework/utils/url.js +0 -84
  252. package/src/framework/utils/validate.js +0 -9
  253. package/src/pages/api/accessLog/index.jsx +0 -108
  254. package/src/pages/api/accountResource/index.jsx +0 -149
  255. package/src/pages/api/index.jsx +0 -163
  256. package/src/pages/api/resource.jsx +0 -18
  257. package/src/pages/flowable/instance/view.jsx +0 -13
  258. package/src/pages/flowable/monitor.jsx +0 -106
  259. package/src/pages/flowable/test/form.jsx +0 -31
  260. package/src/pages/job/logList.jsx +0 -100
  261. package/src/pages/job/status.jsx +0 -84
  262. /package/src/framework/components/{ButtonList.d.ts → system/ButtonList.d.ts} +0 -0
  263. /package/src/framework/{components/EditTable/index.less → field-components/FieldTable.less} +0 -0
  264. /package/src/framework/{components/view → view-components}/ViewPassword.jsx +0 -0
  265. /package/src/{index.js → index.ts} +0 -0
  266. /package/src/{components/flow → pages/flowable}/design/contextPad.js +0 -0
@@ -1,85 +0,0 @@
1
- function removeProperty(businessObject, key) {
2
- delete businessObject.$attrs[key];
3
- }
4
-
5
- function removeAllProperty(businessObject) {
6
- const keys = Object.keys(businessObject.$attrs);
7
- keys.forEach((key) => {
8
- delete businessObject.$attrs[key];
9
- });
10
- }
11
-
12
- function setProperty(businessObject, key, value) {
13
- if (value == null || value == '') {
14
- removeProperty(businessObject, key);
15
- } else {
16
- businessObject.set(key, value);
17
- }
18
- }
19
-
20
- // modeling.updateModdleProperties 没有处理空值
21
- function setProperties(businessObject, values) {
22
- for (let k in values) {
23
- let v = values[k];
24
- setProperty(businessObject, k, v);
25
- }
26
- }
27
-
28
- export default class BpmnUtils {
29
- constructor({ modeler, modeling }) {
30
- this.modeling = modeling;
31
- this.modeler = modeler;
32
- }
33
-
34
- modeler = null;
35
- modeling = null;
36
-
37
- static getFormValues(bo) {
38
- let attrs = bo.$attrs;
39
-
40
- const data = {};
41
- for (let k in attrs) {
42
- data[k.replace('flowable:', '')] = attrs[k];
43
- }
44
-
45
- return data;
46
- }
47
-
48
- static setFormValues(businessObject, formValues) {
49
- const data = {};
50
- for (let k in formValues) {
51
- const v = formValues[k];
52
- data['flowable:' + k] = v;
53
- }
54
-
55
- //清空原有属性
56
- removeAllProperty(businessObject);
57
- setProperties(businessObject, data);
58
- }
59
-
60
- getElementById(id) {
61
- const elementRegistry = this.modeler.get('elementRegistry');
62
- return elementRegistry.get(id);
63
- }
64
-
65
- static removeProperty = removeProperty;
66
-
67
- static setDocumentation = (modeler, element, text) => {
68
- const modeling = modeler.get('modeling');
69
- const moddle = modeler.get('moddle');
70
-
71
- var doc = moddle.create('bpmn:Documentation');
72
- doc.text = text;
73
-
74
- modeling.updateProperties(element, { documentation: [doc] });
75
- };
76
-
77
- static getDocumentation(bo) {
78
- if (bo.documentation && bo.documentation.length > 0) {
79
- return bo.documentation[0].text;
80
- }
81
- }
82
- static removeDocumentation(modeler, element, text) {
83
- modeling.updateProperties(element, { documentation: null });
84
- }
85
- }
@@ -1,19 +0,0 @@
1
- import translations from './translations';
2
-
3
- export default function customTranslate(template, replacements) {
4
- replacements = replacements || {};
5
-
6
- // Translate
7
- let result = translations[template];
8
- if (result == null) {
9
- console.log('没有翻译', template);
10
- return template;
11
- }
12
-
13
- // 替换变量
14
- result = result.replace(/{([^}]+)}/g, function (_, key) {
15
- return replacements[key] || '{' + key + '}';
16
- });
17
-
18
- return result;
19
- }
@@ -1,79 +0,0 @@
1
- /**
2
- * This is a sample file that should be replaced with the actual translation.
3
- *
4
- * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available
5
- * translations and labels to translate.
6
- */
7
- export default {
8
- 'Create Task': '创建任务',
9
- 'Exclusive Gateway': '互斥网关',
10
- 'Parallel Gateway': '并行网关',
11
- 'Inclusive Gateway': '包容网关',
12
- 'Complex Gateway': '复杂网关',
13
- 'Event based Gateway': '事件网关',
14
- 'Message Start Event': '消息启动事件',
15
- 'Timer Start Event': '定时启动事件',
16
- 'Conditional Start Event': '条件启动事件',
17
- 'Signal Start Event': '信号启动事件',
18
- 'Error Start Event': '错误启动事件',
19
- 'Escalation Start Event': '升级启动事件',
20
- 'Compensation Start Event': '补偿启动事件',
21
- 'Message Start Event (non-interrupting)': '消息启动事件 (非中断)',
22
- 'Timer Start Event (non-interrupting)': '定时启动事件 (非中断)',
23
- 'Conditional Start Event (non-interrupting)': '条件启动事件 (非中断)',
24
- 'Signal Start Event (non-interrupting)': '信号启动事件 (非中断)',
25
- 'Escalation Start Event (non-interrupting)': '升级启动事件 (非中断)',
26
- 'Default Flow': '默认分支',
27
- 'Sequence Flow': '普通分支',
28
- 'Conditional Flow': '条件分支',
29
- Remove: '删除',
30
- 'Change type': '修改类型',
31
- 'Activate the hand tool': '激活手动工具',
32
- 'Activate the global connect tool': '激活全局连接工具',
33
- 'Append User Task': '追加审批任务',
34
- 'Append Gateway': '追加条件网管',
35
- 'End Event': '结束事件',
36
- 'Append {type}': '追加类型{type}',
37
- 'Append EndEvent': '追加结束事件',
38
- 'Append Task': '追加任务',
39
- 'Create Group': '创建分组',
40
-
41
- 'Activate the lasso tool': '激活连接工具',
42
- 'Activate the create/remove space tool': '激活创建/删除空间工具',
43
- 'Create StartEvent': '创建开始事件',
44
- 'Create Intermediate/Boundary Event': '创建边界事件',
45
- 'Create EndEvent': '创建结束事件',
46
- 'Create Gateway': '创建网关',
47
- 'Create DataObjectReference': '创建对象引用?',
48
- 'Create DataStoreReference': '创建对象存储引用',
49
- 'Create expanded SubProcess': '创建子流程',
50
- 'Create Pool/Participant': '创建泳道',
51
-
52
- 'Append Intermediate/Boundary Event': '追加泳道',
53
- 'Intermediate Throw Event': '中间抛出事件',
54
- 'Connect using Sequence/MessageFlow or Association': '连线',
55
-
56
- 'Receive Task': '接收任务',
57
- 'Send Task': '发送任务',
58
- 'User Task': '用户任务(审核,处理)',
59
- 'Manual Task': '手动任务',
60
- 'Business Rule Task': '业务规则任务',
61
- 'Service Task': '服务任务',
62
- 'Script Task': '脚本任务',
63
- 'Call Activity': '拨打任务',
64
- 'Sub Process (collapsed)': '子流程收缩',
65
- 'Sub Process (expanded)': '子流程展开',
66
- 'Parallel Multi Instance': '并行多实例',
67
- 'Sequential Multi Instance': '串行多实例',
68
- Loop: '循环',
69
-
70
- 'Start Event': '开始事件',
71
- 'Message End Event': '消息结束事件',
72
- 'Escalation End Event': 'Escalation End Event',
73
- 'Error End Event': '异常结束事件',
74
- 'Compensation End Event': 'Compensation End Event',
75
- 'Signal End Event': '信号结束事件',
76
- 'Terminate End Event': '终止结束事件',
77
-
78
- Task: '普通任务',
79
- };
@@ -1,316 +0,0 @@
1
- import React from 'react';
2
- import {Button, Form, Input, InputNumber, message, Radio, Table} from 'antd';
3
- import {DeleteOutlined, PlusOutlined} from '@ant-design/icons';
4
- import {ArrUtil, ProModal} from "../../../../framework";
5
-
6
- /**
7
- * 条件表单
8
- * onFinish
9
- *
10
- */
11
-
12
-
13
- const PREFIX = 'flowable:';
14
-
15
-
16
- const metaInfo = {
17
- text: {
18
- ops: {
19
- '==': '等于',
20
- '!=': '不等于',
21
- contains: '包含',
22
- '!contains': '不包含',
23
- startWith: '开头等于',
24
- endWith: '结尾等于',
25
- },
26
- render() {
27
- return <Input />;
28
- },
29
- },
30
- digit: {
31
- ops: {
32
- '==': '等于',
33
- '!=': '不等于',
34
- '>': '大于',
35
- '<': '小于',
36
- '>=': '大于等于',
37
- '<=': '小于等于',
38
- between: '介于',
39
- },
40
- render(op) {
41
- if (op != 'between') return <InputNumber />;
42
-
43
- return (
44
- <Input.Group>
45
- <InputNumber placeholder="最小值"></InputNumber>
46
- <InputNumber placeholder="最大值"></InputNumber>
47
- </Input.Group>
48
- );
49
- },
50
- },
51
- boolean: {
52
- ops: {
53
- '==': '等于',
54
- },
55
- render() {
56
- return <InputNumber />;
57
- },
58
- },
59
- };
60
-
61
- export default class extends React.Component {
62
-
63
- constructor(props) {
64
- super(props);
65
-
66
-
67
-
68
-
69
-
70
- let conditionList = this.props.bo.get('flowable:conditionList');
71
- conditionList = conditionList ? JSON.parse(conditionList) : []
72
- this.state.conditionList = conditionList;
73
- this.state.expression = this.createExpression(conditionList)
74
- }
75
-
76
- state = {
77
- expression: null,
78
- conditionList:[],
79
- modalForm: {
80
- key: null,
81
- keyLabel: null,
82
-
83
- valueType: null,
84
-
85
- op: null,
86
- opLabel: null,
87
-
88
- value: null,
89
- valueLabel: null,
90
- },
91
- };
92
-
93
- addRef = React.createRef();
94
-
95
- add = () => {
96
- this.setState({ modalForm: {} });
97
- this.addRef.current.show();
98
- };
99
-
100
- handleAdd = (values) => {
101
- const { modalForm } = this.state;
102
- const { conditionList } = this.state;
103
- modalForm.value = values.value;
104
- conditionList.push(modalForm);
105
- this.save(conditionList);
106
- this.addRef.current.close();
107
- };
108
-
109
- handleDelete = (item) => {
110
- let { conditionList } = this.state;
111
-
112
- ArrUtil.remove(conditionList, item)
113
- this.save(conditionList);
114
- };
115
-
116
- save = (conditionList) => {
117
- const expression = this.createExpression(conditionList);
118
-
119
- this.setState({ conditionList, expression }, ()=>this.setNodeLabel());
120
- this.setConditionData(expression, conditionList);
121
- };
122
-
123
- createExpression(conditionList) {
124
- const expressionList = [];
125
- conditionList.forEach((i) => {
126
- expressionList.push(this.createExpressionByCondition(i));
127
- });
128
- const expression = expressionList.join('&&');
129
-
130
- console.log('条件表达式', expression);
131
-
132
- return expression;
133
- }
134
-
135
- /**
136
- * 创建表达式
137
- * key: "days"
138
- * keyLabel: "请假天数"
139
- * op: "=="
140
- * opLabel: "等于"
141
- * value: 34
142
- * valueType: "digit", "text"
143
- *
144
- * @param i
145
- * @returns {*}
146
- */
147
- createExpressionByCondition(condition) {
148
- const { key, op, value, valueType } = condition;
149
- switch (valueType) {
150
- case 'digit':
151
- return key + op + value;
152
- case 'text':
153
- if (op === 'contains') {
154
- return key + ".contains('" + value + "')";
155
- }
156
- if (op === '!contains') {
157
- return '!' + key + ".contains('" + value + "')";
158
- }
159
- return key + op + "'" + value + "'";
160
- default:
161
- throw new Error('未知类型' + valueType);
162
- }
163
- }
164
-
165
- columns = [
166
- {
167
- dataIndex: 'key',
168
- title: '名',
169
- render(_, r) {
170
- return r.keyLabel;
171
- },
172
- },
173
- {
174
- dataIndex: 'opLabel',
175
- title: '操作',
176
- },
177
- {
178
- dataIndex: 'value',
179
- title: '值',
180
- render(_, r) {
181
- if (r.valueLabel != null) {
182
- return r.valueLabel;
183
- }
184
- return r.value;
185
- },
186
- },
187
- {
188
- dataIndex: 'option',
189
- title: '-',
190
- render: (_, record) => (
191
- <a onClick={() => this.handleDelete(record)}>
192
- <DeleteOutlined />
193
- </a>
194
- ),
195
- },
196
- ];
197
-
198
- setConditionData = (expression, conditionList) => {
199
- if (expression != null && expression != '') {
200
- expression = '${' + expression + '}'
201
- }
202
-
203
- // 设置标准条件表达式
204
- const conditionExpression = this.props.moddle.create('bpmn:FormalExpression', {body: expression});
205
-
206
- this.props.modeling.updateProperties(this.props.node, {conditionExpression: conditionExpression});
207
-
208
- // 保存条件列表 (最总存在xml中)
209
- this.props.bo.set('flowable:conditionList', JSON.stringify(conditionList))
210
- message.success("设置成功")
211
- }
212
-
213
- render() {
214
- const { conditionVariable } = this.props;
215
-
216
- if (conditionVariable == null || conditionVariable.length == 0) {
217
- return '未设置条件变量,需在后台XML';
218
- }
219
-
220
- const { modalForm } = this.state;
221
- let { conditionList } = this.state;
222
-
223
- let { valueType, op, opLabel, value } = modalForm;
224
-
225
- const meta = metaInfo[valueType];
226
-
227
- conditionList = JSON.parse(JSON.stringify(conditionList)); // 这样才能触发dataSource变化
228
-
229
- return (
230
- <>
231
- <Button type="primary" onClick={this.add} icon={<PlusOutlined />}>
232
- 添加条件
233
- </Button>
234
- <div className="q-my-sm" />
235
- <Table
236
- dataSource={conditionList}
237
- columns={this.columns}
238
- pagination={false}
239
- size="small"
240
- bordered
241
- rowKey="key"
242
- ></Table>
243
-
244
-
245
- <div className="q-my-md"></div>
246
-
247
- <div>条件表达式: {this.state.expression}</div>
248
- <div className="q-my-md"></div>
249
-
250
-
251
- <ProModal actionRef={this.addRef} title="添加条件">
252
- <Form onFinish={this.handleAdd} layout="vertical">
253
- <Form.Item name="item" label="数据" rules={[{ required: true }]}>
254
- <Radio.Group
255
- onChange={(e) => {
256
- const form = {
257
- key: e.target.value.name,
258
- keyLabel: e.target.value.label,
259
- valueType: e.target.value.valueType,
260
- };
261
- this.setState({ modalForm: form });
262
- }}
263
- >
264
- {conditionVariable.map((v) => (
265
- <Radio key={v.name} name={v.name} value={v}>
266
- {v.label}
267
- </Radio>
268
- ))}
269
- </Radio.Group>
270
- </Form.Item>
271
-
272
- {meta && (
273
- <Form.Item name="op" label="符号" rules={[{ required: true }]}>
274
- <Radio.Group
275
- onChange={(e) => {
276
- op = e.target.value;
277
- opLabel = meta.ops[op];
278
- if (value != null && (op == 'between' || value.indexOf(' - ') >= 0)) {
279
- value = null;
280
- }
281
- modalForm.op = op;
282
- modalForm.opLabel = opLabel;
283
- modalForm.value = value;
284
- this.setState({ modalForm });
285
- }}
286
- >
287
- {Object.keys(meta.ops).map((k) => {
288
- const kv = {
289
- key: k,
290
- value: meta.ops[k],
291
- };
292
- return (
293
- <Radio key={k} value={k}>
294
- {kv.value}
295
- </Radio>
296
- );
297
- })}
298
- </Radio.Group>
299
- </Form.Item>
300
- )}
301
-
302
- {meta && (
303
- <Form.Item name="value" label="值" rules={[{ required: true }]}>
304
- {meta.render(op)}
305
- </Form.Item>
306
- )}
307
-
308
- <Button type="primary" htmlType="submit">
309
- 确定
310
- </Button>
311
- </Form>
312
- </ProModal>
313
- </>
314
- );
315
- }
316
- }
@@ -1,55 +0,0 @@
1
- import React from 'react';
2
- import {Form, Select} from 'antd';
3
- import {HttpUtil} from "../../../../framework";
4
-
5
- export default class extends React.Component {
6
- bo = null;
7
-
8
- state = {
9
- data: {},
10
-
11
- selectOptions: [],
12
-
13
- javaDelegateOptions:[]
14
- }
15
-
16
- constructor(props) {
17
- super(props);
18
- this.bo = props.bo;
19
-
20
- const data = {};
21
- data['flowable:delegateExpression'] = this.bo.get('flowable:delegateExpression');
22
- this.state.data = data;
23
- }
24
-
25
- componentDidMount() {
26
- HttpUtil.get('admin/flowable/model/javaDelegateOptions').then(rs=>{
27
- this.setState({javaDelegateOptions:rs})
28
-
29
- })
30
- }
31
-
32
- onValuesChange = (changedValue) => {
33
- for (let key in changedValue) {
34
- this.bo.set(key, changedValue[key]);
35
- }
36
- };
37
-
38
- render() {
39
- return (
40
- <div>
41
- <Form
42
- onValuesChange={this.onValuesChange}
43
- initialValues={this.state.data}
44
- layout={'vertical'}
45
- >
46
-
47
-
48
- <Form.Item label="监听类(表达式)" name="flowable:delegateExpression" extra="需实现JavaDelegate接口">
49
- <Select options={this.state.javaDelegateOptions} ></Select>
50
- </Form.Item>
51
- </Form>
52
- </div>
53
- );
54
- }
55
- }
@@ -1,62 +0,0 @@
1
- import React from 'react';
2
- import {Form, Input} from 'antd';
3
-
4
- export default class TimerEventDefinitionForm extends React.Component {
5
- bo = null;
6
-
7
- state = {
8
- data: {},
9
- };
10
-
11
- constructor(props) {
12
- super(props);
13
- this.bo = props.bo;
14
-
15
- const data = {};
16
-
17
- this.state.data = data;
18
- }
19
-
20
- onValuesChange = (changedValue) => {};
21
-
22
- render() {
23
- return (
24
- <div>
25
- <a
26
- href="https://docs.camunda.org/manual/7.16/reference/bpmn20/events/timer-events/"
27
- target="_blank"
28
- >
29
- 参考文档1
30
- </a>
31
- &nbsp;
32
- <a
33
- href="https://docs.camunda.io/docs/components/modeler/bpmn/timer-events/"
34
- target="_blank"
35
- >
36
- 参考文档2
37
- </a>
38
- <Form
39
- onValuesChange={this.onValuesChange}
40
- initialValues={this.state.data}
41
- layout={'vertical'}
42
- >
43
- <Form.Item
44
- label="开始时间 timeDate"
45
- name="timeDate"
46
- extra="触发时间 如2019-10-01T12:00:00Z"
47
- >
48
- <Input />
49
- </Form.Item>
50
-
51
- <Form.Item label="持续时间 timeDuration" name="timeDuration" extra="PnYnMnDTnHnMnS">
52
- <Input />
53
- </Form.Item>
54
-
55
- <Form.Item label="循环时间 timeCycle" name="timeCycle" extra="包含持续时间和次数 如PT5M">
56
- <Input />
57
- </Form.Item>
58
- </Form>
59
- </div>
60
- );
61
- }
62
- }