Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
C
crsf-ptvue
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
wuhan
crsf-ptvue
Commits
6fbb9435
Commit
6fbb9435
authored
Sep 08, 2021
by
xiexingan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
13ec9701
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1113 deletions
+55
-1113
index copy.vue
src/pages/routes/ol/index/index copy.vue
+0
-1113
index.vue
src/pages/routes/ol/index/index.vue
+55
-0
No files found.
src/pages/routes/ol/index/index copy.vue
deleted
100644 → 0
View file @
13ec9701
This diff is collapsed.
Click to expand it.
src/pages/routes/ol/index/index.vue
View file @
6fbb9435
...
...
@@ -175,6 +175,61 @@
handleStation
(
id
)
{
console
.
log
(
'站点id'
,
id
)
that
.
$http
({
url
:
that
.
$http
.
adornUrl
(
'/sys/menu/nav1'
),
method
:
'get'
,
params
:
id
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
if
(
!
data
.
menuList
||
data
.
menuList
.
length
===
0
)
{
that
.
$message
.
warning
(
'无站点系统访问权限!'
)
return
}
that
.
loading
=
that
.
$loading
({
lock
:
true
,
text
:
'加载中'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
})
that
.
$router
.
replace
({
path
:
data
.
menuList
[
0
].
list
[
0
].
path
})
// 设置顶栏菜单
const
lineMenu
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'menuList'
))
//线路站点菜单
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
lineMenu
[
0
]))
obj
.
title
=
'返回首页'
obj
.
name
=
'返回首页'
obj
.
list
[
0
].
name
=
'返回首页'
obj
.
list
[
0
].
title
=
'返回首页'
data
.
menuList
.
push
(
obj
)
// data.menuList.unshift(lineMenu[0])
store
.
dispatch
(
'd2admin/menu/headerSetAsync'
,
data
.
menuList
)
sessionStorage
.
setItem
(
'permissions'
,
JSON
.
stringify
(
data
.
permissions
||
'[]'
))
return
data
}
else
{
sessionStorage
.
setItem
(
'menuList'
,
'[]'
)
sessionStorage
.
setItem
(
'permissions'
,
'[]'
)
// next()
}
}).
then
((
data
)
=>
{
let
t
=
null
if
(
t
)
{
clearTimeout
(
t
)
}
if
(
data
)
{
t
=
setTimeout
(()
=>
{
that
.
$router
.
go
(
0
)
},
100
)
}
that
.
$menu
.
checkScroll
()
}).
then
(()
=>
{
setTimeout
(()
=>
{
that
.
loading
.
close
()
},
1000
)
}).
catch
((
e
)
=>
{
console
.
log
(
`%c
${
e
}
请求菜单列表和权限失败,跳转至登录页!!`
,
'color:blue'
)
})
},
// ====================================
...
...
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