@jiangood/springboot-admin-starter 0.0.2 → 0.0.4
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 +32 -0
- package/config/dist/index.js +0 -1
- package/config/dist/plugins/form-plugin.js +2 -2
- package/package.json +12 -10
- package/src/forms/demoForm.jsx +5 -5
- package/src/framework/components/DownloadFileButton.jsx +2 -2
- package/src/framework/components/Ellipsis.jsx +2 -2
- package/src/framework/components/LinkButton.d.ts +4 -4
- package/src/framework/components/LinkButton.jsx +6 -9
- package/src/framework/components/Page/index.jsx +2 -2
- package/src/framework/components/PageLoading.tsx +27 -0
- package/src/framework/components/ProTable/components/ToolBar/index.jsx +6 -7
- package/src/framework/components/ProTable/index.d.ts +5 -1
- package/src/framework/components/ProTable/index.jsx +4 -6
- package/src/framework/components/ProTable/index.less +0 -1
- package/src/framework/components/ValueType/registry.jsx +9 -20
- package/src/framework/components/{index.js → index.ts} +2 -10
- 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.jsx +2 -2
- package/src/framework/components/view/ViewFile.jsx +1 -2
- package/src/framework/components/view/ViewImage.jsx +2 -3
- package/src/framework/components/view/ViewText.tsx +16 -0
- package/src/framework/components/view/{index.js → index.ts} +0 -2
- 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 +25 -0
- package/src/framework/field-components/FieldDate.jsx +109 -0
- package/src/framework/field-components/FieldDateRange.d.ts +6 -0
- package/src/framework/field-components/FieldDateRange.jsx +101 -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/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/{components/field/FieldEditTable/index.d.ts → field-components/FieldTable.d.ts} +5 -2
- package/src/framework/{components/field/FieldEditTable/index.jsx → field-components/FieldTable.jsx} +29 -21
- package/src/framework/{components/field/select/FieldTableSelect/index.d.ts → field-components/FieldTableSelect.d.ts} +4 -14
- package/src/framework/field-components/FieldTableSelect.jsx +59 -0
- package/src/framework/{components/field/upload → field-components}/FieldUploadFile.d.ts +0 -1
- package/src/framework/{components/field/upload → field-components}/FieldUploadFile.jsx +5 -9
- package/src/framework/field-components/index.ts +20 -0
- package/src/framework/{components/OrgTree.jsx → field-components/system/OrgTree.tsx} +8 -7
- package/src/framework/{components/RoleTree.jsx → field-components/system/RoleTree.tsx} +3 -3
- package/src/framework/field-components/system/index.ts +2 -0
- package/src/framework/index.ts +4 -0
- package/src/framework/utils/ArrUtils.ts +229 -0
- package/src/framework/utils/ColorsUtils.ts +378 -0
- package/src/framework/utils/{date.js → DateUtils.ts} +69 -69
- package/src/framework/utils/DeviceUtils.ts +46 -0
- package/src/framework/utils/DomUtils.ts +50 -0
- package/src/framework/utils/EventBusUtils.ts +143 -0
- package/src/framework/utils/MessageUtils.tsx +182 -0
- package/src/framework/utils/ObjectUtils.ts +113 -0
- package/src/framework/utils/StorageUtils.ts +67 -0
- package/src/framework/utils/StringUtils.ts +410 -0
- package/src/framework/utils/TreeUtils.ts +248 -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 +246 -0
- package/src/framework/utils/system/PageUtils.ts +153 -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/ViewBoolean.jsx +4 -0
- package/src/framework/view-components/index.js +3 -0
- package/src/layouts/PageRender.jsx +2 -2
- package/src/layouts/admin/HeaderRight.jsx +9 -9
- package/src/layouts/admin/TabPageRender.jsx +2 -2
- package/src/layouts/admin/index.jsx +27 -40
- package/src/layouts/admin/index.less +2 -1
- package/src/layouts/index.jsx +30 -38
- package/src/layouts/index.less +0 -21
- package/src/loading.jsx +2 -2
- package/src/{components → pages/flowable}/InstanceInfo.jsx +5 -4
- 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.jsx +61 -234
- 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 +28 -69
- 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 +93 -0
- package/src/pages/flowable/task/form.jsx +5 -5
- package/src/pages/flowable/task/index.jsx +5 -5
- package/src/pages/flowable/test/index.jsx +13 -10
- package/src/pages/index.jsx +8 -13
- package/src/pages/login.jsx +8 -8
- package/src/pages/{api/doc.jsx → system/api/ApiDoc.jsx} +56 -47
- 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 +3 -3
- package/src/pages/system/dict/Dict.jsx +2 -3
- package/src/pages/system/dict/DictItem.jsx +5 -5
- package/src/pages/system/file/index.jsx +13 -5
- package/src/pages/{job → system/job}/index.jsx +124 -39
- package/src/pages/system/log/index.jsx +3 -3
- package/src/pages/system/org/index.jsx +11 -12
- package/src/pages/system/role/index.jsx +11 -11
- package/src/pages/system/role/perm.jsx +8 -8
- package/src/pages/system/sysManual/index.jsx +6 -6
- package/src/pages/system/user/UserPerm.jsx +7 -42
- package/src/pages/system/user/index.jsx +13 -17
- package/src/pages/test.jsx +188 -3
- package/src/pages/ureport/index.jsx +4 -4
- package/src/pages/userCenter/ChangePassword.jsx +3 -4
- package/src/pages/userCenter/index.jsx +2 -2
- package/src/pages/userCenter/manual.jsx +3 -7
- package/src/pages/userCenter/message.jsx +5 -5
- package/config/dist/config.local.js +0 -23
- package/src/components/InstanceStatusInfo.jsx +0 -79
- package/src/components/StreamLog.jsx +0 -27
- package/src/components/flow/BpmnUtils.js +0 -85
- package/src/components/flow/customTranslate/customTranslate.js +0 -19
- package/src/components/flow/customTranslate/translations.js +0 -79
- package/src/components/flow/design/form/ConditionForm.jsx +0 -316
- package/src/components/flow/design/form/ServiceTaskForm.jsx +0 -55
- package/src/components/flow/design/form/TimerEventDefinitionForm.jsx +0 -62
- package/src/components/flow/design/form/UserTaskForm.jsx +0 -211
- package/src/components/flow/design/palette.js +0 -39
- package/src/components/monitor/AllDefinition.jsx +0 -46
- package/src/components/monitor/AllInstance.jsx +0 -76
- package/src/forms/driverForm.jsx +0 -18
- package/src/framework/components/ButtonList.jsx +0 -91
- package/src/framework/components/Echarts/index.d.ts +0 -10
- package/src/framework/components/Echarts/index.jsx +0 -49
- package/src/framework/components/EditTable/index.d.ts +0 -11
- package/src/framework/components/EditTable/index.jsx +0 -85
- package/src/framework/components/FieldRemoteTree.jsx +0 -20
- package/src/framework/components/HasPerm.jsx +0 -18
- package/src/framework/components/ImageView.d.ts +0 -12
- package/src/framework/components/ImageView.jsx +0 -64
- package/src/framework/components/MsgBox.jsx +0 -180
- package/src/framework/components/PageLoading.jsx +0 -31
- package/src/framework/components/Panel/index.d.ts +0 -11
- package/src/framework/components/Panel/index.jsx +0 -24
- package/src/framework/components/Panel/index.less +0 -0
- package/src/framework/components/field/FieldAutoTime/index.tsx +0 -46
- package/src/framework/components/field/FieldBoolean/index.tsx +0 -92
- package/src/framework/components/field/FieldEditTable/index.less +0 -29
- package/src/framework/components/field/FieldEditor.jsx +0 -48
- package/src/framework/components/field/FieldFileBase64/index.d.ts +0 -15
- package/src/framework/components/field/FieldFileBase64/index.jsx +0 -23
- package/src/framework/components/field/FieldImageBase64/index.d.ts +0 -15
- package/src/framework/components/field/FieldImageBase64/index.jsx +0 -22
- package/src/framework/components/field/FieldInput.jsx +0 -13
- package/src/framework/components/field/FieldOrgTree/index.tsx +0 -45
- package/src/framework/components/field/FieldPassword.jsx +0 -11
- package/src/framework/components/field/FieldProps.ts +0 -19
- package/src/framework/components/field/FieldRemoteTreeCascader.jsx +0 -75
- package/src/framework/components/field/FieldRemoteTreeCheckable.jsx +0 -81
- package/src/framework/components/field/FieldRemoteTreeMultipleSelect.jsx +0 -100
- package/src/framework/components/field/FieldRemoteTreeSelect.jsx +0 -82
- package/src/framework/components/field/FieldSelectPosition/index.tsx +0 -85
- package/src/framework/components/field/FieldTree.jsx +0 -45
- package/src/framework/components/field/dict/index.tsx +0 -110
- package/src/framework/components/field/flat-multiple-select/index.d.ts +0 -4
- package/src/framework/components/field/flat-multiple-select/index.jsx +0 -116
- package/src/framework/components/field/flat-multiple-select/index.less +0 -12
- package/src/framework/components/field/flat-select/index.d.ts +0 -4
- package/src/framework/components/field/flat-select/index.jsx +0 -107
- package/src/framework/components/field/flat-select/index.less +0 -12
- package/src/framework/components/field/index.js +0 -33
- package/src/framework/components/field/input-number-percent/index.d.ts +0 -11
- package/src/framework/components/field/input-number-percent/index.jsx +0 -28
- package/src/framework/components/field/select/FieldSelect/index.d.ts +0 -39
- package/src/framework/components/field/select/FieldSelect/index.jsx +0 -156
- package/src/framework/components/field/select/FieldTableSelect/index.jsx +0 -155
- package/src/framework/components/field/select/index.jsx +0 -2
- package/src/framework/components/field/switch-y-n/index.d.ts +0 -11
- package/src/framework/components/field/switch-y-n/index.jsx +0 -31
- package/src/framework/components/field/text/index.tsx +0 -7
- package/src/framework/components/field/time/DatePickerString.tsx +0 -37
- package/src/framework/components/field/time/DateTimePickerString.tsx +0 -42
- package/src/framework/components/field/time/FieldDateRange.d.ts +0 -9
- package/src/framework/components/field/time/FieldDateRange.jsx +0 -49
- package/src/framework/components/field/time/HHmmPickerString.tsx +0 -42
- package/src/framework/components/field/time/MonthPickerString.tsx +0 -45
- package/src/framework/components/field/time/TimePickerTool.ts +0 -14
- package/src/framework/components/field/time/YearPickerString.tsx +0 -41
- package/src/framework/components/field/time/YearQuarterString.tsx +0 -38
- package/src/framework/components/field/time/index.tsx +0 -7
- package/src/framework/components/field/upload/FieldUploadCropImage/index.d.ts +0 -22
- package/src/framework/components/field/upload/FieldUploadCropImage/index.jsx +0 -11
- package/src/framework/components/field/upload/FieldUploadImage.d.ts +0 -7
- package/src/framework/components/field/upload/FieldUploadImage.jsx +0 -16
- package/src/framework/components/field/upload/index.jsx +0 -3
- package/src/framework/components/system.jsx +0 -29
- package/src/framework/components/view/ViewBoolean.jsx +0 -15
- package/src/framework/components/view/ViewBooleanEnableDisable.jsx +0 -16
- package/src/framework/components/view/ViewText.jsx +0 -9
- package/src/framework/index.js +0 -3
- package/src/framework/system/dict.js +0 -88
- package/src/framework/system/formRegistry.js +0 -58
- package/src/framework/system/http.jsx +0 -290
- package/src/framework/system/index.js +0 -13
- package/src/framework/system/page.js +0 -109
- package/src/framework/system/permission.js +0 -44
- package/src/framework/system/sys.js +0 -60
- package/src/framework/system/theme.js +0 -17
- package/src/framework/utils/arr.js +0 -118
- package/src/framework/utils/browser.js +0 -24
- package/src/framework/utils/color.js +0 -269
- package/src/framework/utils/debounce.js +0 -33
- package/src/framework/utils/dom.js +0 -16
- package/src/framework/utils/eventBus.js +0 -70
- package/src/framework/utils/html.js +0 -13
- package/src/framework/utils/index.js +0 -17
- package/src/framework/utils/obj.js +0 -72
- package/src/framework/utils/storage.js +0 -37
- package/src/framework/utils/str.js +0 -297
- package/src/framework/utils/tree.js +0 -175
- package/src/framework/utils/uid.js +0 -76
- package/src/framework/utils/url.js +0 -84
- package/src/framework/utils/validate.js +0 -9
- package/src/pages/api/accessLog/index.jsx +0 -108
- package/src/pages/api/accountResource/index.jsx +0 -149
- package/src/pages/api/index.jsx +0 -163
- package/src/pages/api/resource.jsx +0 -18
- package/src/pages/flowable/instance/view.jsx +0 -13
- package/src/pages/flowable/monitor.jsx +0 -106
- package/src/pages/flowable/test/form.jsx +0 -31
- package/src/pages/job/logList.jsx +0 -100
- package/src/pages/job/status.jsx +0 -84
- /package/src/framework/components/{ButtonList.d.ts → system/ButtonList.d.ts} +0 -0
- /package/src/framework/{components/EditTable/index.less → field-components/FieldTable.less} +0 -0
- /package/src/framework/{components/view → view-components}/ViewPassword.jsx +0 -0
- /package/src/{index.js → index.ts} +0 -0
- /package/src/{components/flow → pages/flowable}/design/contextPad.js +0 -0
|
@@ -2,11 +2,9 @@ import {PlusOutlined} from '@ant-design/icons';
|
|
|
2
2
|
import {Button, Form, Input, Modal, Popconfirm, Splitter, Tabs} from 'antd';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import {
|
|
5
|
-
ButtonList,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
FieldRadioBoolean,
|
|
9
|
-
HttpUtil,
|
|
5
|
+
ButtonList, DictUtils,
|
|
6
|
+
FieldBoolean,
|
|
7
|
+
FieldSysOrgTreeSelect, HttpUtils,
|
|
10
8
|
OrgTree,
|
|
11
9
|
Page,
|
|
12
10
|
ProTable,
|
|
@@ -79,7 +77,7 @@ export default class extends React.Component {
|
|
|
79
77
|
title: '数据权限',
|
|
80
78
|
dataIndex: 'dataPermType',
|
|
81
79
|
render(v) {
|
|
82
|
-
return
|
|
80
|
+
return DictUtils.dictTag('dataPermType', v)
|
|
83
81
|
}
|
|
84
82
|
},
|
|
85
83
|
|
|
@@ -99,12 +97,12 @@ export default class extends React.Component {
|
|
|
99
97
|
onClick={() => this.permRef.current.show(record)}> 授权 </Button>
|
|
100
98
|
|
|
101
99
|
<Popconfirm perm='sysUser:resetPwd' title='确认重置密码?' onConfirm={() => this.resetPwd(record)}>
|
|
102
|
-
<
|
|
100
|
+
<Button size='small' >重置密码</Button>
|
|
103
101
|
</Popconfirm>
|
|
104
102
|
|
|
105
103
|
<Popconfirm perm='sysUser:delete' title={'是否确定删除用户'}
|
|
106
104
|
onConfirm={() => this.handleDelete(record)}>
|
|
107
|
-
<
|
|
105
|
+
<Button size='small' >删除</Button>
|
|
108
106
|
</Popconfirm>
|
|
109
107
|
</ButtonList>;
|
|
110
108
|
},
|
|
@@ -115,7 +113,7 @@ export default class extends React.Component {
|
|
|
115
113
|
|
|
116
114
|
|
|
117
115
|
resetPwd(row) {
|
|
118
|
-
|
|
116
|
+
HttpUtils.post('admin/sysUser/resetPwd', {id: row.id}).then(rs => {
|
|
119
117
|
Modal.success({
|
|
120
118
|
title: '重置密码成功',
|
|
121
119
|
content: rs
|
|
@@ -125,7 +123,7 @@ export default class extends React.Component {
|
|
|
125
123
|
|
|
126
124
|
|
|
127
125
|
handleDelete = r => {
|
|
128
|
-
|
|
126
|
+
HttpUtils.get('admin/sysUser/delete', {id: r.id}).then(rs => {
|
|
129
127
|
this.tableRef.current.reload();
|
|
130
128
|
})
|
|
131
129
|
}
|
|
@@ -151,7 +149,7 @@ export default class extends React.Component {
|
|
|
151
149
|
|
|
152
150
|
|
|
153
151
|
onFinish = values => {
|
|
154
|
-
|
|
152
|
+
HttpUtils.post('admin/sysUser/save', values).then(rs => {
|
|
155
153
|
this.setState({formOpen: false})
|
|
156
154
|
this.tableRef.current.reload()
|
|
157
155
|
})
|
|
@@ -182,7 +180,7 @@ export default class extends React.Component {
|
|
|
182
180
|
<Splitter.Panel style={{paddingLeft:16}}>
|
|
183
181
|
<ProTable
|
|
184
182
|
actionRef={this.tableRef}
|
|
185
|
-
toolBarRender={(
|
|
183
|
+
toolBarRender={() => {
|
|
186
184
|
return <ButtonList>
|
|
187
185
|
<Button
|
|
188
186
|
perm='sysUser:save'
|
|
@@ -197,12 +195,10 @@ export default class extends React.Component {
|
|
|
197
195
|
request={(params) => {
|
|
198
196
|
params.orgId = this.state.currentOrgId
|
|
199
197
|
params.roleId = this.state.currentRoleId
|
|
200
|
-
return
|
|
198
|
+
return HttpUtils.get('admin/sysUser/page', params)
|
|
201
199
|
}
|
|
202
200
|
}
|
|
203
201
|
columns={this.columns}
|
|
204
|
-
rowKey="id"
|
|
205
|
-
scroll={{x: 'max-content'}}
|
|
206
202
|
>
|
|
207
203
|
|
|
208
204
|
</ProTable>
|
|
@@ -223,7 +219,7 @@ export default class extends React.Component {
|
|
|
223
219
|
<Form.Item name='id' noStyle></Form.Item>
|
|
224
220
|
|
|
225
221
|
<Form.Item label='所属机构' name='deptId' rules={[{required: true}]}>
|
|
226
|
-
<
|
|
222
|
+
<FieldSysOrgTreeSelect />
|
|
227
223
|
</Form.Item>
|
|
228
224
|
|
|
229
225
|
<Form.Item label='姓名' name='name' rules={[{required: true}]}>
|
|
@@ -242,7 +238,7 @@ export default class extends React.Component {
|
|
|
242
238
|
</Form.Item>
|
|
243
239
|
|
|
244
240
|
<Form.Item label='启用状态' name='enabled' rules={[{required: true}]}>
|
|
245
|
-
<
|
|
241
|
+
<FieldBoolean/>
|
|
246
242
|
</Form.Item>
|
|
247
243
|
|
|
248
244
|
</Form>
|
package/src/pages/test.jsx
CHANGED
|
@@ -1,15 +1,200 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {Card} from "antd";
|
|
2
|
+
import {Button, Card, Divider, Form, Space} from "antd";
|
|
3
|
+
import {
|
|
4
|
+
FieldBoolean,
|
|
5
|
+
FieldDate,
|
|
6
|
+
FieldDateRange,
|
|
7
|
+
FieldEditor,
|
|
8
|
+
FieldPercent,
|
|
9
|
+
FieldRemoteSelect,
|
|
10
|
+
FieldRemoteSelectMultiple,
|
|
11
|
+
FieldRemoteTree,
|
|
12
|
+
FieldRemoteTreeCascader,
|
|
13
|
+
FieldRemoteTreeSelect,
|
|
14
|
+
FieldRemoteTreeSelectMultiple,
|
|
15
|
+
FieldSysOrgTree,
|
|
16
|
+
FieldSysOrgTreeSelect,
|
|
17
|
+
FieldTable,
|
|
18
|
+
FieldTableSelect,
|
|
19
|
+
FieldUploadFile
|
|
20
|
+
} from "../framework";
|
|
3
21
|
|
|
4
22
|
export default class extends React.Component {
|
|
5
23
|
|
|
6
24
|
|
|
25
|
+
state = {
|
|
26
|
+
formValues: {}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
componentDidMount() {
|
|
31
|
+
const json = localStorage.getItem("_test")
|
|
32
|
+
const formValues = json ? JSON.parse(json) : {}
|
|
33
|
+
this.formRef.current.setFieldsValue(formValues)
|
|
34
|
+
this.setState({formValues})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
formRef = React.createRef()
|
|
38
|
+
|
|
39
|
+
|
|
7
40
|
render() {
|
|
8
41
|
|
|
9
|
-
return
|
|
42
|
+
return <>
|
|
43
|
+
<Card title='表单组件-自定义封装'>
|
|
44
|
+
{JSON.stringify(this.state.formValues)}
|
|
45
|
+
<Divider></Divider>
|
|
46
|
+
<Form
|
|
47
|
+
ref={this.formRef}
|
|
48
|
+
onValuesChange={(changedValues, allValues) => {
|
|
49
|
+
this.setState({formValues: allValues})
|
|
50
|
+
}}
|
|
51
|
+
onReset={() => {
|
|
52
|
+
this.setState({formValues: {}})
|
|
53
|
+
}}
|
|
54
|
+
|
|
55
|
+
onFinish={values => {
|
|
56
|
+
localStorage.setItem("_test", JSON.stringify(values))
|
|
57
|
+
}}
|
|
58
|
+
|
|
59
|
+
labelAlign={'left'}
|
|
60
|
+
labelCol={{flex: '400px',}}
|
|
61
|
+
layout='horizontal'
|
|
62
|
+
>
|
|
63
|
+
<Form.Item label='上传' name='file'>
|
|
64
|
+
<FieldUploadFile cropImage={true} />
|
|
65
|
+
</Form.Item>
|
|
66
|
+
|
|
67
|
+
<Form.Item label='百分数' name='number'>
|
|
68
|
+
<FieldPercent />
|
|
69
|
+
</Form.Item>
|
|
70
|
+
<Form.Item label='机构树选择 (部门) FieldSysOrgTree' name='org'>
|
|
71
|
+
<FieldSysOrgTree />
|
|
72
|
+
</Form.Item>
|
|
73
|
+
<Form.Item label='机构树选择 (部门) FieldSysOrgTreeSelect' name='org'>
|
|
74
|
+
<FieldSysOrgTreeSelect />
|
|
75
|
+
</Form.Item>
|
|
76
|
+
|
|
77
|
+
<Form.Item label='机构树选择(单位) FieldSysOrgTreeSelect' name='org'>
|
|
78
|
+
<FieldSysOrgTreeSelect type='unit' />
|
|
79
|
+
</Form.Item>
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<Form.Item label='选择表格 FieldTableSelect' name='user'>
|
|
84
|
+
<FieldTableSelect url='admin/sysUser/page' columns={[
|
|
85
|
+
{title: '姓名', dataIndex: 'name'},
|
|
86
|
+
{title: '账号', dataIndex: 'account'},
|
|
87
|
+
]}/>
|
|
88
|
+
</Form.Item>
|
|
89
|
+
|
|
90
|
+
<Form.Item label='可编辑表格' name='tableData'>
|
|
91
|
+
<FieldTable columns={[
|
|
92
|
+
{title: '名称', dataIndex: 'name'},
|
|
93
|
+
{title: '年龄', dataIndex: 'age'},
|
|
94
|
+
{title: '婚否', dataIndex: 'marry',render(){
|
|
95
|
+
return <FieldBoolean type='select'></FieldBoolean>
|
|
96
|
+
}},
|
|
97
|
+
]}></FieldTable>
|
|
98
|
+
</Form.Item>
|
|
99
|
+
|
|
100
|
+
<Divider>日期区间 FieldDateRange</Divider>
|
|
101
|
+
<Form.Item label=' YYYY-MM-DD HH:mm:ss' name='dateRange'>
|
|
102
|
+
<FieldDateRange type='YYYY-MM-DD HH:mm:ss'></FieldDateRange>
|
|
103
|
+
</Form.Item>
|
|
104
|
+
<Form.Item label='YYYY-MM-DD HH:mm' name='dateRange'>
|
|
105
|
+
<FieldDateRange type='YYYY-MM-DD HH:mm'></FieldDateRange>
|
|
106
|
+
</Form.Item>
|
|
107
|
+
<Form.Item label='日期' name='dateRange'>
|
|
108
|
+
<FieldDateRange ></FieldDateRange>
|
|
109
|
+
</Form.Item>
|
|
110
|
+
<Form.Item label='YYYY-QQ 季度' name='dateRange'>
|
|
111
|
+
<FieldDateRange type='YYYY-QQ'></FieldDateRange>
|
|
112
|
+
</Form.Item>
|
|
113
|
+
<Form.Item label='YYYY-MM' name='dateRange'>
|
|
114
|
+
<FieldDateRange type='YYYY-MM'></FieldDateRange>
|
|
115
|
+
</Form.Item>
|
|
116
|
+
<Form.Item label='YYYY' name='dateRange'>
|
|
117
|
+
<FieldDateRange type='YYYY'></FieldDateRange>
|
|
118
|
+
</Form.Item>
|
|
119
|
+
<Form.Item label='HH:mm' name='dateRange'>
|
|
120
|
+
<FieldDateRange type='HH:mm'></FieldDateRange>
|
|
121
|
+
</Form.Item>
|
|
122
|
+
<Form.Item label='HH:mm:ss' name='dateRange'>
|
|
123
|
+
<FieldDateRange type='HH:mm:ss'></FieldDateRange>
|
|
124
|
+
</Form.Item>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<Divider>日期</Divider>
|
|
128
|
+
<Form.Item label='YYYY-MM-DD HH:mm:ss' name='date'>
|
|
129
|
+
<FieldDate type='YYYY-MM-DD HH:mm:ss'></FieldDate>
|
|
130
|
+
</Form.Item>
|
|
131
|
+
<Form.Item label='FieldDate YYYY-MM-DD HH:mm' name='date'>
|
|
132
|
+
<FieldDate type='YYYY-MM-DD HH:mm'></FieldDate>
|
|
133
|
+
</Form.Item>
|
|
134
|
+
<Form.Item label='FieldDate 日期' name='date'>
|
|
135
|
+
<FieldDate ></FieldDate>
|
|
136
|
+
</Form.Item>
|
|
137
|
+
<Form.Item label='FieldDate YYYY-QQ 季度' name='date'>
|
|
138
|
+
<FieldDate type='YYYY-QQ'></FieldDate>
|
|
139
|
+
</Form.Item>
|
|
140
|
+
<Form.Item label='FieldDate YYYY-MM' name='date'>
|
|
141
|
+
<FieldDate type='YYYY-MM'></FieldDate>
|
|
142
|
+
</Form.Item>
|
|
143
|
+
<Form.Item label='FieldDate YYYY' name='date'>
|
|
144
|
+
<FieldDate type='YYYY'></FieldDate>
|
|
145
|
+
</Form.Item>
|
|
146
|
+
<Form.Item label='FieldDate HH:mm' name='date'>
|
|
147
|
+
<FieldDate type='HH:mm'></FieldDate>
|
|
148
|
+
</Form.Item>
|
|
149
|
+
<Form.Item label='FieldDate HH:mm:ss' name='date'>
|
|
150
|
+
<FieldDate type='HH:mm:ss'></FieldDate>
|
|
151
|
+
</Form.Item>
|
|
152
|
+
<Divider>布尔</Divider>
|
|
153
|
+
<Form.Item label='FieldBoolean 布尔 (switch)' name='boolean'>
|
|
154
|
+
<FieldBoolean type='switch'></FieldBoolean>
|
|
155
|
+
</Form.Item>
|
|
156
|
+
<Form.Item label='FieldBoolean 布尔 (checkbox)' name='boolean'>
|
|
157
|
+
<FieldBoolean type='checkbox'></FieldBoolean>
|
|
158
|
+
</Form.Item>
|
|
159
|
+
<Form.Item label='FieldBoolean 布尔 (radio)' name='boolean'>
|
|
160
|
+
<FieldBoolean type='radio'></FieldBoolean>
|
|
161
|
+
</Form.Item>
|
|
162
|
+
<Form.Item label='FieldBoolean 布尔 (选择框)' name='boolean'>
|
|
163
|
+
<FieldBoolean type='select'></FieldBoolean>
|
|
164
|
+
</Form.Item>
|
|
165
|
+
<Form.Item label='FieldRemoteTreeSelectMultiple 远程树选择(多选)' name='users'>
|
|
166
|
+
<FieldRemoteTreeSelectMultiple url='admin/sysUser/tree'/>
|
|
167
|
+
</Form.Item>
|
|
168
|
+
|
|
169
|
+
<Divider>选择</Divider>
|
|
170
|
+
<Form.Item label='远程树选择' name='user'>
|
|
171
|
+
<FieldRemoteTreeSelect url='admin/sysUser/tree'/>
|
|
172
|
+
</Form.Item>
|
|
173
|
+
<Form.Item label='远程树(多选)' name='users'>
|
|
174
|
+
<FieldRemoteTree url='admin/sysUser/tree'/>
|
|
175
|
+
</Form.Item>
|
|
176
|
+
<Form.Item label='远程树级联选择' name='user'>
|
|
177
|
+
<FieldRemoteTreeCascader url='admin/sysUser/tree'/>
|
|
178
|
+
</Form.Item>
|
|
179
|
+
|
|
180
|
+
<Form.Item label='单选' name='user'>
|
|
181
|
+
<FieldRemoteSelect url='admin/sysUser/options'/>
|
|
182
|
+
</Form.Item>
|
|
183
|
+
<Form.Item label='多选' name='users'>
|
|
184
|
+
<FieldRemoteSelectMultiple url='admin/sysUser/options'/>
|
|
185
|
+
</Form.Item>
|
|
186
|
+
<Form.Item label='富文本' name='富文本'>
|
|
187
|
+
<FieldEditor height={100}/>
|
|
188
|
+
</Form.Item>
|
|
10
189
|
|
|
190
|
+
<Space>
|
|
191
|
+
<Button type='primary' htmlType='submit'>保存</Button>
|
|
192
|
+
<Button htmlType='reset'>重置</Button>
|
|
193
|
+
</Space>
|
|
194
|
+
</Form>
|
|
11
195
|
|
|
12
196
|
|
|
13
|
-
|
|
197
|
+
</Card>
|
|
198
|
+
</>
|
|
14
199
|
}
|
|
15
200
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import {Button} from "antd";
|
|
3
|
-
import {ButtonList,
|
|
3
|
+
import {ButtonList, HttpUtils, Page, ProTable} from "../../framework";
|
|
4
4
|
|
|
5
5
|
export default class extends React.Component {
|
|
6
6
|
|
|
@@ -10,14 +10,14 @@ export default class extends React.Component {
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
render() {
|
|
13
|
-
return <
|
|
13
|
+
return <Page padding>
|
|
14
14
|
|
|
15
15
|
<ProTable
|
|
16
16
|
toolBarRender={() => <Button type='primary'
|
|
17
17
|
target='_blank'
|
|
18
18
|
href={"/ureport/designer"}>打开设计器</Button>}
|
|
19
19
|
|
|
20
|
-
request={(params) =>
|
|
20
|
+
request={(params) => HttpUtils.get('admin/ureport/page', params)}
|
|
21
21
|
columns={[
|
|
22
22
|
{title: "文件名称", dataIndex: 'name'},
|
|
23
23
|
{title: "存储器", dataIndex: 'providerName'},
|
|
@@ -33,7 +33,7 @@ export default class extends React.Component {
|
|
|
33
33
|
]}></ProTable>
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
</
|
|
36
|
+
</Page>
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
|
|
@@ -3,18 +3,17 @@ import {Button, Form, Input, Modal} from "antd";
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
import {history} from 'umi'
|
|
6
|
-
import {HttpUtil, SysUtil} from "../../framework";
|
|
7
6
|
|
|
8
7
|
export default class extends React.Component {
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
onFinish = (values) => {
|
|
12
|
-
|
|
11
|
+
HttpUtils.post('admin/userCenter/updatePwd', values).then(() => {
|
|
13
12
|
Modal.success({
|
|
14
13
|
title: '提示',
|
|
15
14
|
content: '修改密码成功',
|
|
16
15
|
onOk: () => {
|
|
17
|
-
|
|
16
|
+
SysUtils.setToken(null)
|
|
18
17
|
history.push('/login')
|
|
19
18
|
}
|
|
20
19
|
})
|
|
@@ -23,7 +22,7 @@ export default class extends React.Component {
|
|
|
23
22
|
|
|
24
23
|
validator = (rule, value) => {
|
|
25
24
|
return new Promise((resolve, reject) => {
|
|
26
|
-
|
|
25
|
+
HttpUtils.create().get("admin/sysUser/pwdStrength", {password: value}).then(response => {
|
|
27
26
|
const rs = response.data
|
|
28
27
|
if (!rs.success) {
|
|
29
28
|
reject(rs.message)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {Avatar, Card, Col, Row, Tabs} from "antd";
|
|
3
3
|
import ChangePassword from "./ChangePassword";
|
|
4
|
-
import {
|
|
4
|
+
import {Page} from "../../framework";
|
|
5
5
|
|
|
6
6
|
export default class extends React.Component {
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ export default class extends React.Component {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
componentDidMount() {
|
|
13
|
-
|
|
13
|
+
HttpUtils.get('admin/userCenter/info').then(rs=>{
|
|
14
14
|
this.setState({info:rs})
|
|
15
15
|
})
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import {HttpUtils, Page, ProTable} from "../../framework";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export default class extends React.Component {
|
|
@@ -28,7 +28,7 @@ export default class extends React.Component {
|
|
|
28
28
|
title: '文件',
|
|
29
29
|
dataIndex: 'fileId',
|
|
30
30
|
render(id){
|
|
31
|
-
const url =
|
|
31
|
+
const url = ('admin/sysFile/preview/' + id);
|
|
32
32
|
return <a href={url} target='_blank'>查看文件</a>
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -47,13 +47,9 @@ export default class extends React.Component {
|
|
|
47
47
|
return <Page>
|
|
48
48
|
<ProTable
|
|
49
49
|
actionRef={this.tableRef}
|
|
50
|
-
|
|
51
|
-
request={(params) => HttpUtil.pageData('admin/sysManual/pageForUser', params)}
|
|
50
|
+
request={(params) => HttpUtils.get('admin/sysManual/pageForUser', params)}
|
|
52
51
|
columns={this.columns}
|
|
53
|
-
|
|
54
52
|
/>
|
|
55
|
-
|
|
56
|
-
|
|
57
53
|
</Page>
|
|
58
54
|
|
|
59
55
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {Button, Card, Tabs, Tag} from "antd";
|
|
3
|
-
import {
|
|
3
|
+
import {ProTable} from "../../framework";
|
|
4
4
|
|
|
5
5
|
export default class extends React.Component {
|
|
6
6
|
|
|
@@ -48,7 +48,7 @@ export default class extends React.Component {
|
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
read = (record) => {
|
|
51
|
-
|
|
51
|
+
HttpUtils.post("admin/user/msg/read", record).then(rs => {
|
|
52
52
|
this.tableRef.current.reload()
|
|
53
53
|
})
|
|
54
54
|
}
|
|
@@ -63,7 +63,7 @@ export default class extends React.Component {
|
|
|
63
63
|
<Tabs.TabPane key='0' tab='所有消息'>
|
|
64
64
|
<ProTable
|
|
65
65
|
actionRef={this.tableRef}
|
|
66
|
-
request={(params) =>
|
|
66
|
+
request={(params) => HttpUtils.get("admin/user/msg/page", params)}
|
|
67
67
|
columns={this.columns}
|
|
68
68
|
toolbarOptions={{showSearch:false}}
|
|
69
69
|
size='small'
|
|
@@ -72,7 +72,7 @@ export default class extends React.Component {
|
|
|
72
72
|
<Tabs.TabPane key='1' tab='未读消息'>
|
|
73
73
|
<ProTable
|
|
74
74
|
actionRef={this.tableRef}
|
|
75
|
-
request={(params) =>
|
|
75
|
+
request={(params) => HttpUtils.get("admin/user/msg/page?read=false", params)}
|
|
76
76
|
columns={this.columns}
|
|
77
77
|
rowSelection={false}
|
|
78
78
|
rowKey='id'
|
|
@@ -86,7 +86,7 @@ export default class extends React.Component {
|
|
|
86
86
|
|
|
87
87
|
<ProTable
|
|
88
88
|
actionRef={this.tableRef}
|
|
89
|
-
request={(params) =>
|
|
89
|
+
request={(params) => HttpUtils.get("admin/user/msg/page?read=true", params)}
|
|
90
90
|
rowSelection={false}
|
|
91
91
|
rowKey='id'
|
|
92
92
|
toolbarOptions={{showSearch:false}}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// .umirc.local.ts 仅在 umi dev 时有效。umi build 时不会被加载
|
|
3
|
-
// 这份配置会和 .umirc.ts 做 deep merge 后形成最终配置。
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
var umi_1 = require("umi");
|
|
6
|
-
exports.default = (0, umi_1.defineConfig)({
|
|
7
|
-
proxy: {
|
|
8
|
-
'/admin': {
|
|
9
|
-
target: 'http://127.0.0.1:8002',
|
|
10
|
-
changeOrigin: true,
|
|
11
|
-
},
|
|
12
|
-
'/ureport': {
|
|
13
|
-
target: 'http://127.0.0.1:8002',
|
|
14
|
-
changeOrigin: true,
|
|
15
|
-
pathRewrite: { '^/ureport': '/ureport' },
|
|
16
|
-
},
|
|
17
|
-
'/ws-log-view': {
|
|
18
|
-
target: 'http://127.0.0.1:8002',
|
|
19
|
-
changeOrigin: true,
|
|
20
|
-
ws: true,
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {Card, Empty, Skeleton, Table} from "antd";
|
|
3
|
-
import {HttpUtil} from "../framework";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default class InstanceStatusInfo extends React.Component {
|
|
7
|
-
|
|
8
|
-
state = {
|
|
9
|
-
instanceCommentList: [],
|
|
10
|
-
vars: {},
|
|
11
|
-
|
|
12
|
-
id: null,
|
|
13
|
-
starter: null,
|
|
14
|
-
startTime: null,
|
|
15
|
-
name: null,
|
|
16
|
-
|
|
17
|
-
data: {
|
|
18
|
-
commentList: [],
|
|
19
|
-
img: null
|
|
20
|
-
},
|
|
21
|
-
loading: true,
|
|
22
|
-
|
|
23
|
-
errorMsg: null
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
componentDidMount() {
|
|
28
|
-
const {id, businessKey} = this.props;
|
|
29
|
-
HttpUtil.get("admin/flowable/my/getInstanceInfo", {id, businessKey}).then(rs => {
|
|
30
|
-
this.setState(rs)
|
|
31
|
-
this.setState({data: rs})
|
|
32
|
-
}).catch(e => {
|
|
33
|
-
this.setState({errorMsg: e})
|
|
34
|
-
}).finally(() => {
|
|
35
|
-
this.setState({loading: false})
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
render() {
|
|
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 <Card title='处理记录'>
|
|
54
|
-
<img src={img} style={{maxWidth: '100%'}}/>
|
|
55
|
-
<Table dataSource={commentList}
|
|
56
|
-
bordered
|
|
57
|
-
size='small'
|
|
58
|
-
pagination={false}
|
|
59
|
-
rowKey='id'
|
|
60
|
-
columns={[
|
|
61
|
-
{
|
|
62
|
-
dataIndex: 'content',
|
|
63
|
-
title: '操作'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
dataIndex: 'user',
|
|
67
|
-
title: '处理人'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
dataIndex: 'time',
|
|
71
|
-
title: '处理时间'
|
|
72
|
-
},
|
|
73
|
-
]}
|
|
74
|
-
/>
|
|
75
|
-
</Card>
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {LazyLog, ScrollFollow} from "react-lazylog";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import {SysUtil} from "../framework";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* https://mozilla-frontend-infra.github.io/react-lazylog/
|
|
7
|
-
*/
|
|
8
|
-
export default class extends React.Component {
|
|
9
|
-
|
|
10
|
-
render() {
|
|
11
|
-
const url = this.props.url;
|
|
12
|
-
const headers = SysUtil.getHeaders();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return <ScrollFollow
|
|
16
|
-
startFollowing={true}
|
|
17
|
-
render={({follow, onScroll}) => (
|
|
18
|
-
<LazyLog url={url}
|
|
19
|
-
height={500}
|
|
20
|
-
follow={follow}
|
|
21
|
-
fetchOptions={{credentials:'include', ...headers}}
|
|
22
|
-
onScroll={onScroll}/>
|
|
23
|
-
)}
|
|
24
|
-
/>
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
}
|