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
b1e9eaf2
Commit
b1e9eaf2
authored
Jul 23, 2018
by
wxk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面布局重构
parent
80a0119b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
117 additions
and
21 deletions
+117
-21
navLeft.vue
src/components/navLeft.vue
+12
-4
index.js
src/router/index.js
+7
-1
Login.vue
src/views/Login.vue
+7
-6
RobotContainer.vue
src/views/RobotContainer.vue
+25
-0
RobotDetails.vue
src/views/RobotDetails.vue
+49
-1
account.vue
src/views/account.vue
+15
-0
container.vue
src/views/container.vue
+2
-9
overview.vue
src/views/overview.vue
+0
-0
No files found.
src/components/navLeft.vue
View file @
b1e9eaf2
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
<el-menu-item
index=
"BTY"
>
BTY
</el-menu-item>
<el-menu-item
index=
"BTY"
>
BTY
</el-menu-item>
<el-menu-item
index=
"YCC"
>
YCC
</el-menu-item>
<el-menu-item
index=
"YCC"
>
YCC
</el-menu-item>
</el-submenu>
</el-submenu>
<el-menu-item
index=
"account"
>
<span
slot=
"title"
>
账户监控
</span>
</el-menu-item>
</el-menu>
</el-menu>
</div>
</div>
</template>
</template>
...
@@ -26,17 +29,22 @@
...
@@ -26,17 +29,22 @@
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
platInfo
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'platInfo'
)),
active
:
''
active
:
''
}
}
},
},
props
:
[
'platInfo'
],
created
()
{
created
()
{
this
.
active
=
this
.
$route
.
params
.
name
;
this
.
active
=
this
.
$route
.
params
.
name
||
'account'
;
},
},
methods
:
{
methods
:
{
navClick
()
{
navClick
()
{
this
.
$router
.
push
(
'/monitor/'
+
this
.
active
)
if
(
this
.
active
!=
'account'
){
Bus
.
$emit
(
'navClick'
)
this
.
$router
.
push
(
'/monitor/'
+
this
.
active
)
Bus
.
$emit
(
'navClick'
)
}
else
{
this
.
active
=
'account'
;
this
.
$router
.
push
(
'/monitor/account'
);
}
}
}
},
},
watch
:
{
watch
:
{
...
...
src/router/index.js
View file @
b1e9eaf2
...
@@ -24,9 +24,15 @@ export default new Router({
...
@@ -24,9 +24,15 @@ export default new Router({
children
:
children
:
[
[
{
{
path
:
'account'
,
component
:
function
(
resolve
){
require
([
'../views/account.vue'
],
resolve
);
},
},
{
path
:
":name"
,
path
:
":name"
,
component
:
function
(
resolve
){
component
:
function
(
resolve
){
require
([
'../views/
overview
.vue'
],
resolve
);
require
([
'../views/
RobotContainer
.vue'
],
resolve
);
},
},
children
:
[
children
:
[
{
{
...
...
src/views/Login.vue
View file @
b1e9eaf2
...
@@ -104,6 +104,7 @@ import ApiConfig from "../config/api-config";
...
@@ -104,6 +104,7 @@ import ApiConfig from "../config/api-config";
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
salt
:
'fzm_salt'
,
//md5加盐值
show
:
true
,
show
:
true
,
count
:
''
,
count
:
''
,
timer
:
null
,
timer
:
null
,
...
@@ -115,8 +116,8 @@ export default {
...
@@ -115,8 +116,8 @@ export default {
forget_password
:
''
,
//新密码
forget_password
:
''
,
//新密码
forget_rppassword
:
''
,
//确认新密码
forget_rppassword
:
''
,
//确认新密码
forget_yzm
:
''
,
//忘记密码验证码
forget_yzm
:
''
,
//忘记密码验证码
islogin
:
1
,
//1是登
陆
,2是注册 3是忘记密码
islogin
:
1
,
//1是登
录
,2是注册 3是忘记密码
loginBody
:
{
//登
陆
的数据
loginBody
:
{
//登
录
的数据
email
:
""
,
email
:
""
,
password
:
""
,
password
:
""
,
},
},
...
@@ -213,7 +214,7 @@ export default {
...
@@ -213,7 +214,7 @@ export default {
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
code
===
200
){
this
.
$notify
({
this
.
$notify
({
title
:
'提示'
,
title
:
'提示'
,
message
:
"注册成功,请返回登
陆
"
,
message
:
"注册成功,请返回登
录
"
,
type
:
'success'
,
type
:
'success'
,
duration
:
'2000'
,
duration
:
'2000'
,
});
});
...
@@ -255,7 +256,7 @@ export default {
...
@@ -255,7 +256,7 @@ export default {
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
code
===
200
){
this
.
$notify
({
this
.
$notify
({
title
:
'提示'
,
title
:
'提示'
,
message
:
"登
陆
成功"
,
message
:
"登
录
成功"
,
type
:
'success'
,
type
:
'success'
,
duration
:
'2000'
,
duration
:
'2000'
,
});
});
...
@@ -280,7 +281,7 @@ export default {
...
@@ -280,7 +281,7 @@ export default {
.
catch
(
err
=>
{
.
catch
(
err
=>
{
this
.
$notify
({
this
.
$notify
({
title
:
'提示'
,
title
:
'提示'
,
message
:
"登
陆
失败,请稍后再试"
,
message
:
"登
录
失败,请稍后再试"
,
type
:
'error'
,
type
:
'error'
,
duration
:
'2000'
,
duration
:
'2000'
,
});
});
...
@@ -338,7 +339,7 @@ export default {
...
@@ -338,7 +339,7 @@ export default {
if
(
res
.
data
.
code
===
200
){
if
(
res
.
data
.
code
===
200
){
this
.
$notify
({
this
.
$notify
({
title
:
'提示'
,
title
:
'提示'
,
message
:
"重置密码成功,请返回登
陆
"
,
message
:
"重置密码成功,请返回登
录
"
,
type
:
'success'
,
type
:
'success'
,
duration
:
'2000'
,
duration
:
'2000'
,
});
});
...
...
src/views/RobotContainer.vue
0 → 100644
View file @
b1e9eaf2
<
template
>
<div
class=
"box"
>
<overview
v-if=
"$route.path.split('/').pop() !== 'RobotDetail'"
:platInfo=
"platInfo"
></overview>
<router-view></router-view>
</div>
</
template
>
<
script
>
import
overview
from
'./overview'
export
default
{
data
()
{
return
{
}
},
props
:
[
'platInfo'
],
components
:
{
overview
},
}
</
script
>
<
style
scoped
>
.box
{
padding
:
0
20px
;
}
</
style
>
src/views/RobotDetails.vue
View file @
b1e9eaf2
...
@@ -462,6 +462,7 @@
...
@@ -462,6 +462,7 @@
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
robotBankList
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'robotBankList'
)),
robotDetailInfo
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'robotDetailInfo'
)),
robotDetailInfo
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'robotDetailInfo'
)),
robotInfo
:
{},
robotInfo
:
{},
ticketInfo
:
''
,
//行情
ticketInfo
:
''
,
//行情
...
@@ -510,7 +511,6 @@
...
@@ -510,7 +511,6 @@
recordsLoading
:
false
,
//交易记录查询加载
recordsLoading
:
false
,
//交易记录查询加载
}
}
},
},
props
:
[
'robotBankList'
],
created
()
{
created
()
{
this
.
init
();
this
.
init
();
},
},
...
@@ -1094,6 +1094,54 @@
...
@@ -1094,6 +1094,54 @@
</
style
>
</
style
>
<
style
>
<
style
>
/*select组件样式覆盖*/
/*select组件样式覆盖*/
.select-bar-content
{
padding
:
2px
0
0
65px
;
.
el-checkbox-button
:
last-child
.
el-checkbox-button__inner
,
.
el-checkbox-button
:
first-child
.
el-checkbox-button__inner
{
border-radius
:
3px
;
}
&
.pair
{
.el-checkbox-button__inner{
width
:
85px
;
}
.el-checkbox-group
.el-checkbox-button
:first-child
{
margin-left
:
90px
;
}
}
.el-checkbox-button__inner
{
padding
:
5px
0
;
width
:
58px
;
text-align
:
center
;
background-color
:
#C3D3DF
;
border-color
:
#C3D3DF
;
box-shadow
:
none
;
color
:
#fff
;
border-radius
:
3px
;
font-size
:
12px
;
}
.el-checkbox-button
{
margin
:
0
10px
10px
0
;
border-radius
:
3px
;
}
.el-checkbox-button.is-checked
.el-checkbox-button__inner
{
background-color
:
#7792A7
;
border-color
:
#7792A7
;
}
.el-checkbox-button.is-focus
.el-checkbox-button__inner
{
border-color
:
#dcdfe6
;
}
&>
.el-checkbox-button
{
margin-left
:
-69px
;
}
.el-checkbox-group
{
margin-top
:
-34px
;
.
el-checkbox-button
:
first-child
{
margin-left
:
70px
;
}
}
}
</
style
>
<
style
>
/*select组件样式覆盖*/
.record-box
{
.record-box
{
.select-bar-content
{
.select-bar-content
{
padding
:
0
0
0
40px
;
padding
:
0
0
0
40px
;
...
...
src/views/account.vue
0 → 100644
View file @
b1e9eaf2
<
template
>
<div>
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
scoped
>
</
style
>
src/views/container.vue
View file @
b1e9eaf2
...
@@ -48,17 +48,10 @@
...
@@ -48,17 +48,10 @@
})
})
},
},
getRobotBank
()
{
getRobotBank
()
{
const
params
=
{
axios
.
post
(
ApiConfig
.
GetRobotBank
,{
class
:
"bank"
}).
then
(
res
=>
{
"class"
:
"bank"
,
//账户级别 有robot bank admin三个返回数据也不同
"coin"
:[],
//目标币种,用于首页里的筛选和币种监控 可选参数
"symbol"
:[],
//币种对,用于网站监控里的筛选 可选参数
"status"
:
""
,
//机器人运行状态 可选参数
"abnormal"
:
""
,
//有profit,coin,base这三种异常类别 可选参数
"platform"
:[]
//交易所种类 可选参数
}
axios
.
post
(
ApiConfig
.
GetRobotBank
,
params
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
// console.log(res.data.data);
// console.log(res.data.data);
sessionStorage
.
setItem
(
'robotBankList'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
robotBankList
=
res
.
data
.
data
this
.
robotBankList
=
res
.
data
.
data
}
}
})
})
...
...
src/views/overview.vue
View file @
b1e9eaf2
This diff is collapsed.
Click to expand it.
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