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
d061f8b9
Commit
d061f8b9
authored
Jul 30, 2018
by
wxk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加机器人账户搜索机器人、导出充提bugfix
parent
7f17940f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
2 deletions
+52
-2
RobotDetails.vue
src/views/RobotDetails.vue
+0
-0
overview.vue
src/views/overview.vue
+52
-2
No files found.
src/views/RobotDetails.vue
View file @
d061f8b9
This diff is collapsed.
Click to expand it.
src/views/overview.vue
View file @
d061f8b9
...
@@ -75,6 +75,11 @@
...
@@ -75,6 +75,11 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-show=
"!robotStatus"
class=
"search-box"
>
<el-input
v-model=
"robotAccount"
placeholder=
"通过机器人账户搜索"
>
<el-button
@
click=
"searchByAccount"
slot=
"append"
icon=
"el-icon-search"
></el-button>
</el-input>
</div>
<ul
class=
"robots-box"
>
<ul
class=
"robots-box"
>
<li
v-for=
"(item,index) in robotList"
:key=
"item.tag"
<li
v-for=
"(item,index) in robotList"
:key=
"item.tag"
:class=
"[(item.base_status==='abnormal' ||item.coin_status==='abnormal' || item.profit_status === 'abnormal') ? 'abnormal' : item.status || 'normal']"
>
:class=
"[(item.base_status==='abnormal' ||item.coin_status==='abnormal' || item.profit_status === 'abnormal') ? 'abnormal' : item.status || 'normal']"
>
...
@@ -134,6 +139,8 @@
...
@@ -134,6 +139,8 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
robotAccount
:
''
,
//通过机器人账户搜索
_robotAccount
:
''
,
//说明通过机器人账户搜索成功
platform
:
''
,
//导航选中的交易所
platform
:
''
,
//导航选中的交易所
value1
:
true
,
//是否开启机器人
value1
:
true
,
//是否开启机器人
robotStatus
:
''
,
//机器人状态
robotStatus
:
''
,
//机器人状态
...
@@ -176,6 +183,7 @@
...
@@ -176,6 +183,7 @@
this
.
currencies
=
this
.
currencies
.
length
===
0
&&
sessionStorage
.
getItem
(
'currencies'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'currencies'
))
:
this
.
currencies
;
this
.
currencies
=
this
.
currencies
.
length
===
0
&&
sessionStorage
.
getItem
(
'currencies'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'currencies'
))
:
this
.
currencies
;
this
.
init
();
this
.
init
();
Bus
.
$on
(
'refresh'
,
()
=>
{
Bus
.
$on
(
'refresh'
,
()
=>
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
this
.
checkAll
=
false
;
this
.
checkAll
=
false
;
this
.
isIndeterminate
=
true
;
this
.
isIndeterminate
=
true
;
this
.
foldExchange
=
true
;
this
.
foldExchange
=
true
;
...
@@ -259,8 +267,8 @@
...
@@ -259,8 +267,8 @@
Params
.
coin
=
Coin
.
length
!==
0
?
Coin
:
this
.
checkedCurrencies
;
Params
.
coin
=
Coin
.
length
!==
0
?
Coin
:
this
.
checkedCurrencies
;
Params
.
platform
=
Platform
.
length
!==
0
?
Platform
:
this
.
checkedWebs
;
Params
.
platform
=
Platform
.
length
!==
0
?
Platform
:
this
.
checkedWebs
;
Params
.
symbol
=
this
.
checkedPairs
;
Params
.
symbol
=
this
.
checkedPairs
;
console
.
log
(
Params
.
platform
)
}
}
Params
=
this
.
_robotAccount
!==
''
?
{
class
:
"robot"
,
account
:
this
.
_robotAccount
}
:
Params
;
this
.
getRobotList
(
Params
);
this
.
getRobotList
(
Params
);
}
else
{
}
else
{
this
.
getRobotList
(
this
.
RobotListParams
);
this
.
getRobotList
(
this
.
RobotListParams
);
...
@@ -293,6 +301,7 @@
...
@@ -293,6 +301,7 @@
},
},
//交易所过滤
//交易所过滤
handleCheckAllChange
(
val
)
{
handleCheckAllChange
(
val
)
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
this
.
checkedWebs
=
val
?
this
.
webs
:
[];
this
.
checkedWebs
=
val
?
this
.
webs
:
[];
this
.
isIndeterminate
=
false
;
this
.
isIndeterminate
=
false
;
this
.
currencies
=
this
.
allCurrencies
;
this
.
currencies
=
this
.
allCurrencies
;
...
@@ -305,6 +314,7 @@
...
@@ -305,6 +314,7 @@
this
.
getRobotList
(
ListParams
);
this
.
getRobotList
(
ListParams
);
},
},
handleCheckedChange
(
value
)
{
handleCheckedChange
(
value
)
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
let
checkedCount
=
value
.
length
;
let
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
webs
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
webs
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
webs
.
length
;
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
webs
.
length
;
...
@@ -332,6 +342,7 @@
...
@@ -332,6 +342,7 @@
},
},
//币种过滤
//币种过滤
handleCheckAllChange0
(
val
)
{
handleCheckAllChange0
(
val
)
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
this
.
checkedCurrencies
=
val
?
this
.
currencies
:
[];
this
.
checkedCurrencies
=
val
?
this
.
currencies
:
[];
this
.
isIndeterminate0
=
false
;
this
.
isIndeterminate0
=
false
;
let
ListParams
=
this
.
RobotListParams
;
let
ListParams
=
this
.
RobotListParams
;
...
@@ -340,6 +351,7 @@
...
@@ -340,6 +351,7 @@
this
.
getRobotList
(
ListParams
);
this
.
getRobotList
(
ListParams
);
},
},
handleCheckedChange0
(
value
)
{
handleCheckedChange0
(
value
)
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
let
checkedCount
=
value
.
length
;
let
checkedCount
=
value
.
length
;
this
.
checkAll0
=
checkedCount
===
this
.
currencies
.
length
;
this
.
checkAll0
=
checkedCount
===
this
.
currencies
.
length
;
this
.
isIndeterminate0
=
checkedCount
>
0
&&
checkedCount
<
this
.
currencies
.
length
;
this
.
isIndeterminate0
=
checkedCount
>
0
&&
checkedCount
<
this
.
currencies
.
length
;
...
@@ -350,11 +362,13 @@
...
@@ -350,11 +362,13 @@
},
},
//交易对过滤
//交易对过滤
handleCheckAllChange1
(
val
)
{
handleCheckAllChange1
(
val
)
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
this
.
checkedPairs
=
val
?
this
.
pairs
:
[];
this
.
checkedPairs
=
val
?
this
.
pairs
:
[];
this
.
isIndeterminate1
=
false
;
this
.
isIndeterminate1
=
false
;
this
.
getRobotList
(
this
.
RobotListParams
);
this
.
getRobotList
(
this
.
RobotListParams
);
},
},
handleCheckedChange1
(
value
)
{
handleCheckedChange1
(
value
)
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
let
checkedCount
=
value
.
length
;
let
checkedCount
=
value
.
length
;
this
.
checkAll1
=
checkedCount
===
this
.
pairs
.
length
;
this
.
checkAll1
=
checkedCount
===
this
.
pairs
.
length
;
this
.
isIndeterminate1
=
checkedCount
>
0
&&
checkedCount
<
this
.
pairs
.
length
;
this
.
isIndeterminate1
=
checkedCount
>
0
&&
checkedCount
<
this
.
pairs
.
length
;
...
@@ -388,6 +402,7 @@
...
@@ -388,6 +402,7 @@
},
},
//通过机器人状态筛选
//通过机器人状态筛选
statusFilter
(
status
)
{
statusFilter
(
status
)
{
this
.
robotAccount
=
this
.
_robotAccount
=
''
;
this
.
robotStatus
=
status
;
this
.
robotStatus
=
status
;
this
.
subtitle
=
status
===
'normal'
?
'正在运行机器人'
:
this
.
subtitle
=
status
===
'normal'
?
'正在运行机器人'
:
(
status
===
'stop'
?
'停止运行机器人'
:
(
status
===
'stop'
?
'停止运行机器人'
:
...
@@ -427,7 +442,38 @@
...
@@ -427,7 +442,38 @@
default
:
default
:
break
break
}
}
}
},
//通过机器人账户搜索
searchByAccount
()
{
if
(
!
this
.
robotAccount
)
{
this
.
$notify
({
title
:
'错误'
,
message
:
"请先输入账户地址后再试"
,
type
:
'error'
,
duration
:
'2000'
,
});
return
;
}
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
=
[];
let
Params
=
{
class
:
"robot"
,
//账户级别 有robot bank admin三个返回数据也不同
account
:
this
.
robotAccount
,
}
this
.
_robotAccount
=
this
.
robotAccount
;
this
.
getRobotList
(
Params
);
},
},
},
watch
:{
watch
:{
platInfo
(
val
){
platInfo
(
val
){
...
@@ -687,6 +733,10 @@
...
@@ -687,6 +733,10 @@
font-size
:
20px
;
font-size
:
20px
;
margin-top
:
100px
;
margin-top
:
100px
;
}
}
.search-box
{
width
:
600px
;
margin
:
-20px
0
20px
0
;
}
</
style
>
</
style
>
<
style
>
<
style
>
/*select组件样式覆盖*/
/*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