Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
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
pseer
gxpt_wechat
Commits
9a364d64
Commit
9a364d64
authored
May 21, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备控制优化
parent
8a669adc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
index.vue
pages/deviceManage/index.vue
+9
-8
No files found.
pages/deviceManage/index.vue
View file @
9a364d64
...
...
@@ -49,13 +49,14 @@
<view
v-if=
"val.deviceList"
class=
"flex-col device-list"
>
<view
class=
"part"
v-if=
"val.deviceList.door"
>
<text
class=
"text-title"
>
门禁控制
</text>
<view
v-if=
"val.deviceList.door.status ==1"
class=
""
>
<text>
电量:
{{
val
.
deviceList
.
door
.
voltage
}}
</text>
<view
class=
""
>
<text
v-if=
"val.deviceList.door.status =='0'"
class=
"text-green"
>
离线
</text>
<text
v-else
>
电量:
{{
val
.
deviceList
.
door
.
voltage
}}
</text>
<button
@
tap=
"onDeviceRun(10,val.deviceList.door)"
class=
"cu-btn bg-blue margin-left-sm"
>
开启
</button>
</view>
<view
v-else-if=
"val.deviceList.door.status =='0'"
class=
""
>
<!--
<view
v-else-if=
"val.deviceList.door.status =='0'"
class=
""
>
<text>
离线
</text>
</view>
</view>
-->
</view>
<view
class=
"part"
v-if=
"val.deviceList.el"
>
<text
class=
"text-title"
>
取电开关
</text>
...
...
@@ -63,8 +64,8 @@
<text
class=
"margin-right-sm"
:class=
"val.deviceList.el.status==3?'text-red':'text-green'"
>
{{
deviceStatusEnum
[
val
.
deviceList
.
el
.
status
]
}}
</text>
<button
@
tap=
"onDeviceRun(20,val.deviceList.el)"
class=
"cu-btn margin-right-sm
"
:class=
"val.deviceList.el.status==2?'bg-blue':'bg-gray'
"
>
开启
</button>
<button
@
tap=
"onDeviceRun(40,val.deviceList.el)"
class=
"cu-btn
"
:class=
"val.deviceList.el.status==3?'bg-blue':'bg-gray'
"
>
关闭
</button>
<button
@
tap=
"onDeviceRun(20,val.deviceList.el)"
class=
"cu-btn margin-right-sm
bg-blue
"
>
开启
</button>
<button
@
tap=
"onDeviceRun(40,val.deviceList.el)"
class=
"cu-btn
bg-blue
"
>
关闭
</button>
<!--
<switch
data-type=
"door"
:data-index=
"index"
:data-k=
"k"
:data-id=
"val.deviceList.el.roomId"
@
change=
"onSwitchDoor"
:class=
"val.deviceList.el.status==3?'checked':''"
:checked=
"val.deviceList.el.status==3?true:false"
color=
"#e54d42"
></switch>
-->
</view>
</view>
...
...
@@ -244,8 +245,8 @@ import moment from "@/common/moment";
// this.onDeviceRun(t,e.target.dataset.id)
// },
onDeviceRun
(
opType
,
device
){
if
(
opType
==
20
&&
device
.
status
!=
2
)
return
;
if
(
opType
==
40
&&
device
.
status
!=
3
)
return
;
//
if(opType == 20 && device.status != 2) return;
//
if(opType == 40 && device.status != 3) return;
let
that
=
this
;
if
(
this
.
deviceTime
){
uni
.
showToast
({
...
...
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