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
fa026470
Commit
fa026470
authored
Jul 19, 2018
by
wxk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情优化
parent
df998225
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
34 deletions
+66
-34
api-config.js
src/config/api-config.js
+2
-2
RobotDetails.vue
src/views/RobotDetails.vue
+64
-32
No files found.
src/config/api-config.js
View file @
fa026470
//
const originUrl = ""//本地开发
const
originUrl
=
"/asset_monitor"
//测试
const
originUrl
=
""
//本地开发
//
const originUrl = "/asset_monitor"//测试
const
Api
=
{
Login
:
originUrl
+
"/login"
,
//登录
Register
:
originUrl
+
"/register"
,
//注册
...
...
src/views/RobotDetails.vue
View file @
fa026470
...
...
@@ -6,20 +6,20 @@
</div>
<el-row
:gutter=
"20"
class=
"operation-area"
>
<el-col
:span=
"16"
>
<div
class=
"dashboard"
:class=
"[robot
Detail
Info.status || 'normal']"
>
<div
class=
"dashboard"
:class=
"[robotInfo.status || 'normal']"
>
<div
class=
"chart-box"
>
<p
class=
"title"
>
今日盈亏
</p>
<p
v-show=
"robot
DetailInfo.today_profit>0"
class=
"data gain"
>
+
{{
(
robotDetail
Info
.
today_profit
*
100
).
toFixed
(
2
)
}}
%
</p>
<p
v-show=
"robot
DetailInfo.today_profit
<0
"
class=
"data lose"
>
-
{{
(
robotDetail
Info
.
today_profit
*
100
).
toFixed
(
2
)
}}
%
</p>
<p
v-show=
"robot
Detail
Info.today_profit==0"
class=
"data none"
>
- -
</p>
<p
v-show=
"robot
Info.today_profit>0"
class=
"data gain"
>
+
{{
(
robot
Info
.
today_profit
*
100
).
toFixed
(
2
)
}}
%
</p>
<p
v-show=
"robot
Info.today_profit
<0
"
class=
"data lose"
>
-
{{
(
robot
Info
.
today_profit
*
100
).
toFixed
(
2
)
}}
%
</p>
<p
v-show=
"robotInfo.today_profit==0"
class=
"data none"
>
- -
</p>
<div
class=
"type-box"
>
<p
v-show=
"robot
Detail
Info.status==='normal'"
class=
"type"
>
正在运行
</p>
<p
v-show=
"robot
Detail
Info.status==='stop'"
class=
"type"
>
停止运行
</p>
<p
v-show=
"robotInfo.status==='normal'"
class=
"type"
>
正在运行
</p>
<p
v-show=
"robotInfo.status==='stop'"
class=
"type"
>
停止运行
</p>
<p>
<span
class=
"result"
>
总盈亏
</span>
<span
v-show=
"robot
DetailInfo.all_profit>0"
class=
"data gain"
>
+
{{
(
robotDetail
Info
.
all_profit
*
100
).
toFixed
(
2
)
}}
%
</span>
<span
v-show=
"robot
DetailInfo.all_profit
<0
"
class=
"data lose"
>
-
{{
(
robotDetail
Info
.
all_profit
*
100
).
toFixed
(
2
)
}}
%
</span>
<span
v-show=
"robot
Detail
Info.all_profit==0"
class=
"data none"
>
- -
</span>
<span
v-show=
"robot
Info.all_profit>0"
class=
"data gain"
>
+
{{
(
robot
Info
.
all_profit
*
100
).
toFixed
(
2
)
}}
%
</span>
<span
v-show=
"robot
Info.all_profit
<0
"
class=
"data lose"
>
-
{{
(
robot
Info
.
all_profit
*
100
).
toFixed
(
2
)
}}
%
</span>
<span
v-show=
"robotInfo.all_profit==0"
class=
"data none"
>
- -
</span>
</p>
</div>
<div
class=
"switch"
>
...
...
@@ -36,24 +36,24 @@
<div
class=
"dashboard-details"
>
<p>
<span>
机器人名称
</span>
<span>
{{
robot
Detail
Info
.
tag
}}
</span>
<span>
{{
robotInfo
.
tag
}}
</span>
</p>
<p>
<span>
交易对
</span>
<span>
{{
robot
DetailInfo
.
coin
}}
/
{{
robotDetail
Info
.
base
}}
</span>
<span>
{{
robot
Info
.
coin
}}
/
{{
robot
Info
.
base
}}
</span>
</p>
<p>
<span>
账户地址
</span>
<span>
{{
robot
Detail
Info
.
account
}}
</span>
<span>
{{
robotInfo
.
account
}}
</span>
</p>
<p>
<span>
运行状态
</span>
<span
v-show=
"robot
Detail
Info.status==='normal'"
class=
"green"
>
正在运行
</span>
<span
v-show=
"robot
Detail
Info.status==='stop'"
class=
"red"
>
停止运行
</span>
<span
v-show=
"robotInfo.status==='normal'"
class=
"green"
>
正在运行
</span>
<span
v-show=
"robotInfo.status==='stop'"
class=
"red"
>
停止运行
</span>
</p>
<p>
<span>
交易所
</span>
<span>
{{
robot
Detail
Info
.
platform
}}
</span>
<span>
{{
robotInfo
.
platform
}}
</span>
</p>
<p>
<span>
行情
</span>
...
...
@@ -70,9 +70,9 @@
<div
class=
"handle-box"
>
<div
class=
"handle-content"
v-loading=
"Loading"
element-loading-text=
"正在刷新数据"
>
<div
class=
"handle"
>
<span
class=
"coin-name"
>
{{
robot
Detail
Info
.
coin
}}
</span>
<span
class=
"button"
@
click=
"clickRecharge(robot
Detail
Info.coin)"
>
充币
</span>
<span
class=
"button"
@
click=
"clickWithdraw(robot
Detail
Info.coin)"
>
提币
</span>
<span
class=
"coin-name"
>
{{
robotInfo
.
coin
}}
</span>
<span
class=
"button"
@
click=
"clickRecharge(robotInfo.coin)"
>
充币
</span>
<span
class=
"button"
@
click=
"clickWithdraw(robotInfo.coin)"
>
提币
</span>
</div>
<p
class=
"item"
>
<span
class=
"type-name"
>
可用
</span>
...
...
@@ -88,18 +88,18 @@
</p>
<p
class=
"item"
>
<span
class=
"type-name"
>
标准
</span>
<span>
{{
robot
Detail
Info
.
coin_normal
}}
</span>
<span>
{{
robotInfo
.
coin_normal
}}
</span>
</p>
<p
class=
"item"
>
<span
class=
"type-name"
>
比例
</span>
<span>
{{
robot
Detail
Info
.
coin_percent
*
100
+
'%'
}}
(总量/标准)
</span>
<span>
{{
robotInfo
.
coin_percent
*
100
+
'%'
}}
(总量/标准)
</span>
</p>
</div>
<div
class=
"handle-content"
v-loading=
"Loading"
element-loading-text=
"正在刷新数据"
>
<div
class=
"handle"
>
<span
class=
"coin-name"
>
{{
robot
Detail
Info
.
base
}}
</span>
<span
class=
"button"
@
click=
"clickRecharge(robot
Detail
Info.base)"
>
充币
</span>
<span
class=
"button"
@
click=
"clickWithdraw(robot
Detail
Info.base)"
>
提币
</span>
<span
class=
"coin-name"
>
{{
robotInfo
.
base
}}
</span>
<span
class=
"button"
@
click=
"clickRecharge(robotInfo.base)"
>
充币
</span>
<span
class=
"button"
@
click=
"clickWithdraw(robotInfo.base)"
>
提币
</span>
</div>
<p
class=
"item"
>
<span
class=
"type-name"
>
可用
</span>
...
...
@@ -115,11 +115,11 @@
</p>
<p
class=
"item"
>
<span
class=
"type-name"
>
标准
</span>
<span>
{{
robot
Detail
Info
.
base_normal
}}
</span>
<span>
{{
robotInfo
.
base_normal
}}
</span>
</p>
<p
class=
"item"
>
<span
class=
"type-name"
>
比例
</span>
<span>
{{
robot
Detail
Info
.
base_percent
*
100
+
'%'
}}
(总量/标准)
</span>
<span>
{{
robotInfo
.
base_percent
*
100
+
'%'
}}
(总量/标准)
</span>
</p>
</div>
<!-- 充币弹框 -->
...
...
@@ -221,7 +221,7 @@
<el-input
v-model=
"account_symbol"
:disabled=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"From"
label-width=
"120px"
>
<el-input
v-model=
"robot
Detail
Info.account"
:disabled=
"true"
></el-input>
<el-input
v-model=
"robotInfo.account"
:disabled=
"true"
></el-input>
</el-form-item>
<el-form-item
label=
"To"
label-width=
"120px"
>
<el-select
...
...
@@ -457,6 +457,7 @@
export
default
{
data
(){
return
{
robotInfo
:
{},
username
:
localStorage
.
getItem
(
'username'
),
value1
:
true
,
coinInfo
:
{},
//目标币账户信息
...
...
@@ -512,11 +513,34 @@
this
.
getWalletInfo
();
this
.
getTransaction
();
this
.
getRecords
();
this
.
getCurrentRobot
();
},
//返回上一页(关闭详情)
closeDetails
()
{
Bus
.
$emit
(
'hideDetails'
)
},
//查询当前机器人信息
getCurrentRobot
()
{
const
symbol
=
this
.
robotDetailInfo
.
coin
+
'/'
+
this
.
robotDetailInfo
.
base
;
const
params
=
{
class
:
'robot'
,
account
:
this
.
robotDetailInfo
.
account
,
symbol
:
[
symbol
]
}
axios
.
post
(
ApiConfig
.
GetMatchRobots
,
params
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
// console.log(res.data.data);
this
.
robotInfo
=
res
.
data
.
data
[
0
];
}
}).
catch
(
error
=>
{
this
.
$notify
({
title
:
'错误'
,
message
:
"服务器崩溃啦,请稍后再试"
,
type
:
'error'
,
duration
:
'2000'
,
});
})
},
//查询账户资金信息
getWalletInfo
()
{
const
params
=
{
...
...
@@ -588,12 +612,13 @@
this
.
Loading
=
false
;
this
.
init
();
}
else
{
this
.
Loading
=
false
;
this
.
$notify
({
title
:
'提示'
,
message
:
res
.
data
.
msg
,
type
:
'error'
,
duration
:
'2000'
,
})
;
})
}
this
.
dialogFormVisible
=
false
;
this
.
dialogFormVisible1
=
false
;
...
...
@@ -602,15 +627,22 @@
this
.
amount_num
=
''
;
this
.
recharge_list_value
=
''
;
this
.
transferok
=
false
;
}).
catch
(
err
=>
{
// console.log(err)
}).
catch
(
error
=>
{
this
.
Loading
=
false
;
this
.
dialogFormVisible
=
false
;
this
.
dialogFormVisible1
=
false
;
this
.
innerVisible
=
false
;
this
.
innerVisible1
=
false
;
this
.
amount_num
=
''
;
this
.
recharge_list_value
=
''
;
this
.
transferok
=
false
;
this
.
$notify
({
title
:
'提示
'
,
message
:
"操作失败,请稍后重试!
"
,
title
:
'错误
'
,
message
:
"服务器崩溃啦,请稍后再试
"
,
type
:
'error'
,
duration
:
'2000'
,
});
})
});
}
},
//点击提币
...
...
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