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
6c0e3067
Commit
6c0e3067
authored
Jun 05, 2019
by
xiedong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开关机器人swith状态不变bug
parent
91f59d97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
RobotDetails.vue
src/views/RobotDetails.vue
+9
-7
overview.vue
src/views/overview.vue
+1
-1
No files found.
src/views/RobotDetails.vue
View file @
6c0e3067
...
@@ -34,13 +34,13 @@
...
@@ -34,13 +34,13 @@
</p>
</p>
</div>
</div>
<div
class=
"switch"
>
<div
class=
"switch"
>
<span
v-show=
"robot
DetailInfo.status
=='normal'"
>
关闭
</span>
<span
v-show=
"robot
Info.status=
=='normal'"
>
关闭
</span>
<span
v-show=
"!robot
DetailInfo.status
=='normal'"
>
开启
</span>
<span
v-show=
"!robot
Info.status=
=='normal'"
>
开启
</span>
<el-switch
<el-switch
:value=
"robot
DetailInfo.status
=='normal'"
:value=
"robot
Info.status=
=='normal'"
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(robot
Detail
Info)"
@
change=
"clickSwitch(robotInfo)"
>
>
</el-switch>
</el-switch>
</div>
</div>
...
@@ -1127,7 +1127,7 @@
...
@@ -1127,7 +1127,7 @@
},
},
//机器人开关
//机器人开关
clickSwitch
(
val
)
{
clickSwitch
(
val
)
{
const
Tips
=
val
.
status
==
'
close
'
?
'此操作将开启机器人, 是否继续?'
:
'此操作将关闭机器人, 是否继续?'
;
const
Tips
=
val
.
status
==
'
stop
'
?
'此操作将开启机器人, 是否继续?'
:
'此操作将关闭机器人, 是否继续?'
;
// const Message = val.status=='close' ? '开启机器人成功' : '关闭机器人成功';
// const Message = val.status=='close' ? '开启机器人成功' : '关闭机器人成功';
this
.
$confirm
(
Tips
,
'提示'
,
{
this
.
$confirm
(
Tips
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -1141,8 +1141,10 @@
...
@@ -1141,8 +1141,10 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
//为了改变switch的状态
//为了改变switch的状态
this
.
robotBankList
.
status
=
res
.
data
.
data
.
new_status
console
.
log
(
res
)
sessionStorage
.
robotDetailInfo
.
status
=
res
.
data
.
data
.
new_status
this
.
getCurrentRobot
()
// this.robotBankList.status=res.data.data.new_status
// sessionStorage.robotDetailInfo.status=res.data.data.new_status
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
...
...
src/views/overview.vue
View file @
6c0e3067
...
@@ -398,7 +398,7 @@
...
@@ -398,7 +398,7 @@
this
.
$router
.
push
(
`/monitor/
${
this
.
$route
.
params
.
name
}
/RobotDetail`
);
this
.
$router
.
push
(
`/monitor/
${
this
.
$route
.
params
.
name
}
/RobotDetail`
);
},
},
clickSwitch
(
val
)
{
clickSwitch
(
val
)
{
const
Tips
=
val
.
status
==
'
close
'
?
'此操作将开启机器人, 是否继续?'
:
'此操作将关闭机器人, 是否继续?'
;
const
Tips
=
val
.
status
==
'
stop
'
?
'此操作将开启机器人, 是否继续?'
:
'此操作将关闭机器人, 是否继续?'
;
// const Message = val.status=='close' ? '开启机器人成功' : '关闭机器人成功';
// const Message = val.status=='close' ? '开启机器人成功' : '关闭机器人成功';
this
.
$confirm
(
Tips
,
'提示'
,
{
this
.
$confirm
(
Tips
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
...
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