Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
冯超鹏
laravelzh
Commits
44c4baf2
Commit
44c4baf2
authored
Dec 12, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
控制切断装置
parent
2fdc51bf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
fire.vue
resources/js/views/monitor/fire.vue
+31
-2
No files found.
resources/js/views/monitor/fire.vue
View file @
44c4baf2
...
@@ -95,7 +95,21 @@
...
@@ -95,7 +95,21 @@
<el-table-column
align=
"center"
label=
"切断装置状态"
width=
"120"
>
<el-table-column
align=
"center"
label=
"切断装置状态"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
<span>
<el-tag
:type=
" scope.row.shutoff_status==1 ? 'success' : 'warning' "
effect=
"dark"
>
{{
shutoffStatus
(
scope
.
row
.
shutoff_status
)
}}
</el-tag>
<el-popconfirm
:title=
"'确定' + unshutoff_status(scope.row.shutoff_status) + scope.row.username + shutoffDevice(scope.row.shutoff_type) + '吗?'"
@
onConfirm=
"changeShutoffStatus(scope.row.id, scope.row.shutoff_status, scope.row.dtype)"
@
onCancel=
"()=>
{}"
>
<el-button
slot=
"reference"
:loading=
"shutoff_loading"
size=
"mini"
:type=
" scope.row.shutoff_status==1 ? 'success' : 'warning' "
@
click=
"shutoff_visible = true"
>
{{
shutoffStatus
(
scope
.
row
.
shutoff_status
)
}}
</el-button>
</el-popconfirm>
</span>
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -130,7 +144,7 @@
...
@@ -130,7 +144,7 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
control
}
from
'@/api/device'
;
import
{
control
,
updedata
}
from
'@/api/device'
;
import
Pagination
from
'@/components/Pagination'
;
// 分页
import
Pagination
from
'@/components/Pagination'
;
// 分页
import
websocketurl
from
'@/api/configurl'
;
import
websocketurl
from
'@/api/configurl'
;
import
clip
from
'@/utils/clipboard'
;
import
clip
from
'@/utils/clipboard'
;
...
@@ -142,6 +156,8 @@ export default {
...
@@ -142,6 +156,8 @@ export default {
components
:
{
Pagination
}
,
components
:
{
Pagination
}
,
data
()
{
data
()
{
return
{
return
{
shutoff_visible
:
false
,
shutoff_loading
:
false
,
downloadLoading
:
false
,
downloadLoading
:
false
,
tableKey
:
0
,
tableKey
:
0
,
loading
:
true
,
loading
:
true
,
...
@@ -259,6 +275,19 @@ export default {
...
@@ -259,6 +275,19 @@ export default {
shutoff
[
2
]
=
'关闭'
;
shutoff
[
2
]
=
'关闭'
;
return
shutoff
[
id
];
return
shutoff
[
id
];
}
,
}
,
unshutoff_status
(
state
)
{
return
state
===
1
?
'关闭'
:
'开启'
;
}
,
// 修改切断装置状态
changeShutoffStatus
(
id
,
shutoff_status
,
tid
)
{
updedata
({
deid
:
id
,
shutoff_status
:
shutoff_status
!==
1
?
1
:
2
,
tid
:
tid
}
)
.
then
(
response
=>
{
// this.devicelist();
}
)
.
catch
(
err
=>
{
console
.
log
(
err
);
}
);
}
,
onSubmit
()
{
onSubmit
()
{
this
.
formSearch
.
page
=
1
;
this
.
formSearch
.
page
=
1
;
this
.
devicelist
();
this
.
devicelist
();
...
...
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