@jiangood/open-admin-flowable 2.0.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.
Files changed (27) hide show
  1. package/package.json +38 -0
  2. package/src/layouts/index.jsx +13 -0
  3. package/src/pages/flowable/design/PropertiesPanel.jsx +167 -0
  4. package/src/pages/flowable/design/contextPad.js +50 -0
  5. package/src/pages/flowable/design/customTranslate/customTranslate.js +16 -0
  6. package/src/pages/flowable/design/customTranslate/translations-properties-panel.js +10 -0
  7. package/src/pages/flowable/design/customTranslate/translations.js +144 -0
  8. package/src/pages/flowable/design/descriptors/flowable.json +1109 -0
  9. package/src/pages/flowable/design/index.css +7 -0
  10. package/src/pages/flowable/design/index.jsx +163 -0
  11. package/src/pages/flowable/design/provider/properties/AssignmentSection.jsx +74 -0
  12. package/src/pages/flowable/design/provider/properties/ConditionDesign.jsx +292 -0
  13. package/src/pages/flowable/design/provider/properties/ConditionExpressionUtils.js +53 -0
  14. package/src/pages/flowable/design/provider/properties/ConditionProps.jsx +66 -0
  15. package/src/pages/flowable/design/provider/properties/DelegateExpressionProps.jsx +29 -0
  16. package/src/pages/flowable/design/provider/properties/FormProps.jsx +28 -0
  17. package/src/pages/flowable/design/provider/properties/GeneralSection.jsx +21 -0
  18. package/src/pages/flowable/design/provider/properties/MultiInstanceProps.jsx +37 -0
  19. package/src/pages/flowable/index.jsx +87 -0
  20. package/src/pages/flowable/monitor/definition.jsx +87 -0
  21. package/src/pages/flowable/monitor/instance/index.jsx +82 -0
  22. package/src/pages/flowable/monitor/instance/view.jsx +102 -0
  23. package/src/pages/flowable/monitor/task.jsx +98 -0
  24. package/src/pages/flowable/simulate/index.jsx +400 -0
  25. package/src/pages/flowable/user-task/form.jsx +183 -0
  26. package/src/pages/flowable/user-task/index.jsx +184 -0
  27. package/src/pages/flowable/user-task/instance/view.jsx +85 -0
@@ -0,0 +1,184 @@
1
+ import React from "react";
2
+ import {Button, Tabs} from "antd";
3
+ import {HttpUtils, LinkButton, Page, PageLoading, PageUtils, ProTable} from "@jiangood/open-admin";
4
+
5
+
6
+ export default class extends React.Component {
7
+
8
+ state = {
9
+ show: true
10
+ }
11
+
12
+ render() {
13
+ if (!this.state.show) {
14
+ return <PageLoading/>
15
+ }
16
+
17
+ const items = [
18
+ {label: '待办任务', key: '1', children: this.renderTodo()},
19
+ {label: '已办任务', key: '2', children: this.renderDone()},
20
+ {label: '我发起的', key: '3', children: this.renderMyStart()},
21
+ ]
22
+
23
+ return <Page padding>
24
+ <Tabs defaultActiveKey="1" destroyOnHidden items={items}>
25
+
26
+ </Tabs>
27
+ </Page>
28
+ }
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
+ }
@@ -0,0 +1,85 @@
1
+ import React from "react";
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
+
84
+
85
+ }