Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
77aaacb2
Commit
77aaacb2
authored
4 years ago
by
张烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化权限提示
parent
7b1ae5fd
master
dev-database
dev-solution
dev-达梦
styleEditBranch
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
BlankLayout.js
src/layouts/BlankLayout.js
+8
-4
config.js
src/routes/config.js
+2
-0
No files found.
src/layouts/BlankLayout.js
View file @
77aaacb2
import
check
from
'@/components/Authorized/CheckPermissions'
;
import
React
from
'react'
;
import
{
renderRoutes
}
from
'react-router-config'
;
import
page403
from
'@/pages/exception/403'
;
const
Layout
=
({
children
,
route
})
=>
(
<>
{
children
||
renderRoutes
(
route
.
routes
.
filter
(
r
=>
!
r
.
authority
||
check
(
r
.
authority
,
true
,
false
),
),
route
.
routes
.
map
(
r
=>
{
if
(
!
r
.
authority
)
{
return
r
;
}
r
.
component
=
check
(
r
.
authority
,
r
.
component
,
page403
);
return
r
;
}),
)}
<
/
>
);
...
...
This diff is collapsed.
Click to expand it.
src/routes/config.js
View file @
77aaacb2
...
...
@@ -62,11 +62,13 @@ export default {
{
path
:
'/dbm/dbInit'
,
name
:
'数据库初始化'
,
authority
:
adminAuthority
,
component
:
InitDataBase
,
},
{
path
:
'/dbm/dbsm'
,
name
:
'数据库标准化管理'
,
authority
:
superAuthority
,
component
:
ManagementDataBase
,
},
],
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment