@jiangood/springboot-admin-starter 0.0.1
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/config.js +10 -0
- package/config/config.local.js +10 -0
- package/config/defaultConfig.js +35 -0
- package/config/plugins/forms.js +44 -0
- package/config/plugins/routes.js +82 -0
- package/package.json +41 -0
- package/src/.npmignore +6 -0
- package/src/app.js +0 -0
- package/src/asserts/login_bg.jpg +0 -0
- package/src/asserts/welcome.png +0 -0
- package/src/components/InstanceInfo.jsx +138 -0
- package/src/components/InstanceStatusInfo.jsx +79 -0
- package/src/components/StreamLog.jsx +27 -0
- package/src/components/flow/BpmnUtils.js +85 -0
- package/src/components/flow/customTranslate/customTranslate.js +19 -0
- package/src/components/flow/customTranslate/translations.js +79 -0
- package/src/components/flow/design/contextPad.js +50 -0
- package/src/components/flow/design/form/ConditionForm.jsx +316 -0
- package/src/components/flow/design/form/ServiceTaskForm.jsx +55 -0
- package/src/components/flow/design/form/TimerEventDefinitionForm.jsx +62 -0
- package/src/components/flow/design/form/UserTaskForm.jsx +211 -0
- package/src/components/flow/design/palette.js +39 -0
- package/src/components/monitor/AllDefinition.jsx +46 -0
- package/src/components/monitor/AllInstance.jsx +76 -0
- package/src/forms/demoForm.jsx +16 -0
- package/src/framework/components/ButtonList.d.ts +9 -0
- package/src/framework/components/ButtonList.jsx +91 -0
- package/src/framework/components/DownloadFileButton.d.ts +11 -0
- package/src/framework/components/DownloadFileButton.jsx +33 -0
- package/src/framework/components/Echarts/index.d.ts +10 -0
- package/src/framework/components/Echarts/index.jsx +49 -0
- package/src/framework/components/EditTable/index.d.ts +11 -0
- package/src/framework/components/EditTable/index.jsx +85 -0
- package/src/framework/components/EditTable/index.less +29 -0
- package/src/framework/components/Ellipsis.jsx +39 -0
- package/src/framework/components/Ellipsis.less +8 -0
- package/src/framework/components/FieldRemoteTree.jsx +20 -0
- package/src/framework/components/Gap/index.d.ts +10 -0
- package/src/framework/components/Gap/index.jsx +15 -0
- package/src/framework/components/Gap/index.less +3 -0
- package/src/framework/components/HasPerm.jsx +18 -0
- package/src/framework/components/ImageView.d.ts +12 -0
- package/src/framework/components/ImageView.jsx +64 -0
- package/src/framework/components/LinkButton.d.ts +14 -0
- package/src/framework/components/LinkButton.jsx +13 -0
- package/src/framework/components/MsgBox.jsx +180 -0
- package/src/framework/components/NamedIcon.tsx +15 -0
- package/src/framework/components/OrgTree.jsx +60 -0
- package/src/framework/components/Page/index.d.ts +10 -0
- package/src/framework/components/Page/index.jsx +30 -0
- package/src/framework/components/Page/index.less +10 -0
- package/src/framework/components/PageLoading.jsx +31 -0
- package/src/framework/components/Panel/index.d.ts +11 -0
- package/src/framework/components/Panel/index.jsx +24 -0
- package/src/framework/components/Panel/index.less +0 -0
- package/src/framework/components/ProModal/index.tsx +66 -0
- package/src/framework/components/ProTable/components/ToolBar/index.jsx +124 -0
- package/src/framework/components/ProTable/components/ToolBar/index.less +53 -0
- package/src/framework/components/ProTable/index.d.ts +38 -0
- package/src/framework/components/ProTable/index.jsx +258 -0
- package/src/framework/components/ProTable/index.less +3 -0
- package/src/framework/components/ProTable/utils/index.js +43 -0
- package/src/framework/components/RoleTree.jsx +53 -0
- package/src/framework/components/ValueType/index.jsx +34 -0
- package/src/framework/components/ValueType/registry.jsx +38 -0
- package/src/framework/components/field/FieldAutoTime/index.tsx +46 -0
- package/src/framework/components/field/FieldBoolean/index.tsx +92 -0
- package/src/framework/components/field/FieldEditTable/index.d.ts +13 -0
- package/src/framework/components/field/FieldEditTable/index.jsx +103 -0
- package/src/framework/components/field/FieldEditTable/index.less +29 -0
- package/src/framework/components/field/FieldEditor.jsx +48 -0
- package/src/framework/components/field/FieldFileBase64/index.d.ts +15 -0
- package/src/framework/components/field/FieldFileBase64/index.jsx +23 -0
- package/src/framework/components/field/FieldImageBase64/index.d.ts +15 -0
- package/src/framework/components/field/FieldImageBase64/index.jsx +22 -0
- package/src/framework/components/field/FieldInput.jsx +13 -0
- package/src/framework/components/field/FieldOrgTree/index.tsx +45 -0
- package/src/framework/components/field/FieldPassword.jsx +11 -0
- package/src/framework/components/field/FieldProps.ts +19 -0
- package/src/framework/components/field/FieldRemoteTreeCascader.jsx +75 -0
- package/src/framework/components/field/FieldRemoteTreeCheckable.jsx +81 -0
- package/src/framework/components/field/FieldRemoteTreeMultipleSelect.jsx +100 -0
- package/src/framework/components/field/FieldRemoteTreeSelect.jsx +82 -0
- package/src/framework/components/field/FieldSelectPosition/index.tsx +85 -0
- package/src/framework/components/field/FieldTree.jsx +45 -0
- package/src/framework/components/field/dict/index.tsx +110 -0
- package/src/framework/components/field/flat-multiple-select/index.d.ts +4 -0
- package/src/framework/components/field/flat-multiple-select/index.jsx +116 -0
- package/src/framework/components/field/flat-multiple-select/index.less +12 -0
- package/src/framework/components/field/flat-select/index.d.ts +4 -0
- package/src/framework/components/field/flat-select/index.jsx +107 -0
- package/src/framework/components/field/flat-select/index.less +12 -0
- package/src/framework/components/field/index.js +33 -0
- package/src/framework/components/field/input-number-percent/index.d.ts +11 -0
- package/src/framework/components/field/input-number-percent/index.jsx +28 -0
- package/src/framework/components/field/select/FieldSelect/index.d.ts +39 -0
- package/src/framework/components/field/select/FieldSelect/index.jsx +156 -0
- package/src/framework/components/field/select/FieldTableSelect/index.d.ts +29 -0
- package/src/framework/components/field/select/FieldTableSelect/index.jsx +155 -0
- package/src/framework/components/field/select/index.jsx +2 -0
- package/src/framework/components/field/switch-y-n/index.d.ts +11 -0
- package/src/framework/components/field/switch-y-n/index.jsx +31 -0
- package/src/framework/components/field/text/index.tsx +7 -0
- package/src/framework/components/field/time/DatePickerString.tsx +37 -0
- package/src/framework/components/field/time/DateTimePickerString.tsx +42 -0
- package/src/framework/components/field/time/FieldDateRange.d.ts +9 -0
- package/src/framework/components/field/time/FieldDateRange.jsx +49 -0
- package/src/framework/components/field/time/HHmmPickerString.tsx +42 -0
- package/src/framework/components/field/time/MonthPickerString.tsx +45 -0
- package/src/framework/components/field/time/TimePickerTool.ts +14 -0
- package/src/framework/components/field/time/YearPickerString.tsx +41 -0
- package/src/framework/components/field/time/YearQuarterString.tsx +38 -0
- package/src/framework/components/field/time/index.tsx +7 -0
- package/src/framework/components/field/upload/FieldUploadCropImage/index.d.ts +22 -0
- package/src/framework/components/field/upload/FieldUploadCropImage/index.jsx +11 -0
- package/src/framework/components/field/upload/FieldUploadFile.d.ts +35 -0
- package/src/framework/components/field/upload/FieldUploadFile.jsx +145 -0
- package/src/framework/components/field/upload/FieldUploadImage.d.ts +7 -0
- package/src/framework/components/field/upload/FieldUploadImage.jsx +16 -0
- package/src/framework/components/field/upload/index.jsx +3 -0
- package/src/framework/components/index.js +25 -0
- package/src/framework/components/system.jsx +29 -0
- package/src/framework/components/view/ViewBoolean.jsx +15 -0
- package/src/framework/components/view/ViewBooleanEnableDisable.jsx +16 -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 +50 -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 +61 -0
- package/src/framework/components/view/ViewPassword.jsx +24 -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.jsx +9 -0
- package/src/framework/components/view/index.js +12 -0
- package/src/framework/index.js +3 -0
- package/src/framework/system/FormRegistry.js +58 -0
- package/src/framework/system/dict.js +88 -0
- package/src/framework/system/http.jsx +290 -0
- package/src/framework/system/index.js +13 -0
- package/src/framework/system/page.js +109 -0
- package/src/framework/system/permission.js +44 -0
- package/src/framework/system/sys.js +60 -0
- package/src/framework/system/theme.js +17 -0
- package/src/framework/utils/arr.js +118 -0
- package/src/framework/utils/browser.js +24 -0
- package/src/framework/utils/color.js +269 -0
- package/src/framework/utils/date.js +173 -0
- package/src/framework/utils/debounce.js +33 -0
- package/src/framework/utils/dom.js +16 -0
- package/src/framework/utils/eventBus.js +70 -0
- package/src/framework/utils/html.js +13 -0
- package/src/framework/utils/index.js +17 -0
- package/src/framework/utils/obj.js +72 -0
- package/src/framework/utils/storage.js +37 -0
- package/src/framework/utils/str.js +297 -0
- package/src/framework/utils/tree.js +175 -0
- package/src/framework/utils/uid.js +76 -0
- package/src/framework/utils/url.js +84 -0
- package/src/framework/utils/validate.js +9 -0
- package/src/index.js +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 +174 -0
- package/src/layouts/admin/index.less +64 -0
- package/src/layouts/index.jsx +163 -0
- package/src/layouts/index.less +45 -0
- package/src/loading.jsx +18 -0
- package/src/pages/404.jsx +13 -0
- package/src/pages/about.jsx +14 -0
- package/src/pages/api/accessLog/index.jsx +108 -0
- package/src/pages/api/accountResource/index.jsx +149 -0
- package/src/pages/api/doc.jsx +135 -0
- package/src/pages/api/index.jsx +163 -0
- package/src/pages/api/resource.jsx +18 -0
- package/src/pages/flowable/design/index.css +7 -0
- package/src/pages/flowable/design/index.jsx +297 -0
- package/src/pages/flowable/index.jsx +128 -0
- package/src/pages/flowable/instance/view.jsx +13 -0
- package/src/pages/flowable/monitor.jsx +106 -0
- package/src/pages/flowable/task/form.jsx +99 -0
- package/src/pages/flowable/task/index.jsx +200 -0
- package/src/pages/flowable/test/form.jsx +31 -0
- package/src/pages/flowable/test/index.jsx +54 -0
- package/src/pages/index.jsx +25 -0
- package/src/pages/job/index.jsx +239 -0
- package/src/pages/job/logList.jsx +100 -0
- package/src/pages/job/status.jsx +84 -0
- package/src/pages/login.jsx +144 -0
- package/src/pages/login.less +53 -0
- package/src/pages/system/config/index.jsx +136 -0
- package/src/pages/system/dict/Dict.jsx +73 -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 +152 -0
- package/src/pages/system/log/index.jsx +78 -0
- package/src/pages/system/org/index.jsx +263 -0
- package/src/pages/system/role/index.jsx +314 -0
- package/src/pages/system/role/perm.jsx +111 -0
- package/src/pages/system/sysManual/index.jsx +127 -0
- package/src/pages/system/user/UserPerm.jsx +132 -0
- package/src/pages/system/user/index.jsx +261 -0
- package/src/pages/test.jsx +16 -0
- package/src/pages/ureport/index.jsx +43 -0
- package/src/pages/userCenter/ChangePassword.jsx +64 -0
- package/src/pages/userCenter/index.jsx +90 -0
- package/src/pages/userCenter/manual.jsx +63 -0
- package/src/pages/userCenter/message.jsx +105 -0
- package/src/style/global.less +51 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import {PlusOutlined} from '@ant-design/icons';
|
|
2
|
+
import {Button, Form, Input, Modal, Popconfirm, Splitter, Tabs} from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import {
|
|
5
|
+
ButtonList,
|
|
6
|
+
dictValueTag,
|
|
7
|
+
FieldOrgTreeSelect,
|
|
8
|
+
FieldRadioBoolean,
|
|
9
|
+
HttpUtil,
|
|
10
|
+
OrgTree,
|
|
11
|
+
Page,
|
|
12
|
+
ProTable,
|
|
13
|
+
RoleTree
|
|
14
|
+
} from "../../../framework";
|
|
15
|
+
import UserPerm from "./UserPerm";
|
|
16
|
+
|
|
17
|
+
export default class extends React.Component {
|
|
18
|
+
|
|
19
|
+
state = {
|
|
20
|
+
showAddForm: false,
|
|
21
|
+
showEditForm: false,
|
|
22
|
+
formValues: {},
|
|
23
|
+
|
|
24
|
+
currentOrgId: null,
|
|
25
|
+
currentRoleId:null,
|
|
26
|
+
}
|
|
27
|
+
permRef = React.createRef();
|
|
28
|
+
|
|
29
|
+
formRef = React.createRef()
|
|
30
|
+
tableRef = React.createRef()
|
|
31
|
+
|
|
32
|
+
columns = [
|
|
33
|
+
{
|
|
34
|
+
title: '单位',
|
|
35
|
+
dataIndex: 'unitLabel',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: '部门',
|
|
39
|
+
dataIndex: 'deptLabel',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: '姓名',
|
|
43
|
+
dataIndex: 'name',
|
|
44
|
+
sorter: true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: '登录账号',
|
|
48
|
+
dataIndex: 'account',
|
|
49
|
+
sorter: true
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
{
|
|
54
|
+
title: '手机',
|
|
55
|
+
dataIndex: 'phone'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: '邮箱',
|
|
59
|
+
dataIndex: 'email'
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
{
|
|
63
|
+
title: '角色',
|
|
64
|
+
dataIndex: 'roleIds',
|
|
65
|
+
render: (_, row) => {
|
|
66
|
+
if (row.roleNames) {
|
|
67
|
+
return row.roleNames.join(',')
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: '状态',
|
|
73
|
+
dataIndex: 'enabled',
|
|
74
|
+
render(v) {
|
|
75
|
+
return v == null ? null : (v ? '是' : '否')
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: '数据权限',
|
|
80
|
+
dataIndex: 'dataPermType',
|
|
81
|
+
render(v) {
|
|
82
|
+
return dictValueTag('dataPermType', v)
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
{
|
|
87
|
+
title: '创建时间',
|
|
88
|
+
dataIndex: 'createTime',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: '操作',
|
|
92
|
+
dataIndex: 'option',
|
|
93
|
+
fixed:'right',
|
|
94
|
+
render: (_, record) => {
|
|
95
|
+
return <ButtonList>
|
|
96
|
+
<Button size='small' perm='sysUser:save' onClick={() => this.handleEdit(record)}> 编辑 </Button>
|
|
97
|
+
|
|
98
|
+
<Button size='small' perm='sysUser:grantPerm'
|
|
99
|
+
onClick={() => this.permRef.current.show(record)}> 授权 </Button>
|
|
100
|
+
|
|
101
|
+
<Popconfirm perm='sysUser:resetPwd' title='确认重置密码?' onConfirm={() => this.resetPwd(record)}>
|
|
102
|
+
<a>重置密码</a>
|
|
103
|
+
</Popconfirm>
|
|
104
|
+
|
|
105
|
+
<Popconfirm perm='sysUser:delete' title={'是否确定删除用户'}
|
|
106
|
+
onConfirm={() => this.handleDelete(record)}>
|
|
107
|
+
<a>删除</a>
|
|
108
|
+
</Popconfirm>
|
|
109
|
+
</ButtonList>;
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
resetPwd(row) {
|
|
118
|
+
HttpUtil.post('admin/sysUser/resetPwd', {id: row.id}).then(rs => {
|
|
119
|
+
Modal.success({
|
|
120
|
+
title: '重置密码成功',
|
|
121
|
+
content: rs
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
handleDelete = r => {
|
|
128
|
+
HttpUtil.get('admin/sysUser/delete', {id: r.id}).then(rs => {
|
|
129
|
+
this.tableRef.current.reload();
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
onSelectOrg = (key) => {
|
|
136
|
+
this.setState({currentOrgId: key}, () => this.tableRef.current.reload())
|
|
137
|
+
}
|
|
138
|
+
onSelectRole = (key) => {
|
|
139
|
+
this.setState({currentRoleId: key}, () => this.tableRef.current.reload())
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
handleAdd = () => {
|
|
144
|
+
this.setState({formOpen: true, formValues: {}})
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
handleEdit = record => {
|
|
148
|
+
record.deptId = record.deptId || record.unitId
|
|
149
|
+
this.setState({formOpen: true, formValues: record})
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
onFinish = values => {
|
|
154
|
+
HttpUtil.post('admin/sysUser/save', values).then(rs => {
|
|
155
|
+
this.setState({formOpen: false})
|
|
156
|
+
this.tableRef.current.reload()
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
render() {
|
|
161
|
+
|
|
162
|
+
return <Page>
|
|
163
|
+
<Splitter >
|
|
164
|
+
<Splitter.Panel defaultSize={400} >
|
|
165
|
+
<Tabs
|
|
166
|
+
type='card'
|
|
167
|
+
size='small'
|
|
168
|
+
items={[
|
|
169
|
+
{
|
|
170
|
+
key: 'org',
|
|
171
|
+
label: '按组织机构',
|
|
172
|
+
children: <OrgTree onChange={this.onSelectOrg}/>
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
key: 'role',
|
|
176
|
+
label: '按角色',
|
|
177
|
+
children: <RoleTree onSelect={this.onSelectRole}/>
|
|
178
|
+
}
|
|
179
|
+
]}/>
|
|
180
|
+
|
|
181
|
+
</Splitter.Panel>
|
|
182
|
+
<Splitter.Panel style={{paddingLeft:16}}>
|
|
183
|
+
<ProTable
|
|
184
|
+
actionRef={this.tableRef}
|
|
185
|
+
toolBarRender={(params, {selectedRows,selectedRowKeys}) => {
|
|
186
|
+
return <ButtonList>
|
|
187
|
+
<Button
|
|
188
|
+
perm='sysUser:save'
|
|
189
|
+
type="primary"
|
|
190
|
+
onClick={this.handleAdd}>
|
|
191
|
+
<PlusOutlined/> 新增
|
|
192
|
+
</Button>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
</ButtonList>
|
|
196
|
+
}}
|
|
197
|
+
request={(params) => {
|
|
198
|
+
params.orgId = this.state.currentOrgId
|
|
199
|
+
params.roleId = this.state.currentRoleId
|
|
200
|
+
return HttpUtil.pageData('admin/sysUser/page', params)
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
columns={this.columns}
|
|
204
|
+
rowKey="id"
|
|
205
|
+
scroll={{x: 'max-content'}}
|
|
206
|
+
>
|
|
207
|
+
|
|
208
|
+
</ProTable>
|
|
209
|
+
</Splitter.Panel>
|
|
210
|
+
</Splitter>
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
<Modal title='系统用户'
|
|
214
|
+
open={this.state.formOpen}
|
|
215
|
+
onOk={() => this.formRef.current.submit()}
|
|
216
|
+
onCancel={() => this.setState({formOpen: false})}
|
|
217
|
+
destroyOnHidden
|
|
218
|
+
>
|
|
219
|
+
|
|
220
|
+
<Form ref={this.formRef} labelCol={{flex: '100px'}}
|
|
221
|
+
initialValues={this.state.formValues}
|
|
222
|
+
onFinish={this.onFinish}>
|
|
223
|
+
<Form.Item name='id' noStyle></Form.Item>
|
|
224
|
+
|
|
225
|
+
<Form.Item label='所属机构' name='deptId' rules={[{required: true}]}>
|
|
226
|
+
<FieldOrgTreeSelect/>
|
|
227
|
+
</Form.Item>
|
|
228
|
+
|
|
229
|
+
<Form.Item label='姓名' name='name' rules={[{required: true}]}>
|
|
230
|
+
<Input/>
|
|
231
|
+
</Form.Item>
|
|
232
|
+
<Form.Item label='账号' name='account' rules={[{required: true}]}>
|
|
233
|
+
<Input/>
|
|
234
|
+
</Form.Item>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
<Form.Item label='电话' name='phone'>
|
|
238
|
+
<Input/>
|
|
239
|
+
</Form.Item>
|
|
240
|
+
<Form.Item label='邮箱' name='email'>
|
|
241
|
+
<Input/>
|
|
242
|
+
</Form.Item>
|
|
243
|
+
|
|
244
|
+
<Form.Item label='启用状态' name='enabled' rules={[{required: true}]}>
|
|
245
|
+
<FieldRadioBoolean/>
|
|
246
|
+
</Form.Item>
|
|
247
|
+
|
|
248
|
+
</Form>
|
|
249
|
+
</Modal>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
<UserPerm ref={this.permRef} onOk={() => this.tableRef.current.reload()}/>
|
|
253
|
+
|
|
254
|
+
</Page>
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {Button} from "antd";
|
|
3
|
+
import {ButtonList, HttpUtil, ProTable} from "../../framework";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
state = {
|
|
8
|
+
status: {}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
render() {
|
|
13
|
+
return <div>
|
|
14
|
+
|
|
15
|
+
<ProTable
|
|
16
|
+
toolBarRender={() => <Button type='primary'
|
|
17
|
+
target='_blank'
|
|
18
|
+
href={"/ureport/designer"}>打开设计器</Button>}
|
|
19
|
+
|
|
20
|
+
request={(params) => HttpUtil.pageData('admin/ureport/page', params)}
|
|
21
|
+
columns={[
|
|
22
|
+
{title: "文件名称", dataIndex: 'name'},
|
|
23
|
+
{title: "存储器", dataIndex: 'providerName'},
|
|
24
|
+
{title: "存储器前缀", dataIndex: 'providerPrefix'},
|
|
25
|
+
{title: "更新时间", dataIndex: 'updateDate'},
|
|
26
|
+
{title: "-", dataIndex: 'option',
|
|
27
|
+
render(_,record){
|
|
28
|
+
return <ButtonList >
|
|
29
|
+
<Button size='small' perm='ureport:view' href={record.previewUrl} target='_blank'>预览</Button>
|
|
30
|
+
<Button size='small' perm='ureport:design' href={record.designerUrl} target='_blank'>设计</Button>
|
|
31
|
+
</ButtonList>
|
|
32
|
+
}},
|
|
33
|
+
]}></ProTable>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Form, Input, Modal} from "antd";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import {history} from 'umi'
|
|
6
|
+
import {HttpUtil, SysUtil} from "../../framework";
|
|
7
|
+
|
|
8
|
+
export default class extends React.Component {
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
onFinish = (values) => {
|
|
12
|
+
HttpUtil.post('admin/userCenter/updatePwd', values).then(() => {
|
|
13
|
+
Modal.success({
|
|
14
|
+
title: '提示',
|
|
15
|
+
content: '修改密码成功',
|
|
16
|
+
onOk: () => {
|
|
17
|
+
SysUtil.setToken(null)
|
|
18
|
+
history.push('/login')
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
validator = (rule, value) => {
|
|
25
|
+
return new Promise((resolve, reject) => {
|
|
26
|
+
HttpUtil.create().get("admin/sysUser/pwdStrength", {password: value}).then(response => {
|
|
27
|
+
const rs = response.data
|
|
28
|
+
if (!rs.success) {
|
|
29
|
+
reject(rs.message)
|
|
30
|
+
}
|
|
31
|
+
resolve()
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
render() {
|
|
38
|
+
return <div>
|
|
39
|
+
|
|
40
|
+
<Form onFinish={this.onFinish} style={{maxWidth: 400}}>
|
|
41
|
+
|
|
42
|
+
<Form.Item name='newPassword'
|
|
43
|
+
label='新密码'
|
|
44
|
+
extra={'请输入字母、数字、特殊字符'}
|
|
45
|
+
rules={[
|
|
46
|
+
{required: true},
|
|
47
|
+
{
|
|
48
|
+
validator: this.validator
|
|
49
|
+
}
|
|
50
|
+
]}
|
|
51
|
+
>
|
|
52
|
+
<Input.Password></Input.Password>
|
|
53
|
+
</Form.Item>
|
|
54
|
+
|
|
55
|
+
<Form.Item wrapperCol={{offset: 5}} style={{marginTop: 40}}>
|
|
56
|
+
<Button type="primary" htmlType="submit">
|
|
57
|
+
确定
|
|
58
|
+
</Button>
|
|
59
|
+
</Form.Item>
|
|
60
|
+
</Form>
|
|
61
|
+
|
|
62
|
+
</div>
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Avatar, Card, Col, Row, Tabs} from "antd";
|
|
3
|
+
import ChangePassword from "./ChangePassword";
|
|
4
|
+
import {HttpUtil, Page} from "../../framework";
|
|
5
|
+
|
|
6
|
+
export default class extends React.Component {
|
|
7
|
+
|
|
8
|
+
state = {
|
|
9
|
+
info :{}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
componentDidMount() {
|
|
13
|
+
HttpUtil.get('admin/userCenter/info').then(rs=>{
|
|
14
|
+
this.setState({info:rs})
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
render() {
|
|
19
|
+
const {info} = this.state;
|
|
20
|
+
return <Page padding backgroundGray>
|
|
21
|
+
<Row gutter={[16,16]}>
|
|
22
|
+
<Col md={6} sm={24}>
|
|
23
|
+
<Card title='个人信息'>
|
|
24
|
+
|
|
25
|
+
<div className='flex-center' style={{marginBottom:32}}>
|
|
26
|
+
<Avatar size={128} title='点击修改头像' />
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<table className='tmgg-table'>
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr>
|
|
33
|
+
<td>用户名称</td>
|
|
34
|
+
<td align='right'>{info.name}</td>
|
|
35
|
+
</tr>
|
|
36
|
+
<tr>
|
|
37
|
+
<td>账号</td>
|
|
38
|
+
<td align='right'>{info.account}</td>
|
|
39
|
+
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<td>手机号码</td>
|
|
42
|
+
<td>{info.phone}</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td>用户邮箱</td>
|
|
46
|
+
<td>{info.email}</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>所属部门</td>
|
|
50
|
+
<td>{info.unit} {info.dept}</td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td>所属角色</td>
|
|
54
|
+
<td>{info.roles}</td>
|
|
55
|
+
</tr>
|
|
56
|
+
<tr>
|
|
57
|
+
<td>创建日期</td>
|
|
58
|
+
<td>{info.createTime}</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
</Card>
|
|
63
|
+
</Col>
|
|
64
|
+
<Col md={18} sm={24}>
|
|
65
|
+
<Card title='个人设置'>
|
|
66
|
+
<Tabs
|
|
67
|
+
items={[
|
|
68
|
+
{
|
|
69
|
+
label: '修改密码', key: 'pwd', children: <div>
|
|
70
|
+
<ChangePassword/>
|
|
71
|
+
</div>
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: '消息订阅', key: 'topic', children: <div>
|
|
75
|
+
当账号管理邮箱后,系统消息会发送邮件给您
|
|
76
|
+
</div>
|
|
77
|
+
}
|
|
78
|
+
]}
|
|
79
|
+
tabPosition='left'
|
|
80
|
+
>
|
|
81
|
+
</Tabs>
|
|
82
|
+
</Card>
|
|
83
|
+
</Col>
|
|
84
|
+
</Row>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
</Page>
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {HttpUtil, Page, ProTable, SysUtil} from "../../framework";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
tableRef = React.createRef()
|
|
9
|
+
|
|
10
|
+
columns = [
|
|
11
|
+
|
|
12
|
+
{
|
|
13
|
+
title: '名称',
|
|
14
|
+
dataIndex: 'name',
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
{
|
|
20
|
+
title: '版本',
|
|
21
|
+
dataIndex: 'version',
|
|
22
|
+
render(version) {
|
|
23
|
+
return 'v' +version;
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
{
|
|
28
|
+
title: '文件',
|
|
29
|
+
dataIndex: 'fileId',
|
|
30
|
+
render(id){
|
|
31
|
+
const url = SysUtil.wrapServerUrl('admin/sysFile/preview/' + id);
|
|
32
|
+
return <a href={url} target='_blank'>查看文件</a>
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
{
|
|
38
|
+
title: '更新时间',
|
|
39
|
+
dataIndex: 'updateTime',
|
|
40
|
+
},
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
render() {
|
|
47
|
+
return <Page>
|
|
48
|
+
<ProTable
|
|
49
|
+
actionRef={this.tableRef}
|
|
50
|
+
|
|
51
|
+
request={(params) => HttpUtil.pageData('admin/sysManual/pageForUser', params)}
|
|
52
|
+
columns={this.columns}
|
|
53
|
+
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</Page>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Card, Tabs, Tag} from "antd";
|
|
3
|
+
import {HttpUtil, ProTable} from "../../framework";
|
|
4
|
+
|
|
5
|
+
export default class extends React.Component {
|
|
6
|
+
|
|
7
|
+
tableRef = React.createRef()
|
|
8
|
+
|
|
9
|
+
columns = [
|
|
10
|
+
{
|
|
11
|
+
title: '时间',
|
|
12
|
+
dataIndex: 'createTime',
|
|
13
|
+
width: 150
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: '标题',
|
|
17
|
+
dataIndex: 'title',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: '内容',
|
|
21
|
+
dataIndex: 'content',
|
|
22
|
+
render(content, row) {
|
|
23
|
+
return <div dangerouslySetInnerHTML={{__html: content}}/>
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: '已读时间',
|
|
28
|
+
dataIndex: 'readTime',
|
|
29
|
+
width: 150
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: '状态',
|
|
33
|
+
dataIndex: 'isRead',
|
|
34
|
+
render: (v, row) => {
|
|
35
|
+
return v == true ? <Tag color='green'>已读</Tag> : <Tag color='red'>未读</Tag>;
|
|
36
|
+
},
|
|
37
|
+
width: 80
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
title: '-',
|
|
42
|
+
dataIndex: 'option',
|
|
43
|
+
render: (read, row) => {
|
|
44
|
+
if(!row.isRead)
|
|
45
|
+
return <Button size='small' onClick={() => this.read(row)}> 标记已读 </Button>
|
|
46
|
+
}, width: 80
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
read = (record) => {
|
|
51
|
+
HttpUtil.post("admin/user/msg/read", record).then(rs => {
|
|
52
|
+
this.tableRef.current.reload()
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
render() {
|
|
59
|
+
return <Card variant={"borderless"}>
|
|
60
|
+
|
|
61
|
+
<Tabs defaultActiveKey="0" destroyOnHidden
|
|
62
|
+
>
|
|
63
|
+
<Tabs.TabPane key='0' tab='所有消息'>
|
|
64
|
+
<ProTable
|
|
65
|
+
actionRef={this.tableRef}
|
|
66
|
+
request={(params) => HttpUtil.pageData("admin/user/msg/page", params)}
|
|
67
|
+
columns={this.columns}
|
|
68
|
+
toolbarOptions={{showSearch:false}}
|
|
69
|
+
size='small'
|
|
70
|
+
/>
|
|
71
|
+
</Tabs.TabPane>
|
|
72
|
+
<Tabs.TabPane key='1' tab='未读消息'>
|
|
73
|
+
<ProTable
|
|
74
|
+
actionRef={this.tableRef}
|
|
75
|
+
request={(params) => HttpUtil.pageData("admin/user/msg/page?read=false", params)}
|
|
76
|
+
columns={this.columns}
|
|
77
|
+
rowSelection={false}
|
|
78
|
+
rowKey='id'
|
|
79
|
+
toolbarOptions={{showSearch:false}}
|
|
80
|
+
size='small'
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
</Tabs.TabPane>
|
|
85
|
+
<Tabs.TabPane key='2' tab='已读消息'>
|
|
86
|
+
|
|
87
|
+
<ProTable
|
|
88
|
+
actionRef={this.tableRef}
|
|
89
|
+
request={(params) => HttpUtil.pageData("admin/user/msg/page?read=true", params)}
|
|
90
|
+
rowSelection={false}
|
|
91
|
+
rowKey='id'
|
|
92
|
+
toolbarOptions={{showSearch:false}}
|
|
93
|
+
options={false}
|
|
94
|
+
size='small'
|
|
95
|
+
columns={this.columns}
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
</Tabs.TabPane>
|
|
100
|
+
|
|
101
|
+
</Tabs>
|
|
102
|
+
|
|
103
|
+
</Card>
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*主要在layout中导入*/
|
|
2
|
+
table.tmgg-table {
|
|
3
|
+
width: 100%;
|
|
4
|
+
border-collapse: collapse; /* 合并边框 */
|
|
5
|
+
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
|
|
6
|
+
table-layout: fixed;
|
|
7
|
+
|
|
8
|
+
th {
|
|
9
|
+
background-color: #f2f2f2; /* 背景色 */
|
|
10
|
+
color: #333; /* 文字颜色 */
|
|
11
|
+
font-weight: bold; /* 加粗 */
|
|
12
|
+
padding: 12px 15px; /* 内边距 */
|
|
13
|
+
text-align: left; /* 文字对齐 */
|
|
14
|
+
border-bottom: 2px solid #ddd; /* 底部边框 */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
td {
|
|
18
|
+
padding: 10px 15px; /* 内边距 */
|
|
19
|
+
border-bottom: 1px solid #ddd; /* 底部边框 */
|
|
20
|
+
text-align: left; /* 文字对齐 */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* 表格行悬停效果 */
|
|
24
|
+
|
|
25
|
+
tr:hover {
|
|
26
|
+
background-color: #f5f5f5; /* 悬停背景色 */
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* 斑马纹效果 - 交替行颜色 */
|
|
30
|
+
tr:nth-child(even) {
|
|
31
|
+
background-color: #f9f9f9;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* 响应式表格 - 在小屏幕上添加水平滚动 */
|
|
35
|
+
@media screen and (max-width: 600px) {
|
|
36
|
+
table {
|
|
37
|
+
display: block;
|
|
38
|
+
overflow-x: auto;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
.flex-center {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|