@jiangood/admin-spring-boot-starter 0.3.3 → 0.3.5
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/common-plugin.js +148 -0
- package/config/dist/config.js +3 -4
- package/config/dist/index.js +1 -2
- package/package.json +3 -2
- package/src/framework/field-components/FieldRemoteTreeSelectMultiple.jsx +6 -2
- package/config/dist/plugins/form-plugin.js +0 -51
- package/config/dist/plugins/route-plugin.js +0 -72
- package/src/pages/flowable/design/contextPad.js +0 -50
- package/src/pages/flowable/design/customTranslate/customTranslate.js +0 -16
- package/src/pages/flowable/design/customTranslate/translations-properties-panel.js +0 -10
- package/src/pages/flowable/design/customTranslate/translations.js +0 -144
- package/src/pages/flowable/design/descriptors/flowable.json +0 -1109
- package/src/pages/flowable/design/index.css +0 -7
- package/src/pages/flowable/design/index.jsx +0 -171
- package/src/pages/flowable/design/provider/FlowablePropertiesProvider.js +0 -75
- package/src/pages/flowable/design/provider/index.js +0 -6
- package/src/pages/flowable/design/provider/properties/ConditionDesign.jsx +0 -243
- package/src/pages/flowable/design/provider/properties/ConditionExpressionUtils.js +0 -53
- package/src/pages/flowable/design/provider/properties/ConditionProps.jsx +0 -76
- package/src/pages/flowable/design/provider/properties/DelegateExpressionProps.js +0 -54
- package/src/pages/flowable/design/provider/properties/FormProps.js +0 -55
- package/src/pages/flowable/design/provider/properties/MultiInstanceProps.js +0 -100
- package/src/pages/flowable/design/provider/properties/UserTaskForm.jsx +0 -48
- package/src/pages/flowable/design/provider/properties/utils.jsx +0 -35
- package/src/pages/flowable/index.jsx +0 -87
- package/src/pages/flowable/monitor/definition.jsx +0 -87
- package/src/pages/flowable/monitor/instance/index.jsx +0 -177
- package/src/pages/flowable/monitor/instance/view.jsx +0 -102
- package/src/pages/flowable/monitor/task.jsx +0 -98
- package/src/pages/flowable/task/form.jsx +0 -186
- package/src/pages/flowable/task/index.jsx +0 -184
- package/src/pages/flowable/task/instance/view.jsx +0 -85
- package/src/pages/flowable/test/index.jsx +0 -57
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,35 +0,0 @@
|
|
|
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,87 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,177 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
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
|
-
}
|