@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,98 @@
|
|
|
1
|
+
import {FieldUserSelect, HttpUtils, Page, ProTable} from "../../../framework";
|
|
2
|
+
import {Button, Form, Modal} from "antd";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
state = {
|
|
9
|
+
assigneeFormOpen:false,
|
|
10
|
+
assigneeFormValues:{}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
assigneeFormRef = React.createRef()
|
|
14
|
+
taskTableRef = React.createRef()
|
|
15
|
+
|
|
16
|
+
onClickSetAssignee = id => {
|
|
17
|
+
this.setState({assigneeFormOpen:true,assigneeFormValues:{taskId:id}})
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
submitSetAssignee = values => {
|
|
21
|
+
HttpUtils.post('admin/flowable/monitor/setAssignee',values).then(()=>{
|
|
22
|
+
this.setState({assigneeFormOpen:false})
|
|
23
|
+
this.taskTableRef.current.reload()
|
|
24
|
+
})
|
|
25
|
+
};
|
|
26
|
+
render() {
|
|
27
|
+
return <Page padding>
|
|
28
|
+
<ProTable
|
|
29
|
+
actionRef={this.taskTableRef}
|
|
30
|
+
columns={[
|
|
31
|
+
{
|
|
32
|
+
dataIndex: 'processInstanceName',
|
|
33
|
+
title: '实例名称'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
dataIndex: 'name',
|
|
37
|
+
title: '任务名称',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
dataIndex: 'assigneeLabel',
|
|
41
|
+
title: '处理人'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
dataIndex: 'id',
|
|
45
|
+
title: '任务标识',
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
{
|
|
49
|
+
dataIndex: 'processDefinitionId',
|
|
50
|
+
title: '定义'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
dataIndex: 'processInstanceId',
|
|
54
|
+
title: '实例'
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
{
|
|
60
|
+
dataIndex: 'startTime',
|
|
61
|
+
title: '开始时间'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
dataIndex: 'tenantId',
|
|
65
|
+
title: '租户'
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
{
|
|
69
|
+
dataIndex:'id',
|
|
70
|
+
render:(id)=>{
|
|
71
|
+
return <Button size='small' onClick={()=>this.onClickSetAssignee(id)}>指定处理人</Button>
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]}
|
|
75
|
+
request={(params) => HttpUtils.get('admin/flowable/monitor/task', params)}
|
|
76
|
+
>
|
|
77
|
+
<Form.Item label='受理人' name='assignee'>
|
|
78
|
+
<FieldUserSelect />
|
|
79
|
+
</Form.Item>
|
|
80
|
+
</ProTable>
|
|
81
|
+
<Modal title='指定处理人'
|
|
82
|
+
open={this.state.assigneeFormOpen}
|
|
83
|
+
onOk={()=>this.assigneeFormRef.current.submit()}
|
|
84
|
+
onCancel={()=>this.setState({assigneeFormOpen:false})}
|
|
85
|
+
destroyOnHidden
|
|
86
|
+
>
|
|
87
|
+
<Form ref={this.assigneeFormRef} onFinish={this.submitSetAssignee} initialValues={this.state.assigneeFormValues}>
|
|
88
|
+
<Form.Item name='taskId' noStyle>
|
|
89
|
+
</Form.Item>
|
|
90
|
+
<Form.Item name='assignee' label='用户'>
|
|
91
|
+
<FieldUserSelect />
|
|
92
|
+
</Form.Item>
|
|
93
|
+
</Form>
|
|
94
|
+
</Modal>
|
|
95
|
+
</Page>
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Card, Empty, Form, Input, message, Modal, Radio, Spin, Splitter, Table, Tabs, Typography,} from "antd";
|
|
3
|
+
import {history} from "umi";
|
|
4
|
+
import {FormRegistryUtils, Gap, HttpUtils, Page, PageUtils} from "../../../framework";
|
|
5
|
+
import {FormOutlined, ShareAltOutlined} from "@ant-design/icons";
|
|
6
|
+
|
|
7
|
+
export default class extends React.Component {
|
|
8
|
+
|
|
9
|
+
state = {
|
|
10
|
+
submitLoading: false,
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
instanceCommentList: [],
|
|
14
|
+
vars: {},
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
data: {
|
|
18
|
+
taskId: null,
|
|
19
|
+
commentList: [],
|
|
20
|
+
img: null
|
|
21
|
+
},
|
|
22
|
+
loading: true,
|
|
23
|
+
|
|
24
|
+
errorMsg: null
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
externalFormRef = React.createRef()
|
|
30
|
+
|
|
31
|
+
componentDidMount() {
|
|
32
|
+
const {taskId} = PageUtils.currentParams()
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
HttpUtils.get("admin/flowable/my/getInstanceInfoByTaskId", {taskId}).then(rs => {
|
|
36
|
+
this.setState({data: rs})
|
|
37
|
+
}).catch(e => {
|
|
38
|
+
this.setState({errorMsg: e})
|
|
39
|
+
}).finally(() => {
|
|
40
|
+
this.setState({loading: false})
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onImgClick = () => {
|
|
47
|
+
Modal.info({
|
|
48
|
+
title: '流程图',
|
|
49
|
+
width: '70vw',
|
|
50
|
+
content: <div style={{width: '100%', overflow: 'auto', maxHeight: '80vh'}}>
|
|
51
|
+
<img src={this.state.data.img}/>
|
|
52
|
+
</div>
|
|
53
|
+
})
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
handleTask = async value => {
|
|
58
|
+
this.setState({submitLoading: true});
|
|
59
|
+
try {
|
|
60
|
+
if (value.result === 'APPROVE') {
|
|
61
|
+
const fn = this.externalFormRef.current?.submit
|
|
62
|
+
if (fn) {
|
|
63
|
+
await fn()
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
value.taskId = this.state.data.taskId
|
|
68
|
+
await HttpUtils.post("admin/flowable/my/handleTask", value)
|
|
69
|
+
history.replace('/flowable/task')
|
|
70
|
+
} catch (error) {
|
|
71
|
+
message.error(error)
|
|
72
|
+
} finally {
|
|
73
|
+
this.setState({submitLoading: false})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
render() {
|
|
79
|
+
const {submitLoading} = this.state
|
|
80
|
+
|
|
81
|
+
const {data, loading} = this.state
|
|
82
|
+
const {commentList, img} = data
|
|
83
|
+
if(loading){
|
|
84
|
+
return <Spin/>
|
|
85
|
+
}
|
|
86
|
+
return <Page padding>
|
|
87
|
+
|
|
88
|
+
<Splitter>
|
|
89
|
+
<Splitter.Panel>
|
|
90
|
+
<Typography.Title level={4}>{data.name}</Typography.Title>
|
|
91
|
+
<Typography.Text type="secondary">{data.starter} {data.startTime}</Typography.Text>
|
|
92
|
+
<Gap></Gap>
|
|
93
|
+
<Tabs
|
|
94
|
+
items={[
|
|
95
|
+
{
|
|
96
|
+
key: '1',
|
|
97
|
+
label: '表单',
|
|
98
|
+
icon: <FormOutlined/>,
|
|
99
|
+
children: this.renderForm()
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: '2',
|
|
103
|
+
label: '流程',
|
|
104
|
+
icon: <ShareAltOutlined/>,
|
|
105
|
+
children: this.renderProcess(img, commentList)
|
|
106
|
+
}
|
|
107
|
+
]}>
|
|
108
|
+
|
|
109
|
+
</Tabs>
|
|
110
|
+
</Splitter.Panel>
|
|
111
|
+
<Splitter.Panel defaultSize={400}>
|
|
112
|
+
<Card title='审批意见'>
|
|
113
|
+
<Form
|
|
114
|
+
layout='vertical'
|
|
115
|
+
onFinish={this.handleTask}
|
|
116
|
+
disabled={submitLoading}
|
|
117
|
+
>
|
|
118
|
+
|
|
119
|
+
<Form.Item label='审批结果' name='result' rules={[{required: true, message: '请选择'}]}
|
|
120
|
+
initialValue={'APPROVE'}>
|
|
121
|
+
<Radio.Group>
|
|
122
|
+
<Radio value='APPROVE'>同意</Radio>
|
|
123
|
+
<Radio value='REJECT'>不同意</Radio>
|
|
124
|
+
</Radio.Group>
|
|
125
|
+
</Form.Item>
|
|
126
|
+
<Form.Item label='审批意见' name='comment'
|
|
127
|
+
rules={[{required: true, message: '请输入审批意见'}]}>
|
|
128
|
+
<Input.TextArea/>
|
|
129
|
+
</Form.Item>
|
|
130
|
+
<div>
|
|
131
|
+
<Button type='primary' htmlType='submit' loading={submitLoading}
|
|
132
|
+
size={"middle"}>提 交</Button>
|
|
133
|
+
</div>
|
|
134
|
+
</Form>
|
|
135
|
+
</Card>
|
|
136
|
+
</Splitter.Panel>
|
|
137
|
+
|
|
138
|
+
</Splitter>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</Page>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
renderProcess = (img, commentList) => <Card title='处理记录'>
|
|
147
|
+
<img src={img} style={{maxWidth: '100%'}}
|
|
148
|
+
onClick={this.onImgClick}/>
|
|
149
|
+
<Gap></Gap>
|
|
150
|
+
<Table dataSource={commentList}
|
|
151
|
+
|
|
152
|
+
size='small'
|
|
153
|
+
pagination={false}
|
|
154
|
+
rowKey='id'
|
|
155
|
+
columns={[
|
|
156
|
+
{
|
|
157
|
+
dataIndex: 'content',
|
|
158
|
+
title: '操作'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
dataIndex: 'user',
|
|
162
|
+
title: '处理人'
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
dataIndex: 'time',
|
|
166
|
+
title: '处理时间'
|
|
167
|
+
},
|
|
168
|
+
]}
|
|
169
|
+
/>
|
|
170
|
+
</Card>;
|
|
171
|
+
|
|
172
|
+
renderForm = () => {
|
|
173
|
+
const {data} = this.state
|
|
174
|
+
const {businessKey} = data
|
|
175
|
+
const formKey = data.formKey;
|
|
176
|
+
const formName = data.formKey + 'Form'
|
|
177
|
+
|
|
178
|
+
let ExForm = FormRegistryUtils.get(formName);
|
|
179
|
+
if (!ExForm) {
|
|
180
|
+
console.error(" 表单不存在: "+formName+"。 请检查表单源代码:src/forms/"+formName+".jsx")
|
|
181
|
+
return <Empty description={"表单不存在: " + formName}></Empty>
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return <ExForm id={businessKey} formKey={formKey} ref={this.externalFormRef} ></ExForm>
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Tabs} from "antd";
|
|
3
|
+
import {HttpUtils, LinkButton, Page, PageLoading, PageUtils, ProTable} from "../../../framework";
|
|
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/my/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/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/my/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/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/my/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/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 "../../../../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 { id} = PageUtils.currentParams()
|
|
27
|
+
|
|
28
|
+
HttpUtils.get("admin/flowable/my/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
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Card, Form, Input} from "antd";
|
|
3
|
+
import {HttpUtils, MessageUtils, PageLoading, PageUtils, StringUtils} from "../../../framework";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
state = {
|
|
8
|
+
model: undefined
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
componentDidMount() {
|
|
13
|
+
let params = PageUtils.currentParams()
|
|
14
|
+
const id = this.id = params.id
|
|
15
|
+
|
|
16
|
+
HttpUtils.get('admin/flowable/test/get', {id}).then(rs=>{
|
|
17
|
+
this.setState({model: rs})
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
render() {
|
|
24
|
+
if(this.state.model === undefined){
|
|
25
|
+
return <PageLoading />
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return <Card title={'流程测试 / 【' + this.state.model.name + "】 / " + this.state.model.key }>
|
|
29
|
+
<Form onFinish={this.onFinish} layout='vertical' >
|
|
30
|
+
<Form.Item name='key' noStyle initialValue={this.state.model.key}>
|
|
31
|
+
</Form.Item>
|
|
32
|
+
|
|
33
|
+
<Form.Item name='id' label='业务标识(相当于业务表的id)' rules={[{required: true}]} initialValue={StringUtils.random(16)}>
|
|
34
|
+
<Input />
|
|
35
|
+
</Form.Item>
|
|
36
|
+
|
|
37
|
+
{this.state.model.variables.map(item=><Form.Item key={item.name} name={item.name} label={item.label}>
|
|
38
|
+
<Input />
|
|
39
|
+
</Form.Item>)}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
<Form.Item label=' ' colon={false}>
|
|
44
|
+
<Button htmlType="submit" type='primary'>提交</Button>
|
|
45
|
+
</Form.Item>
|
|
46
|
+
</Form>
|
|
47
|
+
</Card>
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
onFinish = values => {
|
|
51
|
+
HttpUtils.post('admin/flowable/test/submit', values).then(rs=>{
|
|
52
|
+
MessageUtils.confirm('跳转任务列表?').then(()=>{
|
|
53
|
+
PageUtils.open('/flowable/monitor/task')
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Card} from "antd";
|
|
3
|
+
import {MessageUtils} from "../framework";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export default class extends React.Component {
|
|
7
|
+
|
|
8
|
+
state = {}
|
|
9
|
+
|
|
10
|
+
componentDidMount() {
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
render() {
|
|
15
|
+
|
|
16
|
+
return <Card>
|
|
17
|
+
欢迎使用本系统
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</Card>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {LoginPage} from "../framework/pages/LoginPage";
|
|
4
|
+
import {Button} from "antd";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export default class extends React.Component {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
render() {
|
|
13
|
+
return <LoginPage />
|
|
14
|
+
// 支持自定义
|
|
15
|
+
// return <LoginPage form={<Button type={"primary"} size='large'>xx登录</Button>} />
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
}
|