@jiangood/open-admin 2.0.1 → 2.2.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/config.js +9 -14
- package/package.json +5 -1
- package/src/.umi-production/appData.json +75 -90
- package/src/.umi-production/umi.ts +2 -2
- package/src/framework/components/Page/index.less +1 -1
- package/src/framework/components/Page/index.tsx +19 -22
- package/src/framework/fields/FieldEditor/index.tsx +3 -2
- package/src/framework/fields/FieldUploadFile/index.tsx +8 -4
- package/src/framework/utils/MessageUtils.tsx +21 -99
- package/src/framework/utils/system/HttpUtils.ts +2 -1
- package/src/framework/utils/system/SysUtils.ts +8 -0
- package/src/layouts/PageRender.d.ts +2 -17
- package/src/layouts/PageRender.jsx +14 -76
- package/src/layouts/admin/TabPageRender.jsx +138 -158
- package/src/layouts/admin/index.jsx +120 -17
- package/src/layouts/admin/index.less +123 -5
- package/src/layouts/index.jsx +78 -161
- package/src/pages/404.jsx +7 -5
- package/src/pages/about.jsx +3 -3
- package/src/pages/index.jsx +4 -5
- package/src/pages/login.jsx +16 -9
- package/src/pages/login.less +0 -1
- package/src/pages/system/dict/index.jsx +7 -10
- package/src/pages/system/file/index.jsx +5 -5
- package/src/pages/system/job/index.jsx +9 -7
- package/src/pages/system/log/index.jsx +4 -5
- package/src/pages/system/manual/index.jsx +6 -4
- package/src/pages/system/org/index.jsx +4 -2
- package/src/pages/system/role/index.jsx +9 -7
- package/src/pages/system/role/perm.jsx +3 -4
- package/src/pages/system/user/index.jsx +8 -6
- package/src/pages/userCenter/index.jsx +1 -1
- package/src/pages/userCenter/message.jsx +4 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {Button, Card, Checkbox, Table, Typography} from "antd";
|
|
3
3
|
import {SaveOutlined} from "@ant-design/icons";
|
|
4
|
-
import {ArrayUtils, HttpUtils, PageUtils} from "../../../framework";
|
|
4
|
+
import {ArrayUtils, HttpUtils, Page, PageUtils} from "../../../framework";
|
|
5
5
|
export default class extends React.Component {
|
|
6
6
|
|
|
7
7
|
|
|
@@ -89,8 +89,7 @@ export default class extends React.Component {
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
render() {
|
|
92
|
-
return
|
|
93
|
-
|
|
92
|
+
return <Page>
|
|
94
93
|
|
|
95
94
|
<Card title='角色权限设置' loading={this.state.loading}
|
|
96
95
|
variant={"borderless"}
|
|
@@ -102,6 +101,6 @@ export default class extends React.Component {
|
|
|
102
101
|
expandable={{defaultExpandAllRows: true}}
|
|
103
102
|
></Table>
|
|
104
103
|
</Card>
|
|
105
|
-
|
|
104
|
+
</Page>
|
|
106
105
|
}
|
|
107
106
|
}
|
|
@@ -125,16 +125,16 @@ export default class extends React.Component {
|
|
|
125
125
|
fixed: 'right',
|
|
126
126
|
render: (_, record) => {
|
|
127
127
|
return <ButtonList>
|
|
128
|
-
<Button size='small' perm='
|
|
128
|
+
<Button size='small' perm='sys-user:update' onClick={() => this.handleEdit(record)}> 编辑 </Button>
|
|
129
129
|
|
|
130
|
-
<Button size='small' perm='
|
|
130
|
+
<Button size='small' perm='sys-user:grant-permission'
|
|
131
131
|
onClick={() => this.permRef.current.show(record)}> 授权 </Button>
|
|
132
132
|
|
|
133
|
-
<Popconfirm perm='
|
|
133
|
+
<Popconfirm perm='sys-user:reset-password' title='确认重置密码?' onConfirm={() => this.resetPwd(record)}>
|
|
134
134
|
<Button size='small'>重置密码</Button>
|
|
135
135
|
</Popconfirm>
|
|
136
136
|
|
|
137
|
-
<Popconfirm perm='
|
|
137
|
+
<Popconfirm perm='sys-user:delete' title={'是否确定删除用户'}
|
|
138
138
|
onConfirm={() => this.handleDelete(record)}>
|
|
139
139
|
<Button size='small'>删除</Button>
|
|
140
140
|
</Popconfirm>
|
|
@@ -144,7 +144,9 @@ export default class extends React.Component {
|
|
|
144
144
|
];
|
|
145
145
|
|
|
146
146
|
onFinish = values => {
|
|
147
|
-
|
|
147
|
+
const isNew = !values.id;
|
|
148
|
+
const url = isNew ? 'admin/sysUser/create' : 'admin/sysUser/update';
|
|
149
|
+
HttpUtils.post(url, values).then(rs => {
|
|
148
150
|
this.setState({formOpen: false})
|
|
149
151
|
this.tableRef.current.reload()
|
|
150
152
|
})
|
|
@@ -178,7 +180,7 @@ export default class extends React.Component {
|
|
|
178
180
|
toolBarRender={() => {
|
|
179
181
|
return <ButtonList>
|
|
180
182
|
<Button
|
|
181
|
-
perm='
|
|
183
|
+
perm='sys-user:create'
|
|
182
184
|
type="primary"
|
|
183
185
|
onClick={this.handleAdd}>
|
|
184
186
|
<PlusOutlined/> 新增
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {Button, Card, Tabs, Tag} from "antd";
|
|
3
|
-
import {ProTable} from "../../framework";
|
|
3
|
+
import {HttpUtils, Page, ProTable} from "../../framework";
|
|
4
4
|
|
|
5
5
|
export default class extends React.Component {
|
|
6
6
|
|
|
@@ -54,7 +54,8 @@ export default class extends React.Component {
|
|
|
54
54
|
]
|
|
55
55
|
|
|
56
56
|
render() {
|
|
57
|
-
return <
|
|
57
|
+
return <Page>
|
|
58
|
+
<Card variant={"borderless"}>
|
|
58
59
|
|
|
59
60
|
<Tabs defaultActiveKey="0" destroyOnClose
|
|
60
61
|
>
|
|
@@ -99,5 +100,6 @@ export default class extends React.Component {
|
|
|
99
100
|
</Tabs>
|
|
100
101
|
|
|
101
102
|
</Card>
|
|
103
|
+
</Page>
|
|
102
104
|
}
|
|
103
105
|
}
|