@jiangood/admin-spring-boot-starter 0.2.0
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 +45 -0
- package/config/dist/index.js +19 -0
- package/config/dist/plugins/form-plugin.js +51 -0
- package/config/dist/plugins/route-plugin.js +72 -0
- package/package.json +41 -0
- package/src/app.js +1 -0
- package/src/asserts/welcome.png +0 -0
- package/src/forms/demoForm.jsx +16 -0
- package/src/framework/components/DownloadFileButton.d.ts +11 -0
- package/src/framework/components/DownloadFileButton.jsx +33 -0
- package/src/framework/components/Ellipsis.jsx +39 -0
- package/src/framework/components/Ellipsis.less +8 -0
- package/src/framework/components/Gap/index.d.ts +23 -0
- package/src/framework/components/Gap/index.jsx +46 -0
- package/src/framework/components/LinkButton.d.ts +14 -0
- package/src/framework/components/LinkButton.jsx +10 -0
- package/src/framework/components/NamedIcon.tsx +15 -0
- package/src/framework/components/Page/index.d.ts +17 -0
- package/src/framework/components/Page/index.jsx +30 -0
- package/src/framework/components/Page/index.less +10 -0
- package/src/framework/components/PageLoading.tsx +27 -0
- package/src/framework/components/ProModal/index.tsx +66 -0
- package/src/framework/components/ProTable/components/ToolBar/index.jsx +123 -0
- package/src/framework/components/ProTable/components/ToolBar/index.less +53 -0
- package/src/framework/components/ProTable/index.d.ts +42 -0
- package/src/framework/components/ProTable/index.jsx +260 -0
- package/src/framework/components/ProTable/index.less +14 -0
- package/src/framework/components/ProTable/utils/index.js +43 -0
- package/src/framework/components/ValueType/index.jsx +34 -0
- package/src/framework/components/ValueType/registry.jsx +27 -0
- package/src/framework/components/index.ts +17 -0
- package/src/framework/components/system/ButtonList.d.ts +9 -0
- 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.d.ts +11 -0
- package/src/framework/components/view/ViewEllipsis.jsx +30 -0
- package/src/framework/components/view/ViewFile.d.ts +10 -0
- package/src/framework/components/view/ViewFile.jsx +49 -0
- package/src/framework/components/view/ViewFileButton.d.ts +10 -0
- package/src/framework/components/view/ViewFileButton.jsx +0 -0
- package/src/framework/components/view/ViewImage.d.ts +9 -0
- package/src/framework/components/view/ViewImage.jsx +60 -0
- package/src/framework/components/view/ViewRange/index.d.ts +16 -0
- package/src/framework/components/view/ViewRange/index.jsx +20 -0
- package/src/framework/components/view/ViewText.tsx +16 -0
- package/src/framework/components/view/index.ts +10 -0
- 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 +27 -0
- package/src/framework/field-components/FieldDate.jsx +114 -0
- package/src/framework/field-components/FieldDateRange.d.ts +6 -0
- package/src/framework/field-components/FieldDateRange.jsx +104 -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/FieldNumberRange.d.ts +13 -0
- package/src/framework/field-components/FieldNumberRange.jsx +59 -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/field-components/FieldTable.d.ts +17 -0
- package/src/framework/field-components/FieldTable.jsx +108 -0
- package/src/framework/field-components/FieldTable.less +29 -0
- package/src/framework/field-components/FieldTableSelect.d.ts +19 -0
- package/src/framework/field-components/FieldTableSelect.jsx +59 -0
- package/src/framework/field-components/FieldUploadFile.d.ts +34 -0
- package/src/framework/field-components/FieldUploadFile.jsx +141 -0
- package/src/framework/field-components/index.ts +21 -0
- package/src/framework/field-components/system/OrgTree.tsx +61 -0
- package/src/framework/field-components/system/RoleTree.tsx +53 -0
- package/src/framework/field-components/system/index.ts +2 -0
- package/src/framework/index.ts +5 -0
- package/src/framework/pages/LoginPage.d.ts +15 -0
- package/src/framework/pages/LoginPage.jsx +132 -0
- package/src/framework/pages/LoginPage.less +53 -0
- package/src/framework/pages/LoginPageUtils.ts +35 -0
- package/src/framework/pages/index.ts +2 -0
- package/src/framework/utils/ArrUtils.ts +229 -0
- package/src/framework/utils/ColorsUtils.ts +378 -0
- package/src/framework/utils/DateUtils.ts +187 -0
- package/src/framework/utils/DeviceUtils.ts +46 -0
- package/src/framework/utils/DomUtils.ts +50 -0
- package/src/framework/utils/EventBusUtils.ts +144 -0
- package/src/framework/utils/MessageUtils.tsx +145 -0
- package/src/framework/utils/ObjectUtils.ts +118 -0
- package/src/framework/utils/StorageUtils.ts +50 -0
- package/src/framework/utils/StringUtils.ts +412 -0
- package/src/framework/utils/TreeUtils.ts +251 -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 +247 -0
- package/src/framework/utils/system/PageUtils.ts +163 -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/ViewApproveStatus.tsx +26 -0
- package/src/framework/view-components/ViewBoolean.tsx +6 -0
- package/src/framework/view-components/ViewFlowableInstanceProgress.d.ts +12 -0
- package/src/framework/view-components/ViewFlowableInstanceProgress.jsx +97 -0
- package/src/framework/view-components/ViewFlowableInstanceProgressButton.tsx +26 -0
- package/src/framework/view-components/ViewPassword.tsx +25 -0
- package/src/framework/view-components/ViewProps.ts +11 -0
- package/src/framework/view-components/index.ts +6 -0
- package/src/index.ts +2 -0
- package/src/layouts/PageRender.d.ts +22 -0
- package/src/layouts/PageRender.jsx +90 -0
- package/src/layouts/admin/HeaderRight.jsx +104 -0
- package/src/layouts/admin/TabPageRender.jsx +158 -0
- package/src/layouts/admin/index.jsx +161 -0
- package/src/layouts/admin/index.less +65 -0
- package/src/layouts/index.jsx +153 -0
- package/src/layouts/index.less +24 -0
- package/src/loading.jsx +18 -0
- package/src/pages/404.jsx +13 -0
- package/src/pages/about.jsx +14 -0
- package/src/pages/flowable/design/contextPad.js +50 -0
- 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.css +7 -0
- package/src/pages/flowable/design/index.jsx +171 -0
- 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 +87 -0
- 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 +98 -0
- package/src/pages/flowable/task/form.jsx +186 -0
- package/src/pages/flowable/task/index.jsx +184 -0
- package/src/pages/flowable/task/instance/view.jsx +85 -0
- package/src/pages/flowable/test/index.jsx +57 -0
- package/src/pages/index.jsx +25 -0
- package/src/pages/login.jsx +21 -0
- package/src/pages/system/api/ApiDoc.jsx +144 -0
- 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 +136 -0
- package/src/pages/system/dict/Dict.jsx +72 -0
- package/src/pages/system/dict/DictItem.jsx +177 -0
- package/src/pages/system/dict/index.jsx +25 -0
- package/src/pages/system/file/index.jsx +160 -0
- package/src/pages/system/job/index.jsx +324 -0
- package/src/pages/system/log/index.jsx +78 -0
- package/src/pages/system/org/index.jsx +262 -0
- package/src/pages/system/role/index.jsx +308 -0
- package/src/pages/system/role/perm.jsx +108 -0
- package/src/pages/system/sysManual/index.jsx +127 -0
- package/src/pages/system/user/UserPerm.jsx +97 -0
- package/src/pages/system/user/index.jsx +258 -0
- package/src/pages/test.jsx +200 -0
- package/src/pages/ureport/index.jsx +22 -0
- package/src/pages/userCenter/ChangePassword.jsx +63 -0
- package/src/pages/userCenter/index.jsx +90 -0
- package/src/pages/userCenter/manual.jsx +59 -0
- package/src/pages/userCenter/message.jsx +105 -0
- package/src/style/global.less +51 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {Button, Popconfirm, Space} from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {ButtonList, HttpUtils, Page, PageUtils, ProTable} from "../../framework";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
actionRef = React.createRef();
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
columns = [
|
|
12
|
+
{
|
|
13
|
+
title: '名称',
|
|
14
|
+
dataIndex: 'name',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: '代码',
|
|
18
|
+
dataIndex: 'key'
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
title: '版本',
|
|
24
|
+
dataIndex: 'version',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: '更新时间',
|
|
28
|
+
dataIndex: 'lastUpdateTime',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
{
|
|
33
|
+
title: '操作',
|
|
34
|
+
dataIndex: 'option',
|
|
35
|
+
render: (_, record) => (
|
|
36
|
+
<Space>
|
|
37
|
+
<Button size='small' type='primary'
|
|
38
|
+
onClick={() => PageUtils.open('/flowable/design?id=' + record.id, '流程设计' + record.name)}> 设计 </Button>
|
|
39
|
+
<Popconfirm perm='flowable/model:delete' title={'是否确定删除流程模型'}
|
|
40
|
+
onConfirm={() => this.handleDelete(record)}>
|
|
41
|
+
<Button size='small' danger>删除</Button>
|
|
42
|
+
</Popconfirm>
|
|
43
|
+
</Space>
|
|
44
|
+
),
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
handleDelete = row => {
|
|
50
|
+
HttpUtils.get('admin/flowable/model/delete', {id: row.id}).then(rs => {
|
|
51
|
+
this.actionRef.current.reload();
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
render() {
|
|
57
|
+
|
|
58
|
+
return <Page padding>
|
|
59
|
+
<ProTable
|
|
60
|
+
actionRef={this.actionRef}
|
|
61
|
+
request={(params) => HttpUtils.get('admin/flowable/model/page', params)}
|
|
62
|
+
columns={this.columns}
|
|
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
|
+
}}
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</Page>
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import {Button, Popconfirm, Space} from "antd";
|
|
2
|
+
import {HttpUtils, PageUtils, ProTable} from "../../../../framework";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
columns = [
|
|
8
|
+
{
|
|
9
|
+
title: 'ID',
|
|
10
|
+
dataIndex: 'id',
|
|
11
|
+
key: 'id',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: '流程定义ID',
|
|
15
|
+
dataIndex: 'processDefinitionId',
|
|
16
|
+
key: 'processDefinitionId',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: '流程定义名称',
|
|
20
|
+
dataIndex: 'processDefinitionName',
|
|
21
|
+
key: 'processDefinitionName',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: '流程定义键',
|
|
25
|
+
dataIndex: 'processDefinitionKey',
|
|
26
|
+
key: 'processDefinitionKey',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: '流程定义版本',
|
|
30
|
+
dataIndex: 'processDefinitionVersion',
|
|
31
|
+
key: 'processDefinitionVersion',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: '流程定义分类',
|
|
35
|
+
dataIndex: 'processDefinitionCategory',
|
|
36
|
+
key: 'processDefinitionCategory',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: '部署ID',
|
|
40
|
+
dataIndex: 'deploymentId',
|
|
41
|
+
key: 'deploymentId',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: '业务键',
|
|
45
|
+
dataIndex: 'businessKey',
|
|
46
|
+
key: 'businessKey',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: '业务状态',
|
|
50
|
+
dataIndex: 'businessStatus',
|
|
51
|
+
key: 'businessStatus',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: '是否挂起',
|
|
55
|
+
dataIndex: 'suspended',
|
|
56
|
+
key: 'suspended',
|
|
57
|
+
render: (value) => value ? '是' : '否',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: '流程变量',
|
|
61
|
+
dataIndex: 'processVariables',
|
|
62
|
+
key: 'processVariables',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: '租户ID',
|
|
66
|
+
dataIndex: 'tenantId',
|
|
67
|
+
key: 'tenantId',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: '名称',
|
|
71
|
+
dataIndex: 'name',
|
|
72
|
+
key: 'name',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: '描述',
|
|
76
|
+
dataIndex: 'description',
|
|
77
|
+
key: 'description',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: '本地化名称',
|
|
81
|
+
dataIndex: 'localizedName',
|
|
82
|
+
key: 'localizedName',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: '本地化描述',
|
|
86
|
+
dataIndex: 'localizedDescription',
|
|
87
|
+
key: 'localizedDescription',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: '开始时间',
|
|
91
|
+
dataIndex: 'startTime',
|
|
92
|
+
key: 'startTime',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
title: '启动用户ID',
|
|
96
|
+
dataIndex: 'startUserId',
|
|
97
|
+
key: 'startUserId',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: '回调ID',
|
|
101
|
+
dataIndex: 'callbackId',
|
|
102
|
+
key: 'callbackId',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
title: '回调类型',
|
|
106
|
+
dataIndex: 'callbackType',
|
|
107
|
+
key: 'callbackType',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
title: '父ID',
|
|
111
|
+
dataIndex: 'parentId',
|
|
112
|
+
key: 'parentId',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: '根流程实例ID',
|
|
116
|
+
dataIndex: 'rootProcessInstanceId',
|
|
117
|
+
key: 'rootProcessInstanceId',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: '活动ID',
|
|
121
|
+
dataIndex: 'activityId',
|
|
122
|
+
key: 'activityId',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
title: '当前活动ID',
|
|
126
|
+
dataIndex: 'currentActivityId',
|
|
127
|
+
key: 'currentActivityId',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
title: '当前活动名称',
|
|
131
|
+
dataIndex: 'currentActivityName',
|
|
132
|
+
key: 'currentActivityName',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
title: '当前活动类型',
|
|
136
|
+
dataIndex: 'currentActivityType',
|
|
137
|
+
key: 'currentActivityType',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
title: '当前活动行为类型',
|
|
141
|
+
dataIndex: 'currentActivityBehaviorType',
|
|
142
|
+
key: 'currentActivityBehaviorType',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
dataIndex: 'options',
|
|
146
|
+
title: '操作',
|
|
147
|
+
fixed: 'right',
|
|
148
|
+
render: (_, r) => {
|
|
149
|
+
return <Space>
|
|
150
|
+
<Button size='small' onClick={() => PageUtils.open(`/flowable/monitor/instance/view?id=${r.id}`, '查看流程')}>查看</Button>
|
|
151
|
+
<Popconfirm title={'关闭流程'}
|
|
152
|
+
onConfirm={() => this.close(r.id)}>
|
|
153
|
+
<Button size='small' >终止</Button>
|
|
154
|
+
</Popconfirm></Space>
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
close = (id) => {
|
|
161
|
+
HttpUtils.get('admin/flowable/monitor/processInstance/close', {id}).then((rs) => {
|
|
162
|
+
this.tableRef.current.reload()
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
tableRef = React.createRef()
|
|
167
|
+
|
|
168
|
+
render() {
|
|
169
|
+
return <ProTable
|
|
170
|
+
actionRef={this.tableRef}
|
|
171
|
+
columns={this.columns}
|
|
172
|
+
request={(params) => HttpUtils.get('admin/flowable/monitor/instancePage', params)}
|
|
173
|
+
>
|
|
174
|
+
|
|
175
|
+
</ProTable>
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Gap, HttpUtils, Page, PageUtils, ProTable} from "../../../../framework";
|
|
3
|
+
import {Card, Empty, Skeleton, Table} from "antd";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
state = {
|
|
7
|
+
instanceCommentList: [],
|
|
8
|
+
vars: {},
|
|
9
|
+
|
|
10
|
+
id: null,
|
|
11
|
+
starter: null,
|
|
12
|
+
startTime: null,
|
|
13
|
+
name: null,
|
|
14
|
+
|
|
15
|
+
data: {
|
|
16
|
+
commentList: [],
|
|
17
|
+
img: null
|
|
18
|
+
},
|
|
19
|
+
loading: true,
|
|
20
|
+
|
|
21
|
+
errorMsg: null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
componentDidMount() {
|
|
26
|
+
const {businessKey, id} = PageUtils.currentParams()
|
|
27
|
+
|
|
28
|
+
HttpUtils.get("admin/flowable/my/getInstanceInfo", {id, businessKey}).then(rs => {
|
|
29
|
+
this.setState(rs)
|
|
30
|
+
this.setState({data: rs})
|
|
31
|
+
}).catch(e => {
|
|
32
|
+
this.setState({errorMsg: e})
|
|
33
|
+
}).finally(() => {
|
|
34
|
+
this.setState({loading: false})
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
render() {
|
|
41
|
+
|
|
42
|
+
if (this.state.errorMsg) {
|
|
43
|
+
return <Empty description={this.state.errorMsg}></Empty>
|
|
44
|
+
}
|
|
45
|
+
const {id} = PageUtils.currentParams()
|
|
46
|
+
|
|
47
|
+
const {data, loading} = this.state
|
|
48
|
+
const {commentList, img} = data
|
|
49
|
+
if (loading) {
|
|
50
|
+
return <Skeleton/>
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
return <Page padding>
|
|
55
|
+
<Card title='流程图'>
|
|
56
|
+
<img src={img} style={{maxWidth: '100%'}}/>
|
|
57
|
+
</Card>
|
|
58
|
+
<Gap/>
|
|
59
|
+
<Card title='审批记录'>
|
|
60
|
+
<Table dataSource={commentList}
|
|
61
|
+
size='small'
|
|
62
|
+
pagination={false}
|
|
63
|
+
rowKey='id'
|
|
64
|
+
columns={[
|
|
65
|
+
{
|
|
66
|
+
dataIndex: 'content',
|
|
67
|
+
title: '操作'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
dataIndex: 'user',
|
|
71
|
+
title: '处理人'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
dataIndex: 'time',
|
|
75
|
+
title: '处理时间'
|
|
76
|
+
},
|
|
77
|
+
]}
|
|
78
|
+
/>
|
|
79
|
+
</Card>
|
|
80
|
+
|
|
81
|
+
<Gap/>
|
|
82
|
+
<Card title='流程变量'>
|
|
83
|
+
<ProTable columns={[
|
|
84
|
+
{
|
|
85
|
+
dataIndex: 'key',
|
|
86
|
+
title: '变量名'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
dataIndex: 'value',
|
|
90
|
+
title: '变量值'
|
|
91
|
+
},
|
|
92
|
+
]}
|
|
93
|
+
rowKey='key'
|
|
94
|
+
request={() => HttpUtils.get('admin/flowable/monitor/instance/vars', {id})}
|
|
95
|
+
></ProTable>
|
|
96
|
+
|
|
97
|
+
</Card>
|
|
98
|
+
</Page>
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
}
|