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
936d6297
Commit
936d6297
authored
May 28, 2019
by
xiedong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
9511ea6d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
6 deletions
+46
-6
navLeft.vue
src/components/navLeft.vue
+1
-1
RobotDetails.vue
src/views/RobotDetails.vue
+45
-5
No files found.
src/components/navLeft.vue
View file @
936d6297
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<template
slot=
"title"
>
网站监控
</
template
>
<template
slot=
"title"
>
网站监控
</
template
>
<el-menu-item
:index=
"`/monitor/${index}`"
v-for=
"(item, index) in platInfo"
:key=
"item.platform"
>
{{item.platform}}
</el-menu-item>
<el-menu-item
:index=
"`/monitor/${index}`"
v-for=
"(item, index) in platInfo"
:key=
"item.platform"
>
{{item.platform}}
</el-menu-item>
</el-submenu>
</el-submenu>
<el-submenu
index=
"2"
>
<el-submenu
index=
"2"
v-if=
"environment=='inside'"
>
>
<
template
slot=
"title"
>
币种监控
</
template
>
<
template
slot=
"title"
>
币种监控
</
template
>
<el-menu-item
index=
"/monitor/BTY"
>
BTY
</el-menu-item>
<el-menu-item
index=
"/monitor/BTY"
>
BTY
</el-menu-item>
<el-menu-item
index=
"/monitor/YCC"
>
YCC
</el-menu-item>
<el-menu-item
index=
"/monitor/YCC"
>
YCC
</el-menu-item>
...
...
src/views/RobotDetails.vue
View file @
936d6297
...
@@ -34,13 +34,14 @@
...
@@ -34,13 +34,14 @@
</p>
</p>
</div>
</div>
<div
class=
"switch"
>
<div
class=
"switch"
>
<span
v-show=
"
value1
"
>
关闭
</span>
<span
v-show=
"
robotDetailInfo.status=='normal'
"
>
关闭
</span>
<span
v-show=
"!
value1
"
>
开启
</span>
<span
v-show=
"!
robotDetailInfo.status=='normal'
"
>
开启
</span>
<el-switch
<el-switch
disabled
:value=
"robotDetailInfo.status=='normal'"
v-model=
"value1"
active-color=
"rgba(119,146,167,1)"
active-color=
"rgba(119,146,167,1)"
inactive-color=
"rgba(236,239,241,1)"
>
inactive-color=
"rgba(236,239,241,1)"
@
change=
"clickSwitch(robotDetailInfo)"
>
</el-switch>
</el-switch>
</div>
</div>
</div>
</div>
...
@@ -1120,7 +1121,46 @@
...
@@ -1120,7 +1121,46 @@
duration
:
'2000'
,
duration
:
'2000'
,
});
});
})
})
},
//机器人开关
clickSwitch
(
val
)
{
const
Tips
=
val
.
status
==
'close'
?
'此操作将开启机器人, 是否继续?'
:
'此操作将关闭机器人, 是否继续?'
;
// const Message = val.status=='close' ? '开启机器人成功' : '关闭机器人成功';
this
.
$confirm
(
Tips
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
axios
.
post
(
ApiConfig
.
changeStatus
,{
account
:
val
.
account
,
symbol
:
`
${
val
.
coin
}
/
${
val
.
base
}
`
,
new_status
:
val
.
status
==
'normal'
&&
'close'
||
'open'
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
//为了改变switch的状态
this
.
robotBankList
.
status
=
res
.
data
.
data
.
new_status
sessionStorage
.
robotDetailInfo
.
status
=
res
.
data
.
data
.
new_status
this
.
$message
({
type
:
'success'
,
message
:
res
.
data
.
msg
});
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
res
.
data
.
msg
});
}
}
})
}).
catch
(()
=>
{
this
.
value1
=
!
val
;
this
.
$message
({
type
:
'info'
,
message
:
'已取消操作'
});
});
},
},
},
watch
:
{
watch
:
{
$route
()
{
$route
()
{
...
...
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