Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
robot-monitor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
汪晓凯
robot-monitor
Commits
fc556d1c
Commit
fc556d1c
authored
Aug 08, 2018
by
汪晓凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix_路由跳转bug
parent
52d4228b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
16 deletions
+23
-16
navLeft.vue
src/components/navLeft.vue
+16
-9
overview.vue
src/views/overview.vue
+7
-7
No files found.
src/components/navLeft.vue
View file @
fc556d1c
<
template
>
<div
class=
"nav-left"
>
<el-menu
:default-openeds=
"['1', '2']"
:default-active=
"active"
class=
"el-menu-vertical-demo"
:router=
"true"
@
select=
"navClick"
>
<el-menu-item
index=
"home"
>
<el-menu-item
index=
"
/monitor/
home"
>
<span
slot=
"title"
>
首页
</span>
</el-menu-item>
<el-submenu
index=
"1"
>
<template
slot=
"title"
>
网站监控
</
template
>
<el-menu-item
:index=
"
index+''
"
v-for=
"(item, index) in platInfo"
:key=
"item.platform"
>
{{item.platform}}
</el-menu-item>
<el-menu-item
:index=
"
`/monitor/${index}`
"
v-for=
"(item, index) in platInfo"
:key=
"item.platform"
>
{{item.platform}}
</el-menu-item>
</el-submenu>
<el-submenu
index=
"2"
>
<
template
slot=
"title"
>
币种监控
</
template
>
<el-menu-item
index=
"BTY"
>
BTY
</el-menu-item>
<el-menu-item
index=
"YCC"
>
YCC
</el-menu-item>
<el-menu-item
index=
"
/monitor/
BTY"
>
BTY
</el-menu-item>
<el-menu-item
index=
"
/monitor/
YCC"
>
YCC
</el-menu-item>
</el-submenu>
<el-menu-item
index=
"/monitor/account"
>
<span
slot=
"title"
>
银行账户
</span>
...
...
@@ -37,22 +38,28 @@
},
props
:
[
'platInfo'
],
created
()
{
this
.
active
=
this
.
$route
.
params
.
name
||
this
.
$route
.
path
;
if
(
this
.
$route
.
path
.
split
(
'/'
).
pop
()
===
'RobotDetail'
)
{
this
.
active
=
this
.
$route
.
path
.
split
(
'/'
).
splice
(
0
,
3
).
join
(
'/'
);
}
else
{
this
.
active
=
this
.
$route
.
path
;
}
},
methods
:
{
navClick
(
index
)
{
this
.
active
=
index
;
this
.
$router
.
push
(
index
);
if
(
index
!==
'/monitor/account'
&&
index
!==
'/monitor/coinRecharge'
){
this
.
$router
.
push
(
`/monitor/
${
index
}
`
);
Bus
.
$emit
(
'refresh'
);
}
else
{
this
.
$router
.
push
(
index
);
}
}
},
watch
:
{
$route
()
{
this
.
active
=
this
.
$route
.
params
.
name
||
this
.
$route
.
path
;
if
(
this
.
$route
.
path
.
split
(
'/'
).
pop
()
===
'RobotDetail'
)
{
this
.
active
=
this
.
$route
.
path
.
split
(
'/'
).
splice
(
0
,
3
).
join
(
'/'
);
}
else
{
this
.
active
=
this
.
$route
.
path
;
}
},
},
}
...
...
src/views/overview.vue
View file @
fc556d1c
...
...
@@ -224,29 +224,29 @@
},
methods
:
{
init
(
type
)
{
const
RoutePath
=
this
.
$route
.
pa
rams
.
name
;
const
RoutePath
=
this
.
$route
.
pa
th
;
// console.log(RoutePath);
var
StatusParams
=
{
platform
:
''
,
coin
:
''
};
//预警状态查询入参
switch
(
RoutePath
)
{
case
'home'
:
case
'
/monitor/
home'
:
this
.
showWebFilter
=
this
.
showCurrencyFilter
=
true
;
this
.
showPairFilter
=
false
;
this
.
RobotListParams
.
coin
=
[];
this
.
RobotListParams
.
platform
=
[];
break
;
case
'BTY'
:
case
'YCC'
:
case
'
/monitor/
BTY'
:
case
'
/monitor/
YCC'
:
this
.
showWebFilter
=
true
;
this
.
showCurrencyFilter
=
this
.
showPairFilter
=
false
;
StatusParams
.
coin
=
RoutePath
;
this
.
RobotListParams
.
coin
=
[
RoutePath
];
StatusParams
.
coin
=
RoutePath
.
split
(
'/'
).
pop
()
;
this
.
RobotListParams
.
coin
=
[
RoutePath
.
split
(
'/'
).
pop
()
];
this
.
RobotListParams
.
platform
=
[];
break
;
default
:
if
(
RoutePath
)
{
this
.
showPairFilter
=
true
;
this
.
showWebFilter
=
this
.
showCurrencyFilter
=
false
;
var
index
=
+
RoutePath
;
var
index
=
RoutePath
.
split
(
'/'
).
pop
()
;
this
.
checkedPairs
=
this
.
pairs
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'platInfo'
))[
index
].
symbol
;
this
.
platform
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'platInfo'
))[
index
].
platform
;
StatusParams
.
platform
=
this
.
platform
;
...
...
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