Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
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
张伯涛
NLT-e-cigarette
Commits
07216dd0
Commit
07216dd0
authored
Jul 22, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
d5acea1b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
permission.js
src/permission.js
+6
-1
login.vue
src/views/login/login.vue
+1
-1
index.vue
src/views/system/role/index.vue
+1
-1
index.vue
src/views/system/user/index.vue
+1
-0
No files found.
src/permission.js
View file @
07216dd0
...
...
@@ -35,9 +35,14 @@ router.beforeEach((to, from, next) => {
if
(
routers
.
accessedRoutes
[
0
].
path
===
'/entry'
)
{
router
.
addRoutes
(
routers
.
accessedRoutes
)
// 动态添加可访问路由表
next
({
path
:
'/Home'
,
replace
:
true
})
// hack方法 确保addRoutes已完成
}
else
{
}
else
if
(
routers
.
accessedRoutes
[
0
].
children
[
0
].
path
)
{
router
.
addRoutes
(
routers
.
accessedRoutes
)
// 动态添加可访问路由表
next
({
path
:
routers
.
accessedRoutes
[
0
].
children
[
0
].
path
,
replace
:
true
})
// 没有首页,自动切换跳转到下一级
}
else
{
Message
.
error
(
'用户无权限'
)
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
next
({
path
:
'/'
})
})
}
// 测试 默认静态页面
// store.dispatch('permission/generateRoutes', { roles }).then(accessRoutes => {
...
...
src/views/login/login.vue
View file @
07216dd0
...
...
@@ -149,7 +149,7 @@ export default {
// this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` });
this
.
loading
=
false
// this.$router.push('/welcome')
this
.
$router
.
push
(
'/
productionInfo/Station
'
)
this
.
$router
.
push
(
'/
Home
'
)
this
.
$store
.
commit
(
'SET_NAME'
,
res
.
data
.
user
.
username
)
})
.
catch
(()
=>
{
...
...
src/views/system/role/index.vue
View file @
07216dd0
...
...
@@ -234,7 +234,7 @@
:data=
"menuOptions"
show-checkbox
node-key=
"id"
:check-strictly=
"
false
"
:check-strictly=
"
!form.menuCheckStrictly
"
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
@
check-change=
"addListChange"
...
...
src/views/system/user/index.vue
View file @
07216dd0
...
...
@@ -1203,6 +1203,7 @@ export default {
},
/** 导入按钮操作 */
handleImport
()
{
this
.
importLoading
=
false
this
.
upload
.
title
=
'用户导入'
this
.
upload
.
open
=
true
},
...
...
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