@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
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
AutoComplete,
|
|
4
|
+
Button,
|
|
5
|
+
Divider,
|
|
6
|
+
Form,
|
|
7
|
+
Input,
|
|
8
|
+
message,
|
|
9
|
+
Modal,
|
|
10
|
+
Popconfirm,
|
|
11
|
+
Select,
|
|
12
|
+
Space,
|
|
13
|
+
Switch,
|
|
14
|
+
Tag
|
|
15
|
+
} from 'antd'
|
|
2
16
|
import React from 'react'
|
|
3
|
-
import {PlusOutlined
|
|
4
|
-
import {
|
|
17
|
+
import {PlusOutlined} from "@ant-design/icons";
|
|
18
|
+
import {ButtonList, HttpUtils, Page, ProTable, StringUtils, ValueType} from "../../../framework";
|
|
5
19
|
|
|
6
20
|
|
|
7
21
|
const cronOptions = [
|
|
@@ -38,11 +52,16 @@ export default class extends React.Component {
|
|
|
38
52
|
|
|
39
53
|
jobClassOptions: [],
|
|
40
54
|
|
|
41
|
-
paramList: []
|
|
55
|
+
paramList: [],
|
|
56
|
+
|
|
57
|
+
statusOpen: false,
|
|
58
|
+
status: null,
|
|
59
|
+
|
|
60
|
+
executeRecordOpen: false,
|
|
42
61
|
}
|
|
43
62
|
|
|
44
63
|
componentDidMount() {
|
|
45
|
-
|
|
64
|
+
HttpUtils.get('admin/job/jobClassOptions').then(rs => {
|
|
46
65
|
this.setState({jobClassOptions: rs})
|
|
47
66
|
})
|
|
48
67
|
}
|
|
@@ -51,16 +70,10 @@ export default class extends React.Component {
|
|
|
51
70
|
formRef = React.createRef()
|
|
52
71
|
|
|
53
72
|
columns = [
|
|
54
|
-
{
|
|
55
|
-
title: '分组',
|
|
56
|
-
dataIndex: 'group',
|
|
57
|
-
},
|
|
58
73
|
{
|
|
59
74
|
title: '名称',
|
|
60
75
|
dataIndex: 'name',
|
|
61
|
-
|
|
62
|
-
return <a onClick={()=>PageUtil.open('/job/logList?jobId=' + record.id, '作业日志-'+name)}>{name}</a>;
|
|
63
|
-
}
|
|
76
|
+
|
|
64
77
|
},
|
|
65
78
|
{
|
|
66
79
|
title: '执行类',
|
|
@@ -83,15 +96,6 @@ export default class extends React.Component {
|
|
|
83
96
|
}
|
|
84
97
|
},
|
|
85
98
|
|
|
86
|
-
{
|
|
87
|
-
title: '运行状态',
|
|
88
|
-
dataIndex: 'executing',
|
|
89
|
-
render: (v, record) => {
|
|
90
|
-
return record.executing ? <Tag icon={<ReloadOutlined spin/>} color='green'>运行中</Tag> :
|
|
91
|
-
<Tag>空闲</Tag>
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
|
|
95
99
|
|
|
96
100
|
|
|
97
101
|
{
|
|
@@ -110,7 +114,7 @@ export default class extends React.Component {
|
|
|
110
114
|
|
|
111
115
|
return (
|
|
112
116
|
<Space>
|
|
113
|
-
|
|
117
|
+
<Button size='small' onClick={()=>this.showExecuteRecord(record)}>执行记录</Button>
|
|
114
118
|
<Button size='small' onClick={() => this.handleTriggerJob(record)}>执行一次</Button>
|
|
115
119
|
<Button size='small' onClick={() => this.handleEdit(record)}> 编辑 </Button>
|
|
116
120
|
<Popconfirm title='是否确定删除?' onConfirm={() => this.handleDelete(record)}>
|
|
@@ -132,13 +136,13 @@ export default class extends React.Component {
|
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
loadJobParamFields(className, jobData) {
|
|
135
|
-
|
|
139
|
+
HttpUtils.post("admin/job/getJobParamFields", jobData || {}, {className}).then(rs => {
|
|
136
140
|
this.setState({paramList: rs})
|
|
137
141
|
})
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
onFinish = (values) => {
|
|
141
|
-
|
|
145
|
+
HttpUtils.post('admin/job/save', values).then(rs => {
|
|
142
146
|
this.setState({formOpen: false})
|
|
143
147
|
this.tableRef.current.reload();
|
|
144
148
|
})
|
|
@@ -146,29 +150,45 @@ export default class extends React.Component {
|
|
|
146
150
|
|
|
147
151
|
handleDelete = row => {
|
|
148
152
|
const hide = message.loading("删除作业中...")
|
|
149
|
-
|
|
153
|
+
HttpUtils.get('admin/job/delete', {id: row.id}).then(rs => {
|
|
150
154
|
this.tableRef.current.reload();
|
|
151
155
|
}).catch(hide)
|
|
152
156
|
}
|
|
153
157
|
handleTriggerJob = row => {
|
|
154
|
-
|
|
158
|
+
HttpUtils.get('admin/job/triggerJob', {id: row.id}).then(rs => {
|
|
155
159
|
this.tableRef.current.reload();
|
|
156
160
|
})
|
|
157
161
|
}
|
|
158
162
|
|
|
163
|
+
showStatus = () => {
|
|
164
|
+
this.setState({statusOpen: true})
|
|
165
|
+
HttpUtils.get('admin/job/status').then(rs => {
|
|
166
|
+
this.setState({status: rs})
|
|
167
|
+
})
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
showExecuteRecord(record) {
|
|
171
|
+
this.setState({executeRecordOpen: true,formValues: record})
|
|
172
|
+
}
|
|
173
|
+
|
|
159
174
|
|
|
160
175
|
render() {
|
|
161
176
|
return <Page>
|
|
162
177
|
<ProTable
|
|
163
178
|
actionRef={this.tableRef}
|
|
164
179
|
toolBarRender={() => {
|
|
165
|
-
return <
|
|
166
|
-
|
|
167
|
-
|
|
180
|
+
return <ButtonList>
|
|
181
|
+
<Button type='primary' onClick={() => this.handleAdd()} icon={<PlusOutlined/>}>
|
|
182
|
+
新增
|
|
183
|
+
</Button>
|
|
184
|
+
<Button onClick={this.showStatus}>
|
|
185
|
+
查看状态
|
|
186
|
+
</Button>
|
|
187
|
+
</ButtonList>
|
|
168
188
|
}}
|
|
169
|
-
request={(params) =>
|
|
189
|
+
request={(params) => HttpUtils.get('admin/job/page', params)}
|
|
170
190
|
columns={this.columns}
|
|
171
|
-
|
|
191
|
+
showToolbarSearch
|
|
172
192
|
/>
|
|
173
193
|
|
|
174
194
|
|
|
@@ -194,7 +214,8 @@ export default class extends React.Component {
|
|
|
194
214
|
<Input/>
|
|
195
215
|
</Form.Item>
|
|
196
216
|
|
|
197
|
-
<Form.Item label='cron表达式' name='cron' help='格式:秒分时日月周,留空表示手动执行'
|
|
217
|
+
<Form.Item label='cron表达式' name='cron' help='格式:秒分时日月周,留空表示手动执行'
|
|
218
|
+
rules={[{required: true}]}>
|
|
198
219
|
<AutoComplete placeholder='如 0 */5 * * * ?' options={cronOptions}/>
|
|
199
220
|
</Form.Item>
|
|
200
221
|
|
|
@@ -202,17 +223,81 @@ export default class extends React.Component {
|
|
|
202
223
|
<Switch/>
|
|
203
224
|
</Form.Item>
|
|
204
225
|
|
|
226
|
+
|
|
205
227
|
{this.state.paramList?.map(p => (
|
|
206
|
-
<
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
228
|
+
<div key={p.name}>
|
|
229
|
+
<Divider>作业参数</Divider>
|
|
230
|
+
<Form.Item label={p.label}
|
|
231
|
+
name={['jobData', p.name]}
|
|
232
|
+
key={p.name}
|
|
233
|
+
rules={[{required: p.required}]}>
|
|
234
|
+
{ValueType.renderField(p.componentType, p.componentProps)}
|
|
235
|
+
</Form.Item>
|
|
236
|
+
</div>
|
|
212
237
|
))}
|
|
213
238
|
</Form>
|
|
214
239
|
</Modal>
|
|
215
240
|
|
|
241
|
+
<Modal title='作业调度状态'
|
|
242
|
+
open={this.state.statusOpen}
|
|
243
|
+
onCancel={() => this.setState({statusOpen: false})}
|
|
244
|
+
footer={null}
|
|
245
|
+
width={1024}
|
|
246
|
+
>
|
|
247
|
+
<Alert message={<pre>{this.state.status}</pre>}></Alert>
|
|
248
|
+
|
|
249
|
+
</Modal>
|
|
250
|
+
|
|
251
|
+
<Modal title='作业调度记录'
|
|
252
|
+
open={this.state.executeRecordOpen}
|
|
253
|
+
onCancel={() => this.setState({executeRecordOpen: false})}
|
|
254
|
+
footer={null}
|
|
255
|
+
width={1024}
|
|
256
|
+
destroyOnHidden
|
|
257
|
+
>
|
|
258
|
+
<ProTable columns={[{
|
|
259
|
+
title: '开始时间',
|
|
260
|
+
dataIndex: 'beginTime',
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
title: '结束时间',
|
|
264
|
+
dataIndex: 'endTime',
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
title: '耗时',
|
|
268
|
+
dataIndex: 'jobRunTimeLabel',
|
|
269
|
+
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
title: '是否成功',
|
|
273
|
+
dataIndex: 'success',
|
|
274
|
+
width: 200,
|
|
275
|
+
render:v=>{
|
|
276
|
+
if(v != null){
|
|
277
|
+
return v ? '成功':'异常'
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
title: '返回结果',
|
|
283
|
+
dataIndex: 'result',
|
|
284
|
+
width:300
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
{
|
|
288
|
+
title: '操作',
|
|
289
|
+
dataIndex: 'option',
|
|
290
|
+
render: (_, record) => {
|
|
291
|
+
let url = '/admin/sys/log/'+ record.id;
|
|
292
|
+
return <a href={url} target='_blank'>日志</a>;
|
|
293
|
+
},
|
|
294
|
+
}
|
|
295
|
+
]} request={params => {
|
|
296
|
+
params.jobId = this.state.formValues.id
|
|
297
|
+
return HttpUtils.get('admin/job/executeRecord', params);
|
|
298
|
+
}}></ProTable>
|
|
299
|
+
|
|
300
|
+
</Modal>
|
|
216
301
|
</Page>
|
|
217
302
|
}
|
|
218
303
|
|
|
@@ -222,7 +307,7 @@ export default class extends React.Component {
|
|
|
222
307
|
const option = this.state.jobClassOptions.find(o => o.value === changed.jobClass)
|
|
223
308
|
if (option) {
|
|
224
309
|
let {label} = option;
|
|
225
|
-
if (
|
|
310
|
+
if (StringUtils.contains(label, " ")) { // 取中文名部门设置为name
|
|
226
311
|
this.formRef.current.setFieldValue("name", label.split(" ")[1])
|
|
227
312
|
}
|
|
228
313
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {Fragment} from 'react';
|
|
2
2
|
import {Form, Input, Tag} from "antd";
|
|
3
|
-
import {Ellipsis, FieldDateRange,
|
|
3
|
+
import {Ellipsis, FieldDateRange, HttpUtils, ProTable} from "../../../framework";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export default class extends React.Component {
|
|
@@ -57,14 +57,14 @@ export default class extends React.Component {
|
|
|
57
57
|
render() {
|
|
58
58
|
return <>
|
|
59
59
|
<ProTable
|
|
60
|
-
request={(params) =>
|
|
60
|
+
request={(params) => HttpUtils.get('admin/sysLog/page', params)}
|
|
61
61
|
columns={this.columns}
|
|
62
62
|
>
|
|
63
63
|
<Form.Item label='操作' name='operation'>
|
|
64
64
|
<Input/>
|
|
65
65
|
</Form.Item>
|
|
66
66
|
<Form.Item label='时间' name='dateRange'>
|
|
67
|
-
<FieldDateRange
|
|
67
|
+
<FieldDateRange/>
|
|
68
68
|
</Form.Item>
|
|
69
69
|
</ProTable>
|
|
70
70
|
|
|
@@ -2,12 +2,11 @@ import {DeleteOutlined, EditOutlined, PlusOutlined, SyncOutlined} from '@ant-des
|
|
|
2
2
|
import {Button, Card, Checkbox, Empty, Form, Input, Popconfirm, Space, Splitter, Switch, Tree} from 'antd';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
FieldBoolean,
|
|
6
|
+
FieldDictSelect,
|
|
7
7
|
FieldRemoteTreeSelect,
|
|
8
8
|
FieldUserSelect,
|
|
9
|
-
Gap,
|
|
10
|
-
HttpUtil,
|
|
9
|
+
Gap, HttpUtils,
|
|
11
10
|
NamedIcon,
|
|
12
11
|
Page
|
|
13
12
|
} from "../../../framework";
|
|
@@ -43,7 +42,7 @@ export default class extends React.Component {
|
|
|
43
42
|
this.setState({treeLoading: true})
|
|
44
43
|
|
|
45
44
|
const {params} = this.state
|
|
46
|
-
|
|
45
|
+
HttpUtils.get('admin/sysOrg/tree', params).then(rs => {
|
|
47
46
|
let treeData = rs;
|
|
48
47
|
this.setState({treeData})
|
|
49
48
|
}).finally(() => {
|
|
@@ -52,7 +51,7 @@ export default class extends React.Component {
|
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
handleDelete = record => {
|
|
55
|
-
|
|
54
|
+
HttpUtils.get('admin/sysOrg/delete', {id:record.id})
|
|
56
55
|
.then(rs => {
|
|
57
56
|
this.setState({formValues: null})
|
|
58
57
|
this.loadTree()
|
|
@@ -68,7 +67,7 @@ export default class extends React.Component {
|
|
|
68
67
|
|
|
69
68
|
const key = selectedKeys[0]
|
|
70
69
|
this.setState({formLoading: true, formEditing: false})
|
|
71
|
-
|
|
70
|
+
HttpUtils.get( "admin/sysOrg/detail", {id: key}).then(rs => {
|
|
72
71
|
this.setState({formValues: rs})
|
|
73
72
|
}).finally(() => {
|
|
74
73
|
this.setState({formLoading: false})
|
|
@@ -77,7 +76,7 @@ export default class extends React.Component {
|
|
|
77
76
|
|
|
78
77
|
onFinish = (values) => {
|
|
79
78
|
this.setState({submitLoading: true, formEditing: false})
|
|
80
|
-
|
|
79
|
+
HttpUtils.post( 'admin/sysOrg/save', values).then(rs => {
|
|
81
80
|
this.loadTree()
|
|
82
81
|
}).finally(() => {
|
|
83
82
|
this.setState({submitLoading: false})
|
|
@@ -205,14 +204,14 @@ export default class extends React.Component {
|
|
|
205
204
|
|
|
206
205
|
|
|
207
206
|
<Form.Item label='类型' name='type' rules={[{required: true}]}>
|
|
208
|
-
<
|
|
207
|
+
<FieldDictSelect typeCode='orgType'/>
|
|
209
208
|
</Form.Item>
|
|
210
209
|
|
|
211
210
|
<Form.Item label='部门领导' name={['leader','id']} >
|
|
212
|
-
<FieldUserSelect
|
|
211
|
+
<FieldUserSelect />
|
|
213
212
|
</Form.Item>
|
|
214
213
|
<Form.Item label='启用' name='enabled' rules={[{required: true}]}>
|
|
215
|
-
<
|
|
214
|
+
<FieldBoolean/>
|
|
216
215
|
</Form.Item>
|
|
217
216
|
<Form.Item label='扩展字段1' name='extra1'>
|
|
218
217
|
<Input />
|
|
@@ -255,7 +254,7 @@ export default class extends React.Component {
|
|
|
255
254
|
|
|
256
255
|
|
|
257
256
|
console.log(dragNode.title, '->', node.title, 'dropToGap:', dropToGap, "dropPosition:" ,dropPosition)
|
|
258
|
-
|
|
257
|
+
HttpUtils.post('admin/sysOrg/sort', {dropPosition, dropToGap, dropKey, dragKey}).then(this.loadTree)
|
|
259
258
|
};
|
|
260
259
|
}
|
|
261
260
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {PlusOutlined} from '@ant-design/icons'
|
|
2
2
|
import {Button, Form, Input, InputNumber, Modal, Popconfirm, Transfer, Tree} from 'antd'
|
|
3
3
|
import React from 'react'
|
|
4
|
-
import {ButtonList, Ellipsis,
|
|
4
|
+
import {ButtonList, Ellipsis, FieldBoolean, HttpUtils, Page, PageUtils, ProTable} from "../../../framework";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export default class extends React.Component {
|
|
@@ -104,7 +104,7 @@ export default class extends React.Component {
|
|
|
104
104
|
onClick={() => this.handleEditUser(record)}>用户设置</Button>
|
|
105
105
|
|
|
106
106
|
<Button size='small' perm='sysRole:save' disabled={record.builtin}
|
|
107
|
-
onClick={() =>
|
|
107
|
+
onClick={() => PageUtils.open('/system/role/perm?id='+record.id, '角色权限设置')}>权限设置</Button>
|
|
108
108
|
|
|
109
109
|
<Button size='small' perm='sysRole:save' disabled={record.builtin}
|
|
110
110
|
onClick={() => this.handleEdit(record)}>编辑</Button>
|
|
@@ -131,7 +131,7 @@ export default class extends React.Component {
|
|
|
131
131
|
|
|
132
132
|
handleEditUser = record => {
|
|
133
133
|
this.setState({usersModalOpen: true, formValues: record})
|
|
134
|
-
|
|
134
|
+
HttpUtils.get('admin/sysRole/userList', {id: record.id}).then(rs => {
|
|
135
135
|
this.setState({userList: rs.list, targetKeys: rs.selectedKeys})
|
|
136
136
|
})
|
|
137
137
|
}
|
|
@@ -139,7 +139,7 @@ export default class extends React.Component {
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
onFinish = values => {
|
|
142
|
-
|
|
142
|
+
HttpUtils.post('admin/sysRole/save', values).then(rs => {
|
|
143
143
|
this.setState({formOpen: false})
|
|
144
144
|
this.tableRef.current.reload()
|
|
145
145
|
})
|
|
@@ -147,7 +147,7 @@ export default class extends React.Component {
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
handleDelete = record => {
|
|
150
|
-
|
|
150
|
+
HttpUtils.get('admin/sysRole/delete', {id: record.id}).then(rs => {
|
|
151
151
|
this.tableRef.current.reload()
|
|
152
152
|
})
|
|
153
153
|
}
|
|
@@ -157,17 +157,17 @@ export default class extends React.Component {
|
|
|
157
157
|
id: this.state.formValues.id,
|
|
158
158
|
userIdList:this.state.targetKeys
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
HttpUtils.post('admin/sysRole/grantUsers', params).then(rs => {
|
|
161
161
|
this.setState({usersModalOpen:false})
|
|
162
162
|
})
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
handleEditMenu =(record)=>{
|
|
166
166
|
this.setState({menuOpen:true,formValues:record,menuTreeLoading:true})
|
|
167
|
-
|
|
167
|
+
HttpUtils.get('admin/sysRole/ownMenu', {id: record.id}).then(rs => {
|
|
168
168
|
this.setState({menuChecked:rs.checked,menuHalfChecked:rs.halfChecked})
|
|
169
169
|
})
|
|
170
|
-
|
|
170
|
+
HttpUtils.get('admin/sysRole/menuTree').then(rs => {
|
|
171
171
|
this.setState({menuTree:rs, menuTreeLoading:false})
|
|
172
172
|
})
|
|
173
173
|
}
|
|
@@ -176,7 +176,7 @@ export default class extends React.Component {
|
|
|
176
176
|
id: this.state.formValues.id,
|
|
177
177
|
menuIds:[...this.state.menuChecked, ...this.state.menuHalfChecked]
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
HttpUtils.post('admin/sysRole/grantMenu', params).then(rs => {
|
|
180
180
|
debugger
|
|
181
181
|
this.setState({menuOpen:false})
|
|
182
182
|
})
|
|
@@ -193,7 +193,7 @@ export default class extends React.Component {
|
|
|
193
193
|
</Button>
|
|
194
194
|
</ButtonList>
|
|
195
195
|
}}
|
|
196
|
-
request={(params) =>
|
|
196
|
+
request={(params) => HttpUtils.get('admin/sysRole/page', params)}
|
|
197
197
|
columns={this.columns}
|
|
198
198
|
|
|
199
199
|
/>
|
|
@@ -233,7 +233,7 @@ export default class extends React.Component {
|
|
|
233
233
|
</Form.Item>
|
|
234
234
|
|
|
235
235
|
<Form.Item label='启用' name='enabled' rules={[{required: true}]}>
|
|
236
|
-
<
|
|
236
|
+
<FieldBoolean/>
|
|
237
237
|
</Form.Item>
|
|
238
238
|
|
|
239
239
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {Alert, Button, Card, Checkbox, Table, Typography} from "antd";
|
|
3
3
|
import {SaveOutlined} from "@ant-design/icons";
|
|
4
|
-
import {
|
|
4
|
+
import {ArrUtils, HttpUtils, PageUtils} from "../../../framework";
|
|
5
5
|
|
|
6
6
|
export default class extends React.Component {
|
|
7
7
|
|
|
@@ -52,7 +52,7 @@ export default class extends React.Component {
|
|
|
52
52
|
]
|
|
53
53
|
|
|
54
54
|
componentDidMount() {
|
|
55
|
-
this.roleId =
|
|
55
|
+
this.roleId = PageUtils.currentParams().id;
|
|
56
56
|
this.loadData();
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -60,13 +60,13 @@ export default class extends React.Component {
|
|
|
60
60
|
loadData() {
|
|
61
61
|
this.setState({loading: true})
|
|
62
62
|
Promise.all([
|
|
63
|
-
|
|
63
|
+
HttpUtils.get('admin/sysRole/get', {id: this.roleId}).then(rs => {
|
|
64
64
|
this.setState({roleInfo: rs})
|
|
65
65
|
}),
|
|
66
|
-
|
|
66
|
+
HttpUtils.get('admin/sysRole/permTreeTable', {id: this.roleId}).then(rs => {
|
|
67
67
|
this.setState({dataSource: rs})
|
|
68
68
|
}),
|
|
69
|
-
|
|
69
|
+
HttpUtils.get('admin/sysRole/ownPerms', {id: this.roleId}).then(rs => {
|
|
70
70
|
this.setState({rowSelectedKeys: rs})
|
|
71
71
|
})
|
|
72
72
|
]).then(rs => {
|
|
@@ -84,10 +84,10 @@ export default class extends React.Component {
|
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
86
|
menus.push(menuId)
|
|
87
|
-
|
|
87
|
+
ArrUtils.addAll(perms, ks)
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
// Page.open(
|
|
89
|
+
HttpUtils.post('admin/sysRole/savePerms', {id: this.roleId, perms, menus}).then(rs => {
|
|
90
|
+
// Page.open(PageUtils.currentPathname(), PageUtils.currentLabel())
|
|
91
91
|
})
|
|
92
92
|
};
|
|
93
93
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {PlusOutlined} from '@ant-design/icons'
|
|
2
2
|
import {Button, Form, Input, Modal, Popconfirm} from 'antd'
|
|
3
3
|
import React from 'react'
|
|
4
|
-
import {ButtonList, FieldUploadFile,
|
|
4
|
+
import {ButtonList, FieldUploadFile, HttpUtils, Page, ProTable} from "../../../framework";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export default class extends React.Component {
|
|
@@ -35,7 +35,7 @@ export default class extends React.Component {
|
|
|
35
35
|
title: '文件',
|
|
36
36
|
dataIndex: 'fileId',
|
|
37
37
|
render(id){
|
|
38
|
-
const url =
|
|
38
|
+
const url = 'admin/sysFile/preview/' + id;
|
|
39
39
|
return <a href={url} target='_blank'>查看文件</a>
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -65,7 +65,7 @@ export default class extends React.Component {
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
onFinish = values => {
|
|
68
|
-
|
|
68
|
+
HttpUtils.post('admin/sysManual/save', values).then(rs => {
|
|
69
69
|
this.setState({formOpen: false})
|
|
70
70
|
this.tableRef.current.reload()
|
|
71
71
|
})
|
|
@@ -73,7 +73,7 @@ export default class extends React.Component {
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
handleDelete = record => {
|
|
76
|
-
|
|
76
|
+
HttpUtils.get('admin/sysManual/delete', {id: record.id}).then(rs => {
|
|
77
77
|
this.tableRef.current.reload()
|
|
78
78
|
})
|
|
79
79
|
}
|
|
@@ -89,7 +89,7 @@ export default class extends React.Component {
|
|
|
89
89
|
</Button>
|
|
90
90
|
</ButtonList>
|
|
91
91
|
}}
|
|
92
|
-
request={(params) =>
|
|
92
|
+
request={(params) => HttpUtils.get('admin/sysManual/page', params)}
|
|
93
93
|
columns={this.columns}
|
|
94
94
|
|
|
95
95
|
/>
|
|
@@ -113,7 +113,7 @@ export default class extends React.Component {
|
|
|
113
113
|
</Form.Item>
|
|
114
114
|
|
|
115
115
|
<Form.Item label='文件' name='fileId' rules={[{required: true}]}>
|
|
116
|
-
<FieldUploadFile accept=".pdf" maxCount={1}
|
|
116
|
+
<FieldUploadFile accept=".pdf" maxCount={1} />
|
|
117
117
|
</Form.Item>
|
|
118
118
|
|
|
119
119
|
</Form>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {Form, Modal
|
|
1
|
+
import {Form, Modal} from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {FieldDictSelect,
|
|
3
|
+
import {FieldDictSelect, FieldRemoteSelectMultiple, FieldSysOrgTree, HttpUtils} from "../../../framework";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export default class UserPerm extends React.Component {
|
|
@@ -18,7 +18,7 @@ export default class UserPerm extends React.Component {
|
|
|
18
18
|
show(item) {
|
|
19
19
|
this.setState({visible: true})
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
HttpUtils.get('admin/sysUser/getPermInfo', {id: item.id}).then(rs => {
|
|
22
22
|
this.setState({formValues: rs})
|
|
23
23
|
this.formRef.current.setFieldsValue(rs)
|
|
24
24
|
})
|
|
@@ -32,7 +32,7 @@ export default class UserPerm extends React.Component {
|
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
HttpUtils.post('admin/sysUser/grantPerm', values).then(rs => {
|
|
36
36
|
this.setState({
|
|
37
37
|
visible: false,
|
|
38
38
|
confirmLoading: false
|
|
@@ -52,7 +52,7 @@ export default class UserPerm extends React.Component {
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
render() {
|
|
55
|
-
let {visible,
|
|
55
|
+
let {visible, confirmLoading} = this.state
|
|
56
56
|
|
|
57
57
|
return <Modal
|
|
58
58
|
title="授权"
|
|
@@ -73,7 +73,7 @@ export default class UserPerm extends React.Component {
|
|
|
73
73
|
>
|
|
74
74
|
<Form.Item name='id' noStyle></Form.Item>
|
|
75
75
|
<Form.Item label='角色' name='roleIds' rules={[{required: true}]}>
|
|
76
|
-
<
|
|
76
|
+
<FieldRemoteSelectMultiple url='admin/sysRole/options'/>
|
|
77
77
|
</Form.Item>
|
|
78
78
|
<Form.Item label='数据权限' name='dataPermType' rules={[{required: true}]}>
|
|
79
79
|
<FieldDictSelect typeCode='dataPermType' />
|
|
@@ -82,7 +82,7 @@ export default class UserPerm extends React.Component {
|
|
|
82
82
|
|
|
83
83
|
{this.state.formValues.dataPermType === 'CUSTOM' && <>
|
|
84
84
|
<Form.Item label='组织机构' name='orgIds'>
|
|
85
|
-
|
|
85
|
+
<FieldSysOrgTree />
|
|
86
86
|
</Form.Item>
|
|
87
87
|
</>}
|
|
88
88
|
|
|
@@ -95,38 +95,3 @@ export default class UserPerm extends React.Component {
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
class FieldTree extends React.Component {
|
|
100
|
-
|
|
101
|
-
state = {
|
|
102
|
-
treeLoading: true,
|
|
103
|
-
treeData: [],
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
componentDidMount() {
|
|
107
|
-
HttpUtil.get('admin/sysOrg/unitTree').then(treeData => {
|
|
108
|
-
this.setState({treeData, treeLoading: false})
|
|
109
|
-
})
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
render() {
|
|
114
|
-
if (this.state.treeLoading) {
|
|
115
|
-
return <Spin />
|
|
116
|
-
}
|
|
117
|
-
return <Tree
|
|
118
|
-
multiple
|
|
119
|
-
checkable
|
|
120
|
-
onCheck={e => this.props.onChange(e.checked)}
|
|
121
|
-
checkedKeys={this.props.value}
|
|
122
|
-
treeData={this.state.treeData}
|
|
123
|
-
defaultExpandAll
|
|
124
|
-
checkStrictly
|
|
125
|
-
>
|
|
126
|
-
</Tree>
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|