@jiangood/admin-spring-boot-starter 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/dist/config.js +45 -0
- package/config/dist/index.js +19 -0
- package/config/dist/plugins/form-plugin.js +51 -0
- package/config/dist/plugins/route-plugin.js +72 -0
- package/package.json +41 -0
- package/src/app.js +1 -0
- package/src/asserts/welcome.png +0 -0
- package/src/forms/demoForm.jsx +16 -0
- package/src/framework/components/DownloadFileButton.d.ts +11 -0
- package/src/framework/components/DownloadFileButton.jsx +33 -0
- package/src/framework/components/Ellipsis.jsx +39 -0
- package/src/framework/components/Ellipsis.less +8 -0
- package/src/framework/components/Gap/index.d.ts +23 -0
- package/src/framework/components/Gap/index.jsx +46 -0
- package/src/framework/components/LinkButton.d.ts +14 -0
- package/src/framework/components/LinkButton.jsx +10 -0
- package/src/framework/components/NamedIcon.tsx +15 -0
- package/src/framework/components/Page/index.d.ts +17 -0
- package/src/framework/components/Page/index.jsx +30 -0
- package/src/framework/components/Page/index.less +10 -0
- package/src/framework/components/PageLoading.tsx +27 -0
- package/src/framework/components/ProModal/index.tsx +66 -0
- package/src/framework/components/ProTable/components/ToolBar/index.jsx +123 -0
- package/src/framework/components/ProTable/components/ToolBar/index.less +53 -0
- package/src/framework/components/ProTable/index.d.ts +42 -0
- package/src/framework/components/ProTable/index.jsx +260 -0
- package/src/framework/components/ProTable/index.less +14 -0
- package/src/framework/components/ProTable/utils/index.js +43 -0
- package/src/framework/components/ValueType/index.jsx +34 -0
- package/src/framework/components/ValueType/registry.jsx +27 -0
- package/src/framework/components/index.ts +17 -0
- package/src/framework/components/system/ButtonList.d.ts +9 -0
- package/src/framework/components/system/ButtonList.jsx +35 -0
- package/src/framework/components/system/HasPerm.tsx +14 -0
- package/src/framework/components/system/index.tsx +29 -0
- package/src/framework/components/view/ViewBooleanEnableDisable.tsx +20 -0
- package/src/framework/components/view/ViewEllipsis.d.ts +11 -0
- package/src/framework/components/view/ViewEllipsis.jsx +30 -0
- package/src/framework/components/view/ViewFile.d.ts +10 -0
- package/src/framework/components/view/ViewFile.jsx +49 -0
- package/src/framework/components/view/ViewFileButton.d.ts +10 -0
- package/src/framework/components/view/ViewFileButton.jsx +0 -0
- package/src/framework/components/view/ViewImage.d.ts +9 -0
- package/src/framework/components/view/ViewImage.jsx +60 -0
- package/src/framework/components/view/ViewRange/index.d.ts +16 -0
- package/src/framework/components/view/ViewRange/index.jsx +20 -0
- package/src/framework/components/view/ViewText.tsx +16 -0
- package/src/framework/components/view/index.ts +10 -0
- package/src/framework/field-components/FieldBoolean.d.ts +13 -0
- package/src/framework/field-components/FieldBoolean.jsx +76 -0
- package/src/framework/field-components/FieldDate.d.ts +27 -0
- package/src/framework/field-components/FieldDate.jsx +114 -0
- package/src/framework/field-components/FieldDateRange.d.ts +6 -0
- package/src/framework/field-components/FieldDateRange.jsx +104 -0
- package/src/framework/field-components/FieldDictSelect.d.ts +13 -0
- package/src/framework/field-components/FieldDictSelect.jsx +16 -0
- package/src/framework/field-components/FieldEditor.d.ts +10 -0
- package/src/framework/field-components/FieldEditor.jsx +58 -0
- package/src/framework/field-components/FieldNumberRange.d.ts +13 -0
- package/src/framework/field-components/FieldNumberRange.jsx +59 -0
- package/src/framework/field-components/FieldPercent.d.ts +12 -0
- package/src/framework/field-components/FieldPercent.jsx +27 -0
- package/src/framework/field-components/FieldRemoteSelect.d.ts +13 -0
- package/src/framework/field-components/FieldRemoteSelect.jsx +87 -0
- package/src/framework/field-components/FieldRemoteSelectMultiple.d.ts +13 -0
- package/src/framework/field-components/FieldRemoteSelectMultiple.jsx +86 -0
- package/src/framework/field-components/FieldRemoteSelectMultipleInline.d.ts +20 -0
- package/src/framework/field-components/FieldRemoteSelectMultipleInline.jsx +86 -0
- package/src/framework/field-components/FieldRemoteTree.d.ts +21 -0
- package/src/framework/field-components/FieldRemoteTree.jsx +45 -0
- package/src/framework/field-components/FieldRemoteTreeCascader.d.ts +23 -0
- package/src/framework/field-components/FieldRemoteTreeCascader.jsx +61 -0
- package/src/framework/field-components/FieldRemoteTreeSelect.d.ts +17 -0
- package/src/framework/field-components/FieldRemoteTreeSelect.jsx +67 -0
- package/src/framework/field-components/FieldRemoteTreeSelectMultiple.d.ts +17 -0
- package/src/framework/field-components/FieldRemoteTreeSelectMultiple.jsx +68 -0
- package/src/framework/field-components/FieldSysOrgTree.d.ts +12 -0
- package/src/framework/field-components/FieldSysOrgTree.jsx +23 -0
- package/src/framework/field-components/FieldSysOrgTreeSelect.d.ts +12 -0
- package/src/framework/field-components/FieldSysOrgTreeSelect.jsx +23 -0
- package/src/framework/field-components/FieldTable.d.ts +17 -0
- package/src/framework/field-components/FieldTable.jsx +108 -0
- package/src/framework/field-components/FieldTable.less +29 -0
- package/src/framework/field-components/FieldTableSelect.d.ts +19 -0
- package/src/framework/field-components/FieldTableSelect.jsx +59 -0
- package/src/framework/field-components/FieldUploadFile.d.ts +34 -0
- package/src/framework/field-components/FieldUploadFile.jsx +141 -0
- package/src/framework/field-components/index.ts +21 -0
- package/src/framework/field-components/system/OrgTree.tsx +61 -0
- package/src/framework/field-components/system/RoleTree.tsx +53 -0
- package/src/framework/field-components/system/index.ts +2 -0
- package/src/framework/index.ts +5 -0
- package/src/framework/pages/LoginPage.d.ts +15 -0
- package/src/framework/pages/LoginPage.jsx +132 -0
- package/src/framework/pages/LoginPage.less +53 -0
- package/src/framework/pages/LoginPageUtils.ts +35 -0
- package/src/framework/pages/index.ts +2 -0
- package/src/framework/utils/ArrUtils.ts +229 -0
- package/src/framework/utils/ColorsUtils.ts +378 -0
- package/src/framework/utils/DateUtils.ts +187 -0
- package/src/framework/utils/DeviceUtils.ts +46 -0
- package/src/framework/utils/DomUtils.ts +50 -0
- package/src/framework/utils/EventBusUtils.ts +144 -0
- package/src/framework/utils/MessageUtils.tsx +145 -0
- package/src/framework/utils/ObjectUtils.ts +118 -0
- package/src/framework/utils/StorageUtils.ts +50 -0
- package/src/framework/utils/StringUtils.ts +412 -0
- package/src/framework/utils/TreeUtils.ts +251 -0
- package/src/framework/utils/UrlUtils.ts +152 -0
- package/src/framework/utils/UuidUtils.ts +88 -0
- package/src/framework/utils/ValidateUtils.ts +28 -0
- package/src/framework/utils/index.ts +16 -0
- package/src/framework/utils/system/DictUtils.ts +97 -0
- package/src/framework/utils/system/FormRegistryUtils.ts +77 -0
- package/src/framework/utils/system/HttpUtils.ts +247 -0
- package/src/framework/utils/system/PageUtils.ts +163 -0
- package/src/framework/utils/system/PermUtils.ts +79 -0
- package/src/framework/utils/system/SysUtils.ts +97 -0
- package/src/framework/utils/system/ThemeUtils.ts +27 -0
- package/src/framework/utils/system/index.ts +7 -0
- package/src/framework/view-components/ViewApproveStatus.tsx +26 -0
- package/src/framework/view-components/ViewBoolean.tsx +6 -0
- package/src/framework/view-components/ViewFlowableInstanceProgress.d.ts +12 -0
- package/src/framework/view-components/ViewFlowableInstanceProgress.jsx +97 -0
- package/src/framework/view-components/ViewFlowableInstanceProgressButton.tsx +26 -0
- package/src/framework/view-components/ViewPassword.tsx +25 -0
- package/src/framework/view-components/ViewProps.ts +11 -0
- package/src/framework/view-components/index.ts +6 -0
- package/src/index.ts +2 -0
- package/src/layouts/PageRender.d.ts +22 -0
- package/src/layouts/PageRender.jsx +90 -0
- package/src/layouts/admin/HeaderRight.jsx +104 -0
- package/src/layouts/admin/TabPageRender.jsx +158 -0
- package/src/layouts/admin/index.jsx +161 -0
- package/src/layouts/admin/index.less +65 -0
- package/src/layouts/index.jsx +153 -0
- package/src/layouts/index.less +24 -0
- package/src/loading.jsx +18 -0
- package/src/pages/404.jsx +13 -0
- package/src/pages/about.jsx +14 -0
- package/src/pages/flowable/design/contextPad.js +50 -0
- package/src/pages/flowable/design/customTranslate/customTranslate.js +16 -0
- package/src/pages/flowable/design/customTranslate/translations-properties-panel.js +10 -0
- package/src/pages/flowable/design/customTranslate/translations.js +144 -0
- package/src/pages/flowable/design/descriptors/flowable.json +1109 -0
- package/src/pages/flowable/design/index.css +7 -0
- package/src/pages/flowable/design/index.jsx +171 -0
- package/src/pages/flowable/design/provider/FlowablePropertiesProvider.js +75 -0
- package/src/pages/flowable/design/provider/index.js +6 -0
- package/src/pages/flowable/design/provider/properties/ConditionDesign.jsx +175 -0
- package/src/pages/flowable/design/provider/properties/ConditionProps.jsx +76 -0
- package/src/pages/flowable/design/provider/properties/DelegateExpressionProps.js +54 -0
- package/src/pages/flowable/design/provider/properties/FormProps.js +55 -0
- package/src/pages/flowable/design/provider/properties/MultiInstanceProps.js +100 -0
- package/src/pages/flowable/design/provider/properties/UserTaskForm.jsx +48 -0
- package/src/pages/flowable/design/provider/properties/utils.jsx +35 -0
- package/src/pages/flowable/index.jsx +87 -0
- package/src/pages/flowable/monitor/definition.jsx +87 -0
- package/src/pages/flowable/monitor/instance/index.jsx +177 -0
- package/src/pages/flowable/monitor/instance/view.jsx +102 -0
- package/src/pages/flowable/monitor/task.jsx +98 -0
- package/src/pages/flowable/task/form.jsx +186 -0
- package/src/pages/flowable/task/index.jsx +184 -0
- package/src/pages/flowable/task/instance/view.jsx +85 -0
- package/src/pages/flowable/test/index.jsx +57 -0
- package/src/pages/index.jsx +25 -0
- package/src/pages/login.jsx +21 -0
- package/src/pages/system/api/ApiDoc.jsx +144 -0
- package/src/pages/system/api/index.jsx +268 -0
- package/src/pages/system/api/perm.jsx +69 -0
- package/src/pages/system/config/index.jsx +136 -0
- package/src/pages/system/dict/Dict.jsx +72 -0
- package/src/pages/system/dict/DictItem.jsx +177 -0
- package/src/pages/system/dict/index.jsx +25 -0
- package/src/pages/system/file/index.jsx +160 -0
- package/src/pages/system/job/index.jsx +324 -0
- package/src/pages/system/log/index.jsx +78 -0
- package/src/pages/system/org/index.jsx +262 -0
- package/src/pages/system/role/index.jsx +308 -0
- package/src/pages/system/role/perm.jsx +108 -0
- package/src/pages/system/sysManual/index.jsx +127 -0
- package/src/pages/system/user/UserPerm.jsx +97 -0
- package/src/pages/system/user/index.jsx +258 -0
- package/src/pages/test.jsx +200 -0
- package/src/pages/ureport/index.jsx +22 -0
- package/src/pages/userCenter/ChangePassword.jsx +63 -0
- package/src/pages/userCenter/index.jsx +90 -0
- package/src/pages/userCenter/manual.jsx +59 -0
- package/src/pages/userCenter/message.jsx +105 -0
- package/src/style/global.less +51 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import React from "react";
|
|
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";
|
|
21
|
+
|
|
22
|
+
export default class extends React.Component {
|
|
23
|
+
|
|
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
|
+
|
|
40
|
+
render() {
|
|
41
|
+
|
|
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>
|
|
189
|
+
|
|
190
|
+
<Space>
|
|
191
|
+
<Button type='primary' htmlType='submit'>保存</Button>
|
|
192
|
+
<Button htmlType='reset'>重置</Button>
|
|
193
|
+
</Space>
|
|
194
|
+
</Form>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
</Card>
|
|
198
|
+
</>
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {Button, Flex} from "antd";
|
|
3
|
+
|
|
4
|
+
export default class extends React.Component {
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
render() {
|
|
9
|
+
return <div style={{display:'flex',alignItems:'center',justifyContent:'center'}}>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<Button type='primary' href='/ureport/designer'>打开设计器</Button>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Form, Input, Modal} from "antd";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import {history} from 'umi'
|
|
6
|
+
|
|
7
|
+
export default class extends React.Component {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
onFinish = (values) => {
|
|
11
|
+
HttpUtils.post('admin/userCenter/updatePwd', values).then(() => {
|
|
12
|
+
Modal.success({
|
|
13
|
+
title: '提示',
|
|
14
|
+
content: '修改密码成功',
|
|
15
|
+
onOk: () => {
|
|
16
|
+
SysUtils.setToken(null)
|
|
17
|
+
history.push('/login')
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
validator = (rule, value) => {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
HttpUtils.create().get("admin/sysUser/pwdStrength", {password: value}).then(response => {
|
|
26
|
+
const rs = response.data
|
|
27
|
+
if (!rs.success) {
|
|
28
|
+
reject(rs.message)
|
|
29
|
+
}
|
|
30
|
+
resolve()
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
render() {
|
|
37
|
+
return <div>
|
|
38
|
+
|
|
39
|
+
<Form onFinish={this.onFinish} style={{maxWidth: 400}}>
|
|
40
|
+
|
|
41
|
+
<Form.Item name='newPassword'
|
|
42
|
+
label='新密码'
|
|
43
|
+
extra={'请输入字母、数字、特殊字符'}
|
|
44
|
+
rules={[
|
|
45
|
+
{required: true},
|
|
46
|
+
{
|
|
47
|
+
validator: this.validator
|
|
48
|
+
}
|
|
49
|
+
]}
|
|
50
|
+
>
|
|
51
|
+
<Input.Password></Input.Password>
|
|
52
|
+
</Form.Item>
|
|
53
|
+
|
|
54
|
+
<Form.Item wrapperCol={{offset: 5}} style={{marginTop: 40}}>
|
|
55
|
+
<Button type="primary" htmlType="submit">
|
|
56
|
+
确定
|
|
57
|
+
</Button>
|
|
58
|
+
</Form.Item>
|
|
59
|
+
</Form>
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -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 {HttpUtils, Page} from "../../framework";
|
|
5
|
+
|
|
6
|
+
export default class extends React.Component {
|
|
7
|
+
|
|
8
|
+
state = {
|
|
9
|
+
info :{}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
componentDidMount() {
|
|
13
|
+
HttpUtils.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,59 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {HttpUtils, Page, ProTable} 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 = ('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
|
+
request={(params) => HttpUtils.get('admin/sysManual/pageForUser', params)}
|
|
51
|
+
columns={this.columns}
|
|
52
|
+
/>
|
|
53
|
+
</Page>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {Button, Card, Tabs, Tag} from "antd";
|
|
3
|
+
import {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
|
+
HttpUtils.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) => HttpUtils.get("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) => HttpUtils.get("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) => HttpUtils.get("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
|
+
|