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
7f17940f
Commit
7f17940f
authored
Jul 30, 2018
by
wxk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化、bugfix
parent
2a187317
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
42 deletions
+66
-42
navLeft.vue
src/components/navLeft.vue
+2
-7
RobotContainer.vue
src/views/RobotContainer.vue
+2
-0
RobotDetails.vue
src/views/RobotDetails.vue
+6
-6
overview.vue
src/views/overview.vue
+56
-29
No files found.
src/components/navLeft.vue
View file @
7f17940f
...
...
@@ -38,20 +38,15 @@
},
methods
:
{
navClick
(
index
)
{
this
.
active
=
index
;
if
(
index
!=
'account'
){
Bus
.
$emit
(
'refresh'
);
console
.
log
(
'111'
)
this
.
$router
.
push
(
`/monitor/
${
index
}
`
);
Bus
.
$emit
(
'refresh'
);
}
else
{
this
.
$router
.
push
(
'/monitor/account'
);
}
}
},
watch
:
{
$route
()
{
this
.
active
=
this
.
$route
.
params
.
name
||
'account'
;
}
}
}
</
script
>
...
...
src/views/RobotContainer.vue
View file @
7f17940f
<
template
>
<div
class=
"box"
>
<keep-alive>
<router-view
:platInfo=
"platInfo"
></router-view>
</keep-alive>
</div>
</
template
>
...
...
src/views/RobotDetails.vue
View file @
7f17940f
...
...
@@ -531,6 +531,7 @@
methods
:
{
//页面初始化
init
()
{
this
.
robotDetailInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'robotDetailInfo'
));
this
.
coins
=
[
this
.
robotDetailInfo
.
coin
,
this
.
robotDetailInfo
.
base
];
this
.
getWalletInfo
();
this
.
getTransaction
();
...
...
@@ -540,7 +541,7 @@
},
//返回上一页(关闭详情)
closeDetails
()
{
//
Bus.$emit('back');
Bus
.
$emit
(
'back'
);
this
.
$router
.
go
(
-
1
);
},
//查询行情信息
...
...
@@ -864,12 +865,11 @@
}
},
watch
:
{
/*$route() {
this.robotDetailInfo = JSON.parse(sessionStorage.getItem('robotDetailInfo'));
this.init();
},*/
robotDetailInfo
()
{
$route
()
{
// console.log(this.$route.path.indexOf('RobotDetail'))
if
(
this
.
$route
.
path
.
indexOf
(
'RobotDetail'
)
!==
-
1
)
{
this
.
init
();
}
},
//交易记录时间筛选
transactionTime
(
val
)
{
...
...
src/views/overview.vue
View file @
7f17940f
...
...
@@ -157,7 +157,7 @@
checkAll0
:
false
,
//币种筛选
checkedCurrencies
:
[],
allCurrencies
:
[],
//所有币种
currencies
:
[],
currencies
:
[],
//符合交易所条件的所有币种
isIndeterminate0
:
true
,
foldExchange0
:
true
,
checkAll1
:
false
,
//交易对筛选
...
...
@@ -172,42 +172,41 @@
},
props
:
[
'platInfo'
],
created
()
{
this
.
webs
=
this
.
webs
.
length
===
0
&&
sessionStorage
.
getItem
(
'webs'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'webs'
))
:
this
.
webs
;
this
.
currencies
=
this
.
currencies
.
length
===
0
&&
sessionStorage
.
getItem
(
'currencies'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'currencies'
))
:
this
.
currencies
;
this
.
init
();
Bus
.
$on
(
'refresh'
,
()
=>
{
setTimeout
(()
=>
{
this
.
checkAll
=
false
;
this
.
isIndeterminate
=
true
;
this
.
foldExchange
=
true
;
this
.
checkAll0
=
false
;
this
.
isIndeterminate0
=
true
;
this
.
foldExchange0
=
true
;
this
.
checkAll1
=
false
;
this
.
checkedPairs
=
[];
this
.
isIndeterminate1
=
true
;
this
.
foldExchange1
=
true
;
this
.
checkedWebs
=
[];
this
.
checkedCurrencies
=
[];
this
.
checkedPairs
=
[];
this
.
robotStatus
=
''
,
//机器人状态
this
.
subtitle
=
'所有机器人'
;
this
.
init
();
},
0
)
/* setTimeout(()=>{
this.init();
},0)*/
});
/*Bus.$on('back', ()=>{
let Params = {
class: "robot", //账户级别
coin: [], //目标币种,用于首页里的筛选和币种监控 可选参数
symbol: [], //币种对,用于网站监控里的筛选 可选参数
status: "", //机器人运行状态 可选参数
abnormal: "", //有profit,coin,base这三种异常类别 可选参数
platform: [] //交易所种类 可选参数
};
if (this.robotStatus==='normal' || this.robotStatus==='stop') {
Params.status = this.robotStatus;
}else {
Params.abnormal = this.robotStatus;
}
if(!this.robotStatus) {
Params.coin = this.checkedCurrencies;
Params.symbol = this.checkedPairs;
Params.platform = this.checkedWebs;
}
this.getRobotList(Params);
})*/
Bus
.
$on
(
'back'
,
()
=>
{
this
.
init
(
'back'
);
})
},
beforeDestroy
()
{
Bus
.
$off
(
'refresh'
);
Bus
.
$off
(
'back'
);
},
methods
:
{
init
()
{
this
.
robotStatus
=
''
,
//机器人状态
this
.
webs
=
this
.
webs
.
length
===
0
&&
sessionStorage
.
getItem
(
'webs'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'webs'
))
:
this
.
webs
;
this
.
currencies
=
this
.
currencies
.
length
===
0
&&
sessionStorage
.
getItem
(
'currencies'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'currencies'
))
:
this
.
currencies
;
init
(
type
)
{
const
RoutePath
=
this
.
$route
.
params
.
name
;
// console.log(RoutePath);
var
StatusParams
=
{
platform
:
''
,
coin
:
''
};
//预警状态查询入参
...
...
@@ -240,7 +239,32 @@
break
;
}
this
.
getRobotStatus
(
StatusParams
);
if
(
type
===
'back'
)
{
let
Coin
=
RoutePath
===
'BTY'
||
RoutePath
===
'YCC'
?
[
RoutePath
]
:
[];
let
Platform
=
(
RoutePath
!==
'home'
&&
RoutePath
!==
'BTY'
&&
RoutePath
!==
'YCC'
)
?
[
this
.
platform
]
:
[];
var
Params
=
{
//详情返回时的请求参数
class
:
"robot"
,
//账户级别
coin
:
Coin
,
//目标币种,用于首页里的筛选和币种监控 可选参数
symbol
:
""
,
//币种对,用于网站监控里的筛选 可选参数
status
:
""
,
//机器人运行状态 可选参数
abnormal
:
""
,
//有profit,coin,base这三种异常类别 可选参数
platform
:
Platform
//交易所种类 可选参数
};
if
(
this
.
robotStatus
===
'normal'
||
this
.
robotStatus
===
'stop'
)
{
Params
.
status
=
this
.
robotStatus
;
}
else
{
Params
.
abnormal
=
this
.
robotStatus
;
}
if
(
!
this
.
robotStatus
)
{
Params
.
coin
=
Coin
.
length
!==
0
?
Coin
:
this
.
checkedCurrencies
;
Params
.
platform
=
Platform
.
length
!==
0
?
Platform
:
this
.
checkedWebs
;
Params
.
symbol
=
this
.
checkedPairs
;
console
.
log
(
Params
.
platform
)
}
this
.
getRobotList
(
Params
);
}
else
{
this
.
getRobotList
(
this
.
RobotListParams
);
}
},
//机器人预警状态查询
getRobotStatus
(
params
)
{
...
...
@@ -276,7 +300,8 @@
this
.
checkAll0
=
false
;
let
ListParams
=
this
.
RobotListParams
;
ListParams
.
platform
=
[];
ListParams
.
coin
=
[];
const
RoutePath
=
this
.
$route
.
params
.
name
;
ListParams
.
coin
=
RoutePath
===
'BTY'
||
RoutePath
===
'YCC'
?
[
RoutePath
]
:
[];
this
.
getRobotList
(
ListParams
);
},
handleCheckedChange
(
value
)
{
...
...
@@ -301,6 +326,8 @@
//筛选符合条件的机器人
let
ListParams
=
this
.
RobotListParams
;
ListParams
.
platform
=
value
;
const
RoutePath
=
this
.
$route
.
params
.
name
;
ListParams
.
coin
=
RoutePath
===
'BTY'
||
RoutePath
===
'YCC'
?
[
RoutePath
]
:
[];
this
.
getRobotList
(
ListParams
);
},
//币种过滤
...
...
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