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
aace40d0
Commit
aace40d0
authored
Jul 03, 2018
by
wxk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警状态查询接口ok
parent
cfdf24cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
overview.vue
src/views/overview.vue
+38
-6
No files found.
src/views/overview.vue
View file @
aace40d0
...
...
@@ -6,23 +6,23 @@
</div>
<ul
class=
"classify-overview"
>
<li
class=
"normal"
:class=
"
{ 'filter' : robotStatus === 'normal'}" @click="statusFilter('normal')">
<p>
87
</p>
<p>
{{
robotStatusList
.
status_normal
}}
</p>
<p>
正常运行(台)
</p>
</li>
<li
class=
"stop"
:class=
"
{ 'filter' : robotStatus === 'stop'}" @click="statusFilter('stop')">
<p>
7
</p>
<p>
{{
robotStatusList
.
status_stop
}}
</p>
<p>
停止运行(台)
</p>
</li>
<li
class=
"abnormal"
:class=
"
{ 'filter' : robotStatus === 'profit'}" @click="statusFilter('profit')">
<p>
2
</p>
<p>
{{
robotStatusList
.
profit_status_abnormal
}}
</p>
<p>
盈利异常(台)
</p>
</li>
<li
class=
"abnormal"
:class=
"
{ 'filter' : robotStatus === 'coin'}" @click="statusFilter('coin')">
<p>
1
</p>
<p>
{{
robotStatusList
.
coin_status_abnormal
}}
</p>
<p>
目标币数量异常(台)
</p>
</li>
<li
class=
"abnormal"
:class=
"
{ 'filter' : robotStatus === 'base'}" @click="statusFilter('base')">
<p>
0
</p>
<p>
{{
robotStatusList
.
base_status_abnormal
}}
</p>
<p>
基础币数量异常(台)
</p>
</li>
</ul>
...
...
@@ -260,12 +260,15 @@
<
script
>
import
RobotDetails
from
'./RobotDetails'
import
Bus
from
'../assets/js/bus'
import
axios
from
'axios'
;
import
ApiConfig
from
"../config/api-config"
;
export
default
{
data
()
{
return
{
value1
:
true
,
//是否开启机器人
robotDetails
:
false
,
//是否查看机器人详情
robotStatus
:
''
,
//机器人状态
robotStatusList
:
[],
//状态预警信息
subtitle
:
'所有机器人'
,
//副标题
checkAll
:
false
,
//交易所筛选
checkedWebs
:
[],
...
...
@@ -321,23 +324,52 @@
init
()
{
const
RoutePath
=
this
.
$route
.
params
.
name
;
// console.log(RoutePath);
var
StatusParams
=
{
platform
:
''
,
coin
:
''
};
//预警状态查询入参
//筛选机器人参数
var
ListParams
=
{
"class"
:
"robot"
,
//账户级别
"coin"
:
"DCR"
,
//目标币种,用于首页里的筛选和币种监控 可选参数
"symbol"
:[
"DCR/USDT"
],
//币种对,用于网站监控里的筛选 可选参数
"status"
:
"normal"
,
//机器人运行状态 可选参数
"abnormal"
:
"profit"
,
//有profit,coin,base这三种异常类别 可选参数
"platform"
:[
"zhaobi"
]
//交易所种类 可选参数
};
switch
(
RoutePath
)
{
case
'home'
:
this
.
showWebFilter
=
this
.
showCurrencyFilter
=
true
;
this
.
showPairFilter
=
false
;
this
.
getRobotStatus
(
StatusParams
);
break
;
case
'BTY'
:
case
'YCC'
:
this
.
showWebFilter
=
true
;
this
.
showCurrencyFilter
=
this
.
showPairFilter
=
false
;
StatusParams
=
{
platform
:
''
,
coin
:
RoutePath
}
this
.
getRobotStatus
(
StatusParams
);
break
;
default
:
this
.
showPairFilter
=
true
;
this
.
showWebFilter
=
this
.
showCurrencyFilter
=
false
;
var
index
=
+
RoutePath
;
this
.
pairs
=
this
.
platInfo
[
index
].
symbol
;
StatusParams
=
{
platform
:
this
.
platInfo
[
index
].
platform
,
coin
:
''
}
this
.
getRobotStatus
(
StatusParams
);
break
;
}
},
//机器人预警状态查询
getRobotStatus
(
params
)
{
axios
.
post
(
ApiConfig
.
GetRobotStatus
,
params
).
then
(
res
=>
{
// console.log(res.data)
this
.
robotStatusList
=
res
.
data
;
})
},
//获取符合筛选条件的机器人列表
getRobotList
(
params
)
{
axios
.
post
(
ApiConfig
.
GetMatchRobots
,
params
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
})
},
//交易所过滤
handleCheckAllChange
(
val
)
{
this
.
checkedWebs
=
val
?
this
.
webs
:
[];
...
...
@@ -528,7 +560,7 @@
float
:
right
;
.select-bar-content
{
float
:
left
;
margin-
righ
t
:
10px
;
margin-
lef
t
:
10px
;
width
:
410px
;
padding
:
5px
10px
0
65px
;
background-color
:
#fff
;
...
...
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