@jiangood/springboot-admin-starter 0.0.3 → 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.
- package/config/dist/config.js +32 -0
- package/config/dist/index.js +0 -1
- package/config/dist/plugins/form-plugin.js +2 -2
- package/package.json +12 -10
- package/src/forms/demoForm.jsx +5 -5
- package/src/framework/components/DownloadFileButton.jsx +2 -2
- package/src/framework/components/Ellipsis.jsx +2 -2
- package/src/framework/components/LinkButton.d.ts +4 -4
- package/src/framework/components/LinkButton.jsx +6 -9
- package/src/framework/components/Page/index.jsx +2 -2
- package/src/framework/components/PageLoading.tsx +27 -0
- package/src/framework/components/ProTable/components/ToolBar/index.jsx +6 -7
- package/src/framework/components/ProTable/index.d.ts +5 -1
- package/src/framework/components/ProTable/index.jsx +4 -6
- package/src/framework/components/ProTable/index.less +0 -1
- package/src/framework/components/ValueType/registry.jsx +9 -20
- package/src/framework/components/{index.js → index.ts} +2 -10
- package/src/framework/components/system/ButtonList.jsx +35 -0
- package/src/framework/components/system/HasPerm.tsx +14 -0
- package/src/framework/components/system/index.tsx +29 -0
- package/src/framework/components/view/ViewBooleanEnableDisable.tsx +20 -0
- package/src/framework/components/view/ViewEllipsis.jsx +2 -2
- package/src/framework/components/view/ViewFile.jsx +1 -2
- package/src/framework/components/view/ViewImage.jsx +2 -3
- package/src/framework/components/view/ViewText.tsx +16 -0
- package/src/framework/components/view/{index.js → index.ts} +0 -2
- package/src/framework/field-components/FieldBoolean.d.ts +13 -0
- package/src/framework/field-components/FieldBoolean.jsx +76 -0
- package/src/framework/field-components/FieldDate.d.ts +25 -0
- package/src/framework/field-components/FieldDate.jsx +109 -0
- package/src/framework/field-components/FieldDateRange.d.ts +6 -0
- package/src/framework/field-components/FieldDateRange.jsx +101 -0
- package/src/framework/field-components/FieldDictSelect.d.ts +13 -0
- package/src/framework/field-components/FieldDictSelect.jsx +16 -0
- package/src/framework/field-components/FieldEditor.d.ts +10 -0
- package/src/framework/field-components/FieldEditor.jsx +58 -0
- package/src/framework/field-components/FieldPercent.d.ts +12 -0
- package/src/framework/field-components/FieldPercent.jsx +27 -0
- package/src/framework/field-components/FieldRemoteSelect.d.ts +13 -0
- package/src/framework/field-components/FieldRemoteSelect.jsx +87 -0
- package/src/framework/field-components/FieldRemoteSelectMultiple.d.ts +13 -0
- package/src/framework/field-components/FieldRemoteSelectMultiple.jsx +86 -0
- package/src/framework/field-components/FieldRemoteSelectMultipleInline.d.ts +20 -0
- package/src/framework/field-components/FieldRemoteSelectMultipleInline.jsx +86 -0
- package/src/framework/field-components/FieldRemoteTree.d.ts +21 -0
- package/src/framework/field-components/FieldRemoteTree.jsx +45 -0
- package/src/framework/field-components/FieldRemoteTreeCascader.d.ts +23 -0
- package/src/framework/field-components/FieldRemoteTreeCascader.jsx +61 -0
- package/src/framework/field-components/FieldRemoteTreeSelect.d.ts +17 -0
- package/src/framework/field-components/FieldRemoteTreeSelect.jsx +67 -0
- package/src/framework/field-components/FieldRemoteTreeSelectMultiple.d.ts +17 -0
- package/src/framework/field-components/FieldRemoteTreeSelectMultiple.jsx +68 -0
- package/src/framework/field-components/FieldSysOrgTree.d.ts +12 -0
- package/src/framework/field-components/FieldSysOrgTree.jsx +23 -0
- package/src/framework/field-components/FieldSysOrgTreeSelect.d.ts +12 -0
- package/src/framework/field-components/FieldSysOrgTreeSelect.jsx +23 -0
- package/src/framework/{components/field/FieldEditTable/index.d.ts → field-components/FieldTable.d.ts} +5 -2
- package/src/framework/{components/field/FieldEditTable/index.jsx → field-components/FieldTable.jsx} +29 -21
- package/src/framework/{components/field/select/FieldTableSelect/index.d.ts → field-components/FieldTableSelect.d.ts} +4 -14
- package/src/framework/field-components/FieldTableSelect.jsx +59 -0
- package/src/framework/{components/field/upload → field-components}/FieldUploadFile.d.ts +0 -1
- package/src/framework/{components/field/upload → field-components}/FieldUploadFile.jsx +5 -9
- package/src/framework/field-components/index.ts +20 -0
- package/src/framework/{components/OrgTree.jsx → field-components/system/OrgTree.tsx} +8 -7
- package/src/framework/{components/RoleTree.jsx → field-components/system/RoleTree.tsx} +3 -3
- package/src/framework/field-components/system/index.ts +2 -0
- package/src/framework/index.ts +4 -0
- package/src/framework/utils/ArrUtils.ts +229 -0
- package/src/framework/utils/ColorsUtils.ts +378 -0
- package/src/framework/utils/{date.js → DateUtils.ts} +69 -69
- package/src/framework/utils/DeviceUtils.ts +46 -0
- package/src/framework/utils/DomUtils.ts +50 -0
- package/src/framework/utils/EventBusUtils.ts +143 -0
- package/src/framework/utils/MessageUtils.tsx +182 -0
- package/src/framework/utils/ObjectUtils.ts +113 -0
- package/src/framework/utils/StorageUtils.ts +67 -0
- package/src/framework/utils/StringUtils.ts +410 -0
- package/src/framework/utils/TreeUtils.ts +248 -0
- package/src/framework/utils/UrlUtils.ts +152 -0
- package/src/framework/utils/UuidUtils.ts +88 -0
- package/src/framework/utils/ValidateUtils.ts +28 -0
- package/src/framework/utils/index.ts +16 -0
- package/src/framework/utils/system/DictUtils.ts +97 -0
- package/src/framework/utils/system/FormRegistryUtils.ts +77 -0
- package/src/framework/utils/system/HttpUtils.ts +246 -0
- package/src/framework/utils/system/PageUtils.ts +153 -0
- package/src/framework/utils/system/PermUtils.ts +79 -0
- package/src/framework/utils/system/SysUtils.ts +97 -0
- package/src/framework/utils/system/ThemeUtils.ts +27 -0
- package/src/framework/utils/system/index.ts +7 -0
- package/src/framework/view-components/ViewBoolean.jsx +4 -0
- package/src/framework/view-components/index.js +3 -0
- package/src/layouts/PageRender.jsx +2 -2
- package/src/layouts/admin/HeaderRight.jsx +9 -9
- package/src/layouts/admin/TabPageRender.jsx +2 -2
- package/src/layouts/admin/index.jsx +27 -40
- package/src/layouts/admin/index.less +2 -1
- package/src/layouts/index.jsx +30 -38
- package/src/layouts/index.less +0 -21
- package/src/loading.jsx +2 -2
- package/src/{components → pages/flowable}/InstanceInfo.jsx +5 -4
- package/src/pages/flowable/design/customTranslate/customTranslate.js +16 -0
- package/src/pages/flowable/design/customTranslate/translations-properties-panel.js +10 -0
- package/src/pages/flowable/design/customTranslate/translations.js +144 -0
- package/src/pages/flowable/design/descriptors/flowable.json +1109 -0
- package/src/pages/flowable/design/index.jsx +61 -234
- package/src/pages/flowable/design/provider/FlowablePropertiesProvider.js +75 -0
- package/src/pages/flowable/design/provider/index.js +6 -0
- package/src/pages/flowable/design/provider/properties/ConditionDesign.jsx +175 -0
- package/src/pages/flowable/design/provider/properties/ConditionProps.jsx +76 -0
- package/src/pages/flowable/design/provider/properties/DelegateExpressionProps.js +54 -0
- package/src/pages/flowable/design/provider/properties/FormProps.js +55 -0
- package/src/pages/flowable/design/provider/properties/MultiInstanceProps.js +100 -0
- package/src/pages/flowable/design/provider/properties/UserTaskForm.jsx +48 -0
- package/src/pages/flowable/design/provider/properties/utils.jsx +35 -0
- package/src/pages/flowable/index.jsx +28 -69
- package/src/pages/flowable/monitor/definition.jsx +87 -0
- package/src/pages/flowable/monitor/instance/index.jsx +177 -0
- package/src/pages/flowable/monitor/instance/view.jsx +102 -0
- package/src/pages/flowable/monitor/task.jsx +93 -0
- package/src/pages/flowable/task/form.jsx +5 -5
- package/src/pages/flowable/task/index.jsx +5 -5
- package/src/pages/flowable/test/index.jsx +13 -10
- package/src/pages/index.jsx +8 -13
- package/src/pages/login.jsx +8 -8
- package/src/pages/{api/doc.jsx → system/api/ApiDoc.jsx} +56 -47
- package/src/pages/system/api/index.jsx +268 -0
- package/src/pages/system/api/perm.jsx +69 -0
- package/src/pages/system/config/index.jsx +3 -3
- package/src/pages/system/dict/Dict.jsx +2 -3
- package/src/pages/system/dict/DictItem.jsx +5 -5
- package/src/pages/system/file/index.jsx +13 -5
- package/src/pages/{job → system/job}/index.jsx +124 -39
- package/src/pages/system/log/index.jsx +3 -3
- package/src/pages/system/org/index.jsx +11 -12
- package/src/pages/system/role/index.jsx +11 -11
- package/src/pages/system/role/perm.jsx +8 -8
- package/src/pages/system/sysManual/index.jsx +6 -6
- package/src/pages/system/user/UserPerm.jsx +7 -42
- package/src/pages/system/user/index.jsx +13 -17
- package/src/pages/test.jsx +188 -3
- package/src/pages/ureport/index.jsx +4 -4
- package/src/pages/userCenter/ChangePassword.jsx +3 -4
- package/src/pages/userCenter/index.jsx +2 -2
- package/src/pages/userCenter/manual.jsx +3 -7
- package/src/pages/userCenter/message.jsx +5 -5
- package/config/dist/config.local.js +0 -23
- package/src/components/InstanceStatusInfo.jsx +0 -79
- package/src/components/StreamLog.jsx +0 -27
- package/src/components/flow/BpmnUtils.js +0 -85
- package/src/components/flow/customTranslate/customTranslate.js +0 -19
- package/src/components/flow/customTranslate/translations.js +0 -79
- package/src/components/flow/design/form/ConditionForm.jsx +0 -316
- package/src/components/flow/design/form/ServiceTaskForm.jsx +0 -55
- package/src/components/flow/design/form/TimerEventDefinitionForm.jsx +0 -62
- package/src/components/flow/design/form/UserTaskForm.jsx +0 -211
- package/src/components/flow/design/palette.js +0 -39
- package/src/components/monitor/AllDefinition.jsx +0 -46
- package/src/components/monitor/AllInstance.jsx +0 -76
- package/src/forms/driverForm.jsx +0 -18
- package/src/framework/components/ButtonList.jsx +0 -91
- package/src/framework/components/Echarts/index.d.ts +0 -10
- package/src/framework/components/Echarts/index.jsx +0 -49
- package/src/framework/components/EditTable/index.d.ts +0 -11
- package/src/framework/components/EditTable/index.jsx +0 -85
- package/src/framework/components/FieldRemoteTree.jsx +0 -20
- package/src/framework/components/HasPerm.jsx +0 -18
- package/src/framework/components/ImageView.d.ts +0 -12
- package/src/framework/components/ImageView.jsx +0 -64
- package/src/framework/components/MsgBox.jsx +0 -180
- package/src/framework/components/PageLoading.jsx +0 -31
- package/src/framework/components/Panel/index.d.ts +0 -11
- package/src/framework/components/Panel/index.jsx +0 -24
- package/src/framework/components/Panel/index.less +0 -0
- package/src/framework/components/field/FieldAutoTime/index.tsx +0 -46
- package/src/framework/components/field/FieldBoolean/index.tsx +0 -92
- package/src/framework/components/field/FieldEditTable/index.less +0 -29
- package/src/framework/components/field/FieldEditor.jsx +0 -48
- package/src/framework/components/field/FieldFileBase64/index.d.ts +0 -15
- package/src/framework/components/field/FieldFileBase64/index.jsx +0 -23
- package/src/framework/components/field/FieldImageBase64/index.d.ts +0 -15
- package/src/framework/components/field/FieldImageBase64/index.jsx +0 -22
- package/src/framework/components/field/FieldInput.jsx +0 -13
- package/src/framework/components/field/FieldOrgTree/index.tsx +0 -45
- package/src/framework/components/field/FieldPassword.jsx +0 -11
- package/src/framework/components/field/FieldProps.ts +0 -19
- package/src/framework/components/field/FieldRemoteTreeCascader.jsx +0 -75
- package/src/framework/components/field/FieldRemoteTreeCheckable.jsx +0 -81
- package/src/framework/components/field/FieldRemoteTreeMultipleSelect.jsx +0 -100
- package/src/framework/components/field/FieldRemoteTreeSelect.jsx +0 -82
- package/src/framework/components/field/FieldSelectPosition/index.tsx +0 -85
- package/src/framework/components/field/FieldTree.jsx +0 -45
- package/src/framework/components/field/dict/index.tsx +0 -110
- package/src/framework/components/field/flat-multiple-select/index.d.ts +0 -4
- package/src/framework/components/field/flat-multiple-select/index.jsx +0 -116
- package/src/framework/components/field/flat-multiple-select/index.less +0 -12
- package/src/framework/components/field/flat-select/index.d.ts +0 -4
- package/src/framework/components/field/flat-select/index.jsx +0 -107
- package/src/framework/components/field/flat-select/index.less +0 -12
- package/src/framework/components/field/index.js +0 -33
- package/src/framework/components/field/input-number-percent/index.d.ts +0 -11
- package/src/framework/components/field/input-number-percent/index.jsx +0 -28
- package/src/framework/components/field/select/FieldSelect/index.d.ts +0 -39
- package/src/framework/components/field/select/FieldSelect/index.jsx +0 -156
- package/src/framework/components/field/select/FieldTableSelect/index.jsx +0 -155
- package/src/framework/components/field/select/index.jsx +0 -2
- package/src/framework/components/field/switch-y-n/index.d.ts +0 -11
- package/src/framework/components/field/switch-y-n/index.jsx +0 -31
- package/src/framework/components/field/text/index.tsx +0 -7
- package/src/framework/components/field/time/DatePickerString.tsx +0 -37
- package/src/framework/components/field/time/DateTimePickerString.tsx +0 -42
- package/src/framework/components/field/time/FieldDateRange.d.ts +0 -9
- package/src/framework/components/field/time/FieldDateRange.jsx +0 -49
- package/src/framework/components/field/time/HHmmPickerString.tsx +0 -42
- package/src/framework/components/field/time/MonthPickerString.tsx +0 -45
- package/src/framework/components/field/time/TimePickerTool.ts +0 -14
- package/src/framework/components/field/time/YearPickerString.tsx +0 -41
- package/src/framework/components/field/time/YearQuarterString.tsx +0 -38
- package/src/framework/components/field/time/index.tsx +0 -7
- package/src/framework/components/field/upload/FieldUploadCropImage/index.d.ts +0 -22
- package/src/framework/components/field/upload/FieldUploadCropImage/index.jsx +0 -11
- package/src/framework/components/field/upload/FieldUploadImage.d.ts +0 -7
- package/src/framework/components/field/upload/FieldUploadImage.jsx +0 -16
- package/src/framework/components/field/upload/index.jsx +0 -3
- package/src/framework/components/system.jsx +0 -29
- package/src/framework/components/view/ViewBoolean.jsx +0 -15
- package/src/framework/components/view/ViewBooleanEnableDisable.jsx +0 -16
- package/src/framework/components/view/ViewText.jsx +0 -9
- package/src/framework/index.js +0 -3
- package/src/framework/system/dict.js +0 -88
- package/src/framework/system/formRegistry.js +0 -58
- package/src/framework/system/http.jsx +0 -290
- package/src/framework/system/index.js +0 -13
- package/src/framework/system/page.js +0 -109
- package/src/framework/system/permission.js +0 -44
- package/src/framework/system/sys.js +0 -60
- package/src/framework/system/theme.js +0 -17
- package/src/framework/utils/arr.js +0 -118
- package/src/framework/utils/browser.js +0 -24
- package/src/framework/utils/color.js +0 -269
- package/src/framework/utils/debounce.js +0 -33
- package/src/framework/utils/dom.js +0 -16
- package/src/framework/utils/eventBus.js +0 -70
- package/src/framework/utils/html.js +0 -13
- package/src/framework/utils/index.js +0 -17
- package/src/framework/utils/obj.js +0 -72
- package/src/framework/utils/storage.js +0 -37
- package/src/framework/utils/str.js +0 -297
- package/src/framework/utils/tree.js +0 -175
- package/src/framework/utils/uid.js +0 -76
- package/src/framework/utils/url.js +0 -84
- package/src/framework/utils/validate.js +0 -9
- package/src/pages/api/accessLog/index.jsx +0 -108
- package/src/pages/api/accountResource/index.jsx +0 -149
- package/src/pages/api/index.jsx +0 -163
- package/src/pages/api/resource.jsx +0 -18
- package/src/pages/flowable/instance/view.jsx +0 -13
- package/src/pages/flowable/monitor.jsx +0 -106
- package/src/pages/flowable/test/form.jsx +0 -31
- package/src/pages/job/logList.jsx +0 -100
- package/src/pages/job/status.jsx +0 -84
- /package/src/framework/components/{ButtonList.d.ts → system/ButtonList.d.ts} +0 -0
- /package/src/framework/{components/EditTable/index.less → field-components/FieldTable.less} +0 -0
- /package/src/framework/{components/view → view-components}/ViewPassword.jsx +0 -0
- /package/src/{index.js → index.ts} +0 -0
- /package/src/{components/flow → pages/flowable}/design/contextPad.js +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {isTextFieldEntryEdited, SelectEntry} from '@bpmn-io/properties-panel';
|
|
2
|
+
import { useService } from 'bpmn-js-properties-panel';
|
|
3
|
+
import { useEffect, useState } from '@bpmn-io/properties-panel/preact/hooks';
|
|
4
|
+
import {HttpUtils} from "../../../../../framework";
|
|
5
|
+
export function DelegateExpressionProps () {
|
|
6
|
+
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
id: 'delegateExpression',
|
|
10
|
+
component: Component,
|
|
11
|
+
isEdited: isTextFieldEntryEdited,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function Component(props) {
|
|
18
|
+
const { element, id } = props;
|
|
19
|
+
|
|
20
|
+
const modeling = useService('modeling');
|
|
21
|
+
const debounce = useService('debounceInput');
|
|
22
|
+
|
|
23
|
+
const getValue = (element) => {
|
|
24
|
+
return element.businessObject.delegateExpression || '';
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const setValue = value => {
|
|
28
|
+
return modeling.updateProperties(element, {
|
|
29
|
+
delegateExpression: value
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const [ options, setOptions ] = useState([]);
|
|
34
|
+
|
|
35
|
+
useEffect(async () => {
|
|
36
|
+
const rs = await HttpUtils.get('admin/flowable/model/javaDelegateOptions')
|
|
37
|
+
setOptions(rs)
|
|
38
|
+
}, [ setOptions ]);
|
|
39
|
+
|
|
40
|
+
return SelectEntry({
|
|
41
|
+
element,
|
|
42
|
+
id: id,
|
|
43
|
+
label: 'delegateExpression',
|
|
44
|
+
description: '实现JavaDelegate接口的Bean名称, 如 ${demoDelegate}',
|
|
45
|
+
getValue,
|
|
46
|
+
setValue,
|
|
47
|
+
debounce,
|
|
48
|
+
|
|
49
|
+
getOptions: () => {
|
|
50
|
+
return options
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {isTextFieldEntryEdited, SelectEntry} from '@bpmn-io/properties-panel';
|
|
2
|
+
import { useService } from 'bpmn-js-properties-panel';
|
|
3
|
+
import { useEffect, useState } from '@bpmn-io/properties-panel/preact/hooks';
|
|
4
|
+
import {HttpUtils} from "../../../../../framework";
|
|
5
|
+
export function FormProps () {
|
|
6
|
+
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
id: 'form',
|
|
10
|
+
component: Component,
|
|
11
|
+
isEdited: isTextFieldEntryEdited,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function Component(props) {
|
|
18
|
+
const { element, id } = props;
|
|
19
|
+
|
|
20
|
+
const modeling = useService('modeling');
|
|
21
|
+
const debounce = useService('debounceInput');
|
|
22
|
+
const canvas = useService('canvas');
|
|
23
|
+
const rootElement = canvas.getRootElement();
|
|
24
|
+
const processId = rootElement.id;
|
|
25
|
+
const getValue = (element) => {
|
|
26
|
+
return element.businessObject.formKey || '';
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const setValue = value => {
|
|
30
|
+
return modeling.updateProperties(element, {
|
|
31
|
+
formKey: value
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const [ options, setOptions ] = useState([]);
|
|
36
|
+
|
|
37
|
+
useEffect(async () => {
|
|
38
|
+
const rs = await HttpUtils.get('admin/flowable/model/formOptions',{code:processId})
|
|
39
|
+
setOptions(rs)
|
|
40
|
+
}, [ setOptions ]);
|
|
41
|
+
|
|
42
|
+
return SelectEntry({
|
|
43
|
+
element,
|
|
44
|
+
id: id,
|
|
45
|
+
label: '选择表单',
|
|
46
|
+
getValue,
|
|
47
|
+
setValue,
|
|
48
|
+
debounce,
|
|
49
|
+
|
|
50
|
+
getOptions: () => {
|
|
51
|
+
return [{ value: '', label: '<留空>'},...options]
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBusinessObject,
|
|
3
|
+
is
|
|
4
|
+
} from 'bpmn-js/lib/util/ModelUtil';
|
|
5
|
+
|
|
6
|
+
import { TextFieldEntry, isTextFieldEntryEdited } from '@bpmn-io/properties-panel';
|
|
7
|
+
import {useService} from "bpmn-js-properties-panel";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @returns {Array<Entry>} entries
|
|
12
|
+
*/
|
|
13
|
+
export function MultiInstanceProps(props) {
|
|
14
|
+
const {
|
|
15
|
+
element
|
|
16
|
+
} = props;
|
|
17
|
+
|
|
18
|
+
if (!isMultiInstanceSupported(element)) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
const entries = [
|
|
22
|
+
{
|
|
23
|
+
id: 'collection',
|
|
24
|
+
component: Collection,
|
|
25
|
+
isEdited: isTextFieldEntryEdited
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id:'elementVariable',
|
|
29
|
+
component: ElementVariable,
|
|
30
|
+
isEdited: isTextFieldEntryEdited
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
return entries;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function Collection(props) {
|
|
38
|
+
const { element } = props;
|
|
39
|
+
const debounce = useService('debounceInput');
|
|
40
|
+
|
|
41
|
+
const getValue = () => {
|
|
42
|
+
return getLoopCharacteristics(element).get('collection')
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const setValue = (value) => {
|
|
46
|
+
getLoopCharacteristics( element).set('collection', value);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return TextFieldEntry({
|
|
50
|
+
element,
|
|
51
|
+
id: 'collection',
|
|
52
|
+
label: '集合',
|
|
53
|
+
getValue,
|
|
54
|
+
setValue,
|
|
55
|
+
debounce,
|
|
56
|
+
placeholder:'如 userList'
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function ElementVariable(props) {
|
|
61
|
+
const { element } = props;
|
|
62
|
+
|
|
63
|
+
const debounce = useService('debounceInput');
|
|
64
|
+
const getValue = () => {
|
|
65
|
+
return getLoopCharacteristics(element).get('elementVariable')
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const setValue = (value) => {
|
|
69
|
+
getLoopCharacteristics( element).set('elementVariable', value);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return TextFieldEntry({
|
|
73
|
+
element,
|
|
74
|
+
id: 'elementVariable',
|
|
75
|
+
label: '元素变量',
|
|
76
|
+
getValue,
|
|
77
|
+
setValue,
|
|
78
|
+
debounce,
|
|
79
|
+
placeholder:'如 user'
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
88
|
+
*
|
|
89
|
+
* @param {djs.model.Base} element
|
|
90
|
+
* @return {boolean}
|
|
91
|
+
*/
|
|
92
|
+
function isMultiInstanceSupported(element) {
|
|
93
|
+
const loopCharacteristics = getLoopCharacteristics(element);
|
|
94
|
+
return !!loopCharacteristics && is(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
|
|
95
|
+
}
|
|
96
|
+
function getLoopCharacteristics(element) {
|
|
97
|
+
const bo = getBusinessObject(element);
|
|
98
|
+
return bo.loopCharacteristics;
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {Form} from "antd";
|
|
2
|
+
import {
|
|
3
|
+
FieldRemoteSelect,
|
|
4
|
+
FieldRemoteSelectMultipleInline,
|
|
5
|
+
StringUtils
|
|
6
|
+
} from "../../../../../framework";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import {renderReact} from "./utils";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// preact 组件, bpmn properties-panel 渲染组件(bpmn properties-panel 只支持preact)
|
|
12
|
+
export function PreactUserTaskForm(props) {
|
|
13
|
+
return renderReact(props, UserTaskForm)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
// react 组件,方便使用antd
|
|
18
|
+
function UserTaskForm(props) {
|
|
19
|
+
console.log('UserTaskForm', props)
|
|
20
|
+
const {element, modeling} = props
|
|
21
|
+
let initialValues = {
|
|
22
|
+
assignee: element.businessObject.assignee,
|
|
23
|
+
candidateGroups: element.businessObject.candidateGroups,
|
|
24
|
+
candidateUsers: StringUtils.split(element.businessObject.candidateUsers, ',')
|
|
25
|
+
};
|
|
26
|
+
return (<div style={{padding: 8}}>
|
|
27
|
+
<Form layout='vertical'
|
|
28
|
+
initialValues={initialValues}
|
|
29
|
+
onValuesChange={(changedValues) => {
|
|
30
|
+
modeling.updateProperties(element, changedValues);
|
|
31
|
+
}}>
|
|
32
|
+
<Form.Item label="办理人" name='assignee'>
|
|
33
|
+
<FieldRemoteSelect url='admin/flowable/model/assigneeOptions'/>
|
|
34
|
+
</Form.Item>
|
|
35
|
+
<Form.Item label="候选组" name='candidateGroups'>
|
|
36
|
+
<FieldRemoteSelect url='admin/flowable/model/candidateGroupsOptions'/>
|
|
37
|
+
</Form.Item>
|
|
38
|
+
<Form.Item label="候选人" name='candidateUsers'>
|
|
39
|
+
<FieldRemoteSelectMultipleInline url='admin/flowable/model/candidateUsersOptions'/>
|
|
40
|
+
</Form.Item>
|
|
41
|
+
</Form>
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {useService} from "bpmn-js-properties-panel";
|
|
2
|
+
import {createRoot} from "react-dom/client";
|
|
3
|
+
import {h} from "preact";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {useEffect, useRef} from "@bpmn-io/properties-panel/preact/hooks";
|
|
6
|
+
import {ConfigProvider} from "antd";
|
|
7
|
+
import {ThemeUtils} from "../../../../../framework";
|
|
8
|
+
|
|
9
|
+
// 渲染React组件(bpmn properties-panel 只支持preact)
|
|
10
|
+
export function renderReact(props, ReactComponent, moreProps) {
|
|
11
|
+
const {element, id} = props;
|
|
12
|
+
const modeling = useService('modeling');
|
|
13
|
+
const bpmnFactory = useService('moddle');
|
|
14
|
+
const canvas = useService('canvas');
|
|
15
|
+
|
|
16
|
+
const domRef = useRef(null);
|
|
17
|
+
const rootElement = canvas.getRootElement();
|
|
18
|
+
const processId = rootElement.id;
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const root = createRoot(domRef.current);
|
|
22
|
+
root.render(<ConfigProvider theme={{ token: {
|
|
23
|
+
colorPrimary: ThemeUtils.getColor("primary-color"),
|
|
24
|
+
colorSuccess: ThemeUtils.getColor("success-color"),
|
|
25
|
+
colorWarning: ThemeUtils.getColor("warning-color"),
|
|
26
|
+
colorError: ThemeUtils.getColor("error-color"),
|
|
27
|
+
borderRadius: 4,
|
|
28
|
+
},}}>
|
|
29
|
+
<ReactComponent element={element} modeling={modeling} bpmnFactory={bpmnFactory}
|
|
30
|
+
processId={processId} {...moreProps}/></ConfigProvider>
|
|
31
|
+
);
|
|
32
|
+
}, [element]);
|
|
33
|
+
|
|
34
|
+
return h('div', {ref: domRef})
|
|
35
|
+
}
|
|
@@ -1,37 +1,31 @@
|
|
|
1
|
-
import {Button,
|
|
1
|
+
import {Button, Popconfirm, Space} from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {HttpUtil, PageUtil, ProTable} from "../../framework";
|
|
3
|
+
import {ButtonList, HttpUtils, Page, PageUtils, ProTable} from "../../framework";
|
|
5
4
|
|
|
6
5
|
export default class extends React.Component {
|
|
7
6
|
|
|
8
7
|
|
|
9
|
-
state = {
|
|
10
|
-
formValues: {},
|
|
11
|
-
formOpen: false
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
actionRef = React.createRef();
|
|
15
|
-
formRef = React.createRef();
|
|
16
9
|
|
|
17
10
|
|
|
18
11
|
columns = [
|
|
19
12
|
{
|
|
20
13
|
title: '模型名称',
|
|
21
14
|
dataIndex: 'name',
|
|
22
|
-
sorter: true
|
|
23
15
|
},
|
|
24
16
|
{
|
|
25
17
|
title: '唯一编码',
|
|
26
|
-
dataIndex: '
|
|
18
|
+
dataIndex: 'key'
|
|
27
19
|
},
|
|
20
|
+
|
|
21
|
+
|
|
28
22
|
{
|
|
29
|
-
title: '
|
|
30
|
-
dataIndex: '
|
|
23
|
+
title: '版本',
|
|
24
|
+
dataIndex: 'version',
|
|
31
25
|
},
|
|
32
26
|
{
|
|
33
27
|
title: '更新时间',
|
|
34
|
-
dataIndex: '
|
|
28
|
+
dataIndex: 'lastUpdateTime',
|
|
35
29
|
},
|
|
36
30
|
|
|
37
31
|
|
|
@@ -41,9 +35,8 @@ export default class extends React.Component {
|
|
|
41
35
|
render: (_, record) => (
|
|
42
36
|
<Space>
|
|
43
37
|
<Button size='small' type='primary'
|
|
44
|
-
onClick={() =>
|
|
45
|
-
<
|
|
46
|
-
<Popconfirm perm='flowable/model:delete' title={'是否确定删除流程模型' }
|
|
38
|
+
onClick={() => PageUtils.open('/flowable/design?id=' + record.id, '流程设计' + record.name)}> 设计 </Button>
|
|
39
|
+
<Popconfirm perm='flowable/model:delete' title={'是否确定删除流程模型'}
|
|
47
40
|
onConfirm={() => this.handleDelete(record)}>
|
|
48
41
|
<Button size='small' danger>删除</Button>
|
|
49
42
|
</Popconfirm>
|
|
@@ -53,72 +46,38 @@ export default class extends React.Component {
|
|
|
53
46
|
];
|
|
54
47
|
|
|
55
48
|
|
|
56
|
-
handleAdd = () => {
|
|
57
|
-
this.setState({
|
|
58
|
-
formOpen: true,
|
|
59
|
-
formValues: {}
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
handleEdit = record => {
|
|
64
|
-
this.setState({
|
|
65
|
-
formOpen: true,
|
|
66
|
-
formValues: record
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
onFinish = values => {
|
|
70
|
-
HttpUtil.post('admin/flowable/model/save', values).then(rs => {
|
|
71
|
-
this.actionRef.current.reload()
|
|
72
|
-
this.setState({formOpen: false})
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
|
|
76
49
|
handleDelete = row => {
|
|
77
|
-
|
|
50
|
+
HttpUtils.get('admin/flowable/model/delete', {id: row.id}).then(rs => {
|
|
78
51
|
this.actionRef.current.reload();
|
|
79
52
|
})
|
|
80
53
|
}
|
|
81
54
|
|
|
82
55
|
|
|
83
56
|
render() {
|
|
84
|
-
const demo = `@Component
|
|
85
|
-
@ProcessDefinitionDescription(key = "demo",name = "demo-派车流程", formKeys = @FormKeyDescription(value = "driverForm",label = "司机表单"))
|
|
86
|
-
public class DemoProcess implements ProcessDefinition {
|
|
87
|
-
|
|
88
|
-
@Override
|
|
89
|
-
public void onProcessEvent(FlowableEventType type, String initiator, String businessKey, Map<String, Object> variables) {
|
|
90
57
|
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
`
|
|
94
|
-
|
|
95
|
-
return <>
|
|
58
|
+
return <Page padding>
|
|
96
59
|
<ProTable
|
|
97
|
-
search={false}
|
|
98
60
|
actionRef={this.actionRef}
|
|
99
|
-
|
|
100
|
-
onClick={this.handleAdd}> 新增</Button>}
|
|
101
|
-
request={(params) => HttpUtil.pageData('admin/flowable/model/page', params)}
|
|
61
|
+
request={(params) => HttpUtils.get('admin/flowable/model/page', params)}
|
|
102
62
|
columns={this.columns}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
63
|
+
showToolbarSearch={true}
|
|
64
|
+
toolBarRender={() => {
|
|
65
|
+
return <ButtonList>
|
|
66
|
+
<Button onClick={() => PageUtils.open('/flowable/monitor/task', "运行中的任务")}>
|
|
67
|
+
运行中的任务
|
|
68
|
+
</Button>
|
|
69
|
+
<Button onClick={() => PageUtils.open('/flowable/monitor/instance', "运行中的流程实例")}>
|
|
70
|
+
运行中的流程实例
|
|
71
|
+
</Button>
|
|
72
|
+
<Button onClick={() => PageUtils.open('/flowable/monitor/definition', "已部署的流程定义")}>
|
|
73
|
+
已部署的流程定义
|
|
74
|
+
</Button>
|
|
75
|
+
</ButtonList>
|
|
76
|
+
}}
|
|
106
77
|
/>
|
|
107
78
|
|
|
108
|
-
<Modal title='模型基本信息'
|
|
109
|
-
open={this.state.formOpen}
|
|
110
|
-
onCancel={() => this.setState({formOpen: false})}
|
|
111
|
-
width={1024}
|
|
112
|
-
footer={null}
|
|
113
|
-
>
|
|
114
|
-
|
|
115
|
-
不支持页面创建, 请参考Java代码
|
|
116
|
-
<pre>
|
|
117
|
-
{demo}
|
|
118
|
-
</pre>
|
|
119
79
|
|
|
120
|
-
|
|
121
|
-
</>
|
|
80
|
+
</Page>
|
|
122
81
|
}
|
|
123
82
|
|
|
124
83
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {HttpUtils, ProTable} from "../../../framework";
|
|
3
|
+
|
|
4
|
+
export default class extends React.Component {
|
|
5
|
+
|
|
6
|
+
columns = [
|
|
7
|
+
{
|
|
8
|
+
title: 'ID',
|
|
9
|
+
dataIndex: 'id',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: '分类',
|
|
13
|
+
dataIndex: 'category',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: '名称',
|
|
17
|
+
dataIndex: 'name',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: '键',
|
|
21
|
+
dataIndex: 'key',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '描述',
|
|
25
|
+
dataIndex: 'description',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: '版本',
|
|
29
|
+
dataIndex: 'version',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: '资源名称',
|
|
33
|
+
dataIndex: 'resourceName',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '部署ID',
|
|
37
|
+
dataIndex: 'deploymentId',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: '图表资源名称',
|
|
41
|
+
dataIndex: 'diagramResourceName',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: '是否有开始表单键',
|
|
45
|
+
dataIndex: 'hasStartFormKey',
|
|
46
|
+
render: (value) => value ? '是' : '否',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: '是否有图形符号',
|
|
50
|
+
dataIndex: 'hasGraphicalNotation',
|
|
51
|
+
render: (value) => value ? '是' : '否',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: '是否挂起',
|
|
55
|
+
dataIndex: 'suspended',
|
|
56
|
+
render: (value) => value ? '是' : '否',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: '租户ID',
|
|
60
|
+
dataIndex: 'tenantId',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: '派生自',
|
|
64
|
+
dataIndex: 'derivedFrom',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
title: '根派生来源',
|
|
68
|
+
dataIndex: 'derivedFromRoot',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: '派生版本',
|
|
72
|
+
dataIndex: 'derivedVersion',
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
render() {
|
|
79
|
+
return <ProTable
|
|
80
|
+
search={false}
|
|
81
|
+
columns={this.columns}
|
|
82
|
+
request={(params) => HttpUtils.get('admin/flowable/monitor/definitionPage', params)}
|
|
83
|
+
>
|
|
84
|
+
|
|
85
|
+
</ProTable>
|
|
86
|
+
}
|
|
87
|
+
}
|