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
27cf62e8
Commit
27cf62e8
authored
Jul 03, 2018
by
wxk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导航筛选ok
parent
aace40d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
159 deletions
+45
-159
overview.vue
src/views/overview.vue
+45
-159
No files found.
src/views/overview.vue
View file @
27cf62e8
...
...
@@ -7,7 +7,7 @@
<ul
class=
"classify-overview"
>
<li
class=
"normal"
:class=
"
{ 'filter' : robotStatus === 'normal'}" @click="statusFilter('normal')">
<p>
{{
robotStatusList
.
status_normal
}}
</p>
<p>
正
常
运行(台)
</p>
<p>
正
在
运行(台)
</p>
</li>
<li
class=
"stop"
:class=
"
{ 'filter' : robotStatus === 'stop'}" @click="statusFilter('stop')">
<p>
{{
robotStatusList
.
status_stop
}}
</p>
...
...
@@ -77,7 +77,7 @@
</div>
</div>
<ul
class=
"robots-box"
>
<li
class=
"normal
"
>
<li
v-for=
"(item,index) in robotList"
:key=
"item.tag"
:class=
"[item.status]
"
>
<div
class=
"operations"
>
<div
class=
"detail"
@
click=
"showDetails()"
>
<span>
查看详情
</span>
...
...
@@ -95,163 +95,40 @@
</el-switch>
</div>
</div>
<p
class=
"robot-name"
>
YCC/BTC-SMALL-140025
</p>
<p
class=
"robot-name"
>
{{
item
.
tag
}}
</p>
<div
class=
"chart-box"
>
<p
class=
"title"
>
今日盈亏
</p>
<p
class=
"data gain"
>
+30.23%
</p>
<p
v-show=
"item.today_profit>0"
class=
"data gain"
>
+
{{
(
item
.
today_profit
*
100
).
toFixed
(
2
)
}}
%
</p>
<p
v-show=
"item.today_profit
<0
"
class=
"data lose"
>
-
{{
(
item
.
today_profit
*
100
).
toFixed
(
2
)
}}
%
</p>
<p
v-show=
"item.today_profit==0"
class=
"data none"
>
- -
</p>
<div>
<p
class=
"type"
>
正常运行
</p>
<p
v-show=
"item.status==='normal'"
class=
"type"
>
正在运行
</p>
<p
v-show=
"item.status==='stop'"
class=
"type"
>
停止运行
</p>
<p>
<span
class=
"result"
>
总盈亏
</span>
<span
class=
"data gain"
>
+30.23%
</span>
<span
v-show=
"item.all_profit>0"
class=
"data gain"
>
+
{{
(
item
.
all_profit
*
100
).
toFixed
(
2
)
}}
%
</span>
<span
v-show=
"item.all_profit
<0
"
class=
"data lose"
>
-
{{
(
item
.
all_profit
*
100
).
toFixed
(
2
)
}}
%
</span>
<span
v-show=
"item.all_profit==0"
class=
"data none"
>
- -
</span>
</p>
</div>
</div>
<div
class=
"
ycc
"
>
<span>
YCC
余额
</span>
<div
class=
"
coin
"
>
<span>
{{
item
.
coin
}}
余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
YCC
</span>
<span>
{{
item
.
amount_base
}}
</span>
<span>
{{
item
.
coin
}}
</span>
</div>
</div>
<div
class=
"b
tc
"
>
<span>
BTC
余额
</span>
<div
class=
"b
ase
"
>
<span>
{{
item
.
base
}}
余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
BTC
</span>
</div>
</div>
</li>
<li
class=
"stop"
>
<div
class=
"operations"
>
<div
class=
"detail"
@
click=
"showDetails()"
>
<span>
查看详情
</span>
<i
class=
"el-icon-caret-right"
></i>
</div>
<div
class=
"switch"
>
<span
v-show=
"value1"
>
关闭
</span>
<span
v-show=
"!value1"
>
开启
</span>
<el-switch
v-model=
"value1"
active-color=
"rgba(119,146,167,1)"
inactive-color=
"rgba(236,239,241,1)"
>
</el-switch>
</div>
</div>
<p
class=
"robot-name"
>
YCC/BTC-SMALL-140025
</p>
<div
class=
"chart-box"
>
<p
class=
"title"
>
今日盈亏
</p>
<p
class=
"data none"
>
- -
</p>
<div>
<p
class=
"type"
>
异常运行
</p>
<p>
<span
class=
"result"
>
总盈亏
</span>
<span
class=
"data none"
>
- -
</span>
</p>
</div>
</div>
<div
class=
"ycc"
>
<span>
YCC余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
YCC
</span>
</div>
</div>
<div
class=
"btc"
>
<span>
BTC余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
BTC
</span>
</div>
</div>
</li>
<li
class=
"normal"
>
<div
class=
"operations"
>
<div
class=
"detail"
@
click=
"showDetails()"
>
<span>
查看详情
</span>
<i
class=
"el-icon-caret-right"
></i>
</div>
<div
class=
"switch"
>
<span
v-show=
"value1"
>
关闭
</span>
<span
v-show=
"!value1"
>
开启
</span>
<el-switch
v-model=
"value1"
active-color=
"rgba(119,146,167,1)"
inactive-color=
"rgba(236,239,241,1)"
>
</el-switch>
</div>
</div>
<p
class=
"robot-name"
>
YCC/BTC-SMALL-140025
</p>
<div
class=
"chart-box"
>
<p
class=
"title"
>
今日盈亏
</p>
<p
class=
"data gain"
>
+30.23%
</p>
<div>
<p
class=
"type"
>
正常运行
</p>
<p>
<span
class=
"result"
>
总盈亏
</span>
<span
class=
"data gain"
>
+30.23%
</span>
</p>
</div>
</div>
<div
class=
"ycc"
>
<span>
YCC余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
YCC
</span>
</div>
</div>
<div
class=
"btc"
>
<span>
BTC余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
BTC
</span>
</div>
</div>
</li>
<li
class=
"stop"
>
<div
class=
"operations"
>
<div
class=
"detail"
@
click=
"showDetails()"
>
<span>
查看详情
</span>
<i
class=
"el-icon-caret-right"
></i>
</div>
<div
class=
"switch"
>
<span
v-show=
"value1"
>
关闭
</span>
<span
v-show=
"!value1"
>
开启
</span>
<el-switch
v-model=
"value1"
active-color=
"rgba(119,146,167,1)"
inactive-color=
"rgba(236,239,241,1)"
>
</el-switch>
</div>
</div>
<p
class=
"robot-name"
>
YCC/BTC-SMALL-140025
</p>
<div
class=
"chart-box"
>
<p
class=
"title"
>
今日盈亏
</p>
<p
class=
"data none"
>
- -
</p>
<div>
<p
class=
"type"
>
异常运行
</p>
<p>
<span
class=
"result"
>
总盈亏
</span>
<span
class=
"data none"
>
- -
</span>
</p>
</div>
</div>
<div
class=
"ycc"
>
<span>
YCC余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
YCC
</span>
</div>
</div>
<div
class=
"btc"
>
<span>
BTC余额
</span>
<div
class=
"sum"
>
<span>
123456789.123456
</span>
<span>
BTC
</span>
<span>
{{
item
.
amount_coin
}}
</span>
<span>
{{
item
.
base
}}
</span>
</div>
</div>
</li>
</ul>
<p
v-if=
"robotList === null"
class=
"no-data"
>
暂无数据
</p>
</div>
<robot-details
v-show=
"robotDetails"
></robot-details>
</div>
...
...
@@ -269,6 +146,7 @@
robotDetails
:
false
,
//是否查看机器人详情
robotStatus
:
''
,
//机器人状态
robotStatusList
:
[],
//状态预警信息
robotList
:
[],
//符合条件的机器人列表
subtitle
:
'所有机器人'
,
//副标题
checkAll
:
false
,
//交易所筛选
checkedWebs
:
[],
...
...
@@ -327,35 +205,37 @@
var
StatusParams
=
{
platform
:
''
,
coin
:
''
};
//预警状态查询入参
//筛选机器人参数
var
ListParams
=
{
"class"
:
"robot"
,
//账户级别
"coin"
:
"DCR
"
,
//目标币种,用于首页里的筛选和币种监控 可选参数
"symbol"
:[
"DCR/USDT"
],
//币种对,用于网站监控里的筛选 可选参数
"status"
:
"normal
"
,
//机器人运行状态 可选参数
"abnormal"
:
"profit
"
,
//有profit,coin,base这三种异常类别 可选参数
"platform"
:[
"zhaobi"
]
//交易所种类 可选参数
class
:
"robot"
,
//账户级别
coin
:
"
"
,
//目标币种,用于首页里的筛选和币种监控 可选参数
symbol
:
[
],
//币种对,用于网站监控里的筛选 可选参数
status
:
"
"
,
//机器人运行状态 可选参数
abnormal
:
"
"
,
//有profit,coin,base这三种异常类别 可选参数
platform
:
[
]
//交易所种类 可选参数
};
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
)
;
StatusParams
.
coin
=
RoutePath
;
ListParams
.
coin
=
RoutePath
;
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
);
const
platform
=
this
.
platInfo
[
index
].
platform
;
StatusParams
.
platform
=
platform
;
ListParams
.
platform
=
[
platform
];
break
;
}
this
.
getRobotStatus
(
StatusParams
);
this
.
getRobotList
(
ListParams
);
},
//机器人预警状态查询
getRobotStatus
(
params
)
{
...
...
@@ -367,7 +247,8 @@
//获取符合筛选条件的机器人列表
getRobotList
(
params
)
{
axios
.
post
(
ApiConfig
.
GetMatchRobots
,
params
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
.
data
);
this
.
robotList
=
res
.
data
.
data
;
})
},
//交易所过滤
...
...
@@ -444,7 +325,7 @@
//通过机器人状态筛选
statusFilter
(
status
)
{
this
.
robotStatus
=
status
;
this
.
subtitle
=
status
===
'normal'
?
'正
常
运行机器人'
:
this
.
subtitle
=
status
===
'normal'
?
'正
在
运行机器人'
:
(
status
===
'stop'
?
'停止运行机器人'
:
(
status
===
'profit'
?
'盈利异常机器人'
:
(
status
===
'coin'
?
'目标币异常机器人'
:
...
...
@@ -472,7 +353,7 @@
},
platInfo
(
val
){
//获取所有的交易所和币种
for
(
let
item
of
val
){
for
(
let
item
of
this
.
platInfo
){
this
.
webs
.
push
(
item
.
platform
);
this
.
currencies
=
this
.
allCurrencies
=
[...
new
Set
(
this
.
currencies
.
concat
(
item
.
coin
))];
}
...
...
@@ -708,7 +589,7 @@
}
}
}
.
ycc
,
.btc
{
.
coin
,
.base
{
height
:
20px
;
line-height
:
20px
;
font-size
:
12px
;
...
...
@@ -719,9 +600,14 @@
color
:
rgba
(
51
,
51
,
51
,
1
);
}
}
.
ycc
{
.
coin
{
margin
:
19px
0
10px
0
;
}
.no-data
{
text-align
:
center
;
font-size
:
20px
;
margin-top
:
100px
;
}
</
style
>
<
style
>
/*select组件样式覆盖*/
...
...
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