@jiangood/open-admin-flowable 2.0.1 → 2.1.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/package.json +20 -20
- package/src/components/InstanceView.jsx +86 -0
- package/src/components/ProcessImageViewer.jsx +21 -0
- package/src/components/flowable/HistoryListPanel.jsx +49 -0
- package/src/components/flowable/done-table.jsx +31 -0
- package/src/components/flowable/my-table.jsx +34 -0
- package/src/components/flowable/todo-table.jsx +28 -0
- package/src/constants/api.js +39 -0
- package/src/constants/routes.js +8 -0
- package/src/pages/flowable/design/index.jsx +38 -13
- package/src/pages/flowable/design/provider/properties/AssignmentSection.jsx +4 -3
- package/src/pages/flowable/design/provider/properties/ConditionDesign.jsx +2 -3
- package/src/pages/flowable/design/provider/properties/DelegateExpressionProps.jsx +2 -1
- package/src/pages/flowable/design/provider/properties/FormProps.jsx +2 -1
- package/src/pages/flowable/index.jsx +8 -7
- package/src/pages/flowable/monitor/{definition.jsx → definition/index.jsx} +2 -1
- package/src/pages/flowable/monitor/instance/index.jsx +8 -4
- package/src/pages/flowable/monitor/instance/view.jsx +3 -100
- package/src/pages/flowable/monitor/{task.jsx → task/index.jsx} +6 -3
- package/src/pages/flowable/simulate/FinishedPhase.jsx +59 -0
- package/src/pages/flowable/simulate/InitPhase.jsx +54 -0
- package/src/pages/flowable/simulate/RunningPhase.jsx +117 -0
- package/src/pages/flowable/simulate/index.jsx +59 -243
- package/src/pages/flowable/user-task/form.jsx +12 -36
- package/src/pages/flowable/user-task/index.jsx +11 -169
- package/src/pages/flowable/user-task/instance/view.jsx +3 -83
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import {Tabs} from "antd";
|
|
3
|
+
import {Page, PageLoading} from "@jiangood/open-admin";
|
|
4
|
+
import TodoTable from "@/components/flowable/todo-table";
|
|
5
|
+
import DoneTable from "@/components/flowable/done-table";
|
|
6
|
+
import MyTable from "@/components/flowable/my-table";
|
|
5
7
|
|
|
6
8
|
export default class extends React.Component {
|
|
7
|
-
|
|
8
|
-
state = {
|
|
9
|
-
show: true
|
|
10
|
-
}
|
|
9
|
+
state = { show: true }
|
|
11
10
|
|
|
12
11
|
render() {
|
|
13
12
|
if (!this.state.show) {
|
|
@@ -15,170 +14,13 @@ export default class extends React.Component {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
const items = [
|
|
18
|
-
{label: '待办任务', key: '1', children:
|
|
19
|
-
{label: '已办任务', key: '2', children:
|
|
20
|
-
{label: '我发起的', key: '3', children:
|
|
21
|
-
]
|
|
17
|
+
{label: '待办任务', key: '1', children: <TodoTable/>},
|
|
18
|
+
{label: '已办任务', key: '2', children: <DoneTable/>},
|
|
19
|
+
{label: '我发起的', key: '3', children: <MyTable/>},
|
|
20
|
+
];
|
|
22
21
|
|
|
23
22
|
return <Page padding>
|
|
24
|
-
<Tabs defaultActiveKey="1" destroyOnHidden items={items}
|
|
25
|
-
|
|
26
|
-
</Tabs>
|
|
23
|
+
<Tabs defaultActiveKey="1" destroyOnHidden items={items}/>
|
|
27
24
|
</Page>
|
|
28
25
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
renderTodo = () => <ProTable
|
|
32
|
-
showToolbarSearch={false}
|
|
33
|
-
request={(params) => HttpUtils.get("admin/flowable/user-task/todoTaskPage", params)}
|
|
34
|
-
columns={[
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
title: '发起人',
|
|
38
|
-
dataIndex: 'instanceStarter'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
title: '流程名称',
|
|
42
|
-
dataIndex: 'instanceName',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
title: '当前节点',
|
|
46
|
-
dataIndex: 'taskName',
|
|
47
|
-
width: 100,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
title: '当前操作人',
|
|
51
|
-
dataIndex: 'assigneeInfo',
|
|
52
|
-
width: 100
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
title: '发起时间',
|
|
57
|
-
dataIndex: 'instanceStartTime',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
title: '任务创建时间',
|
|
61
|
-
dataIndex: 'createTime',
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
title: '操作',
|
|
66
|
-
dataIndex: 'option',
|
|
67
|
-
render: (_, record) => {
|
|
68
|
-
let path = '/flowable/user-task/form?taskId=' + record.id;
|
|
69
|
-
return (
|
|
70
|
-
<LinkButton
|
|
71
|
-
type='primary'
|
|
72
|
-
path={path}
|
|
73
|
-
label='处理任务'>处理</LinkButton>
|
|
74
|
-
);
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
]}
|
|
78
|
-
size='small'
|
|
79
|
-
/>;
|
|
80
|
-
|
|
81
|
-
renderDone = () => <ProTable
|
|
82
|
-
showToolbarSearch={false}
|
|
83
|
-
request={(params) => HttpUtils.get("admin/flowable/user-task/doneTaskPage", params)}
|
|
84
|
-
columns={[
|
|
85
|
-
{
|
|
86
|
-
title: '流程名称',
|
|
87
|
-
dataIndex: 'instanceName',
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
title: '发起人',
|
|
91
|
-
dataIndex: 'instanceStarter'
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
title: '发起时间',
|
|
95
|
-
dataIndex: 'instanceStartTime',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
title: '任务创建时间',
|
|
99
|
-
dataIndex: 'createTime',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
title: '处理时间',
|
|
103
|
-
dataIndex: 'endTime',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
title: '耗时',
|
|
107
|
-
dataIndex: 'durationInfo',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
title: '处理节点',
|
|
111
|
-
dataIndex: 'taskName'
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
title: '操作人',
|
|
115
|
-
dataIndex: 'assigneeInfo'
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
{
|
|
120
|
-
title: '操作',
|
|
121
|
-
dataIndex: 'option',
|
|
122
|
-
render: (_, record) => (
|
|
123
|
-
<Button size='small' onClick={() => PageUtils.open('/flowable/user-task/instance/view?id='+record.id, '流程信息') }> 查看 </Button>
|
|
124
|
-
),
|
|
125
|
-
},
|
|
126
|
-
]}
|
|
127
|
-
size='small'
|
|
128
|
-
/>;
|
|
129
|
-
|
|
130
|
-
renderMyStart = () => <ProTable
|
|
131
|
-
request={(params) => HttpUtils.get("admin/flowable/user-task/myInstance", params)}
|
|
132
|
-
columns={[
|
|
133
|
-
|
|
134
|
-
{
|
|
135
|
-
title: '流程名称',
|
|
136
|
-
dataIndex: 'processDefinitionName',
|
|
137
|
-
render(_, r) {
|
|
138
|
-
return r.name || r.processDefinitionName
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
title: '发起人',
|
|
143
|
-
dataIndex: 'startUserName',
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
title: '发起时间',
|
|
147
|
-
dataIndex: 'startTime',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
title: '业务标识',
|
|
151
|
-
dataIndex: 'businessKey',
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{
|
|
157
|
-
title: '结束时间',
|
|
158
|
-
dataIndex: 'endTime',
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
{
|
|
162
|
-
title: '流程状态',
|
|
163
|
-
dataIndex: 'x',
|
|
164
|
-
render(_, row) {
|
|
165
|
-
return row.endTime == null ? '进行中' : '已结束'
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
title: '终止原因',
|
|
170
|
-
dataIndex: 'deleteReason',
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
{
|
|
175
|
-
title: '操作',
|
|
176
|
-
dataIndex: 'option',
|
|
177
|
-
render: (_, record) => (
|
|
178
|
-
<Button size='small' onClick={() => PageUtils.open('/flowable/user-task/instance/view?id='+record.id, '流程信息') }> 查看 </Button>
|
|
179
|
-
|
|
180
|
-
),
|
|
181
|
-
},
|
|
182
|
-
]}
|
|
183
|
-
/>;
|
|
184
26
|
}
|
|
@@ -1,85 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {Gap, HttpUtils, Page, PageUtils, ProTable} from "@jiangood/open-admin";
|
|
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 { id} = PageUtils.currentParams()
|
|
27
|
-
|
|
28
|
-
HttpUtils.get("admin/flowable/user-task/getInstanceInfo", {id}).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
|
-
|
|
46
|
-
const {data, loading} = this.state
|
|
47
|
-
const {commentList, img} = data
|
|
48
|
-
if (loading) {
|
|
49
|
-
return <Skeleton/>
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return <Page padding>
|
|
54
|
-
<Card title='流程图'>
|
|
55
|
-
<img src={img} style={{maxWidth: '100%'}}/>
|
|
56
|
-
</Card>
|
|
57
|
-
<Gap/>
|
|
58
|
-
<Card title='审批记录'>
|
|
59
|
-
<Table dataSource={commentList}
|
|
60
|
-
size='small'
|
|
61
|
-
pagination={false}
|
|
62
|
-
rowKey='id'
|
|
63
|
-
columns={[
|
|
64
|
-
{
|
|
65
|
-
dataIndex: 'content',
|
|
66
|
-
title: '操作'
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
dataIndex: 'user',
|
|
70
|
-
title: '处理人',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
dataIndex: 'time',
|
|
74
|
-
title: '处理时间'
|
|
75
|
-
},
|
|
76
|
-
]}
|
|
77
|
-
/>
|
|
78
|
-
</Card>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
</Page>
|
|
82
|
-
}
|
|
83
|
-
|
|
1
|
+
import InstanceView from "@/components/InstanceView";
|
|
84
2
|
|
|
3
|
+
export default function UserTaskInstanceView() {
|
|
4
|
+
return <InstanceView />;
|
|
85
5
|
}
|