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
9caf358d
Commit
9caf358d
authored
Jan 11, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备控制功能完善
parent
703db0c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
46 deletions
+43
-46
index.vue
pages/deviceManage/index.vue
+42
-45
myInfo.vue
pages/my/myInfo.vue
+1
-1
No files found.
pages/deviceManage/index.vue
View file @
9caf358d
...
...
@@ -7,36 +7,43 @@
</view>
</view>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"card-box"
>
<view
class=
"store-info"
>
<view
v-
if=
"list.length"
v-
for=
"(item,index) in list"
:key=
"index"
class=
"card-box"
>
<view
class=
"store-info"
@
tap=
"onShowDevice(index)"
>
<view
class=
"flex-row"
>
<view
class=
"part-left"
>
<image
class=
"img"
:src=
"hostUrl+item.images"
mode=
"
heightFix
"
></image>
<image
class=
"img"
:src=
"hostUrl+item.images"
mode=
"
aspectFill
"
></image>
</view>
<view
class=
"flex-col part-right"
>
<view
class=
"flex-between"
>
<text
class=
"text-black text-bold text-xl"
>
{{
item
.
name
}}
</text>
<image
:src=
"assetsPath+'/map_icon.png'"
mode=
"widthFix"
@
tap=
"onNavLocation(item)"
></image>
</view>
<view
class=
"flex-1 flex-between"
>
<view
class=
"flex-row"
>
<view
class=
"img"
>
<image
:src=
"assetsPath+'/location_icon.png'"
mode=
"widthFix"
></image>
<view
class=
""
>
</view>
<view
class=
"flex-1"
>
<text
class=
"text-gray"
>
{{
item
.
address
}}
</text>
</view>
</view>
<text>
{{
item
.
show
?
'收起'
:
'展开'
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"room-box"
>
<view
v-for=
"(val,k) in item.roomVoList"
:key=
'k'
class=
"room-item"
@
tap=
'onNavSearch(val)'
>
<view
class=
"room-stauts"
>
<view
v-show=
"item.show"
class=
"room-box"
>
<view
v-for=
"(val,k) in item.roomVoList"
:key=
'k'
class=
"room-item"
>
<!--
<view
class=
"room-stauts"
>
<image
class=
"img"
:src=
"hostUrl+val.images[0]"
mode=
"heightFix"
></image>
</view>
</view>
-->
<view
class=
"part-right"
>
<view
class=
"room-name"
>
<text
class=
"text-xxl text-pink"
>
{{
val
.
name
}}
</text>
<view
class=
"flex-row"
>
<text
class=
"text-title"
>
房间名称:
</text>
<text
class=
"text-xxl text-pink"
>
{{
val
.
name
}}
</text>
</view>
<text
class=
"text-sm"
:style=
"
{color: colorEnum[val.colorStatus]}">
{{
statusEnum
[
val
.
colorStatus
]
}}
</text>
</view>
<view
v-if=
"val.deviceList"
class=
"flex-col device-list"
>
...
...
@@ -127,7 +134,7 @@ import moment from "@/common/moment";
return
moment
(
val
).
format
(
"HH:mm"
)
}
},
on
Show
()
{
on
Load
()
{
this
.
onGetDicts
()
},
methods
:{
...
...
@@ -183,26 +190,10 @@ import moment from "@/common/moment";
}):[]
}
})
console
.
log
(
this
.
list
,
90909090
)
}
})
},
onNavToInfo
(){
getStarOrder
().
then
(
res
=>
{
console
.
log
(
res
,
"查询保洁中的订单"
)
if
(
res
.
data
.
code
===
200
){
uni
.
navigateTo
({
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
res
.
data
.
data
.
id
})
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
msg
})
}
})
},
onNavLocation
(
val
){
uni
.
openLocation
({
latitude
:
Number
(
val
.
latitude
),
...
...
@@ -214,20 +205,18 @@ import moment from "@/common/moment";
}
})
},
onNavToList
(){
uni
.
navigateTo
({
url
:
"/pages/cleanRecord/index"
})
},
onNavSearch
(
val
){
if
(
val
.
recordsStatus
==
0
){
uni
.
navigateTo
({
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
val
.
recordsId
onShowDevice
(
index
){
if
(
!
this
.
list
[
index
].
roomVoList
.
length
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"当前门店暂无房间"
})
return
}
this
.
list
[
index
].
show
=
!
this
.
list
[
index
].
show
;
this
.
$forceUpdate
();
},
onDeviceRun
(
opType
,
devId
){
console
.
log
(
opType
,
devId
,
989898
)
uni
.
showLoading
({
title
:
"请求中"
})
...
...
@@ -235,7 +224,6 @@ import moment from "@/common/moment";
opType
,
devId
}).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
===
200
){
uni
.
showToast
({
...
...
@@ -266,6 +254,7 @@ import moment from "@/common/moment";
width
:
94%
;
margin-top
:
30
upx
;
box-shadow
:
0
0
8
upx
#ff55ff
;
overflow
:
hidden
;
}
.title-box
{
display
:
flex
;
...
...
@@ -311,14 +300,13 @@ import moment from "@/common/moment";
//
margin-bottom
:
12
upx
;
border-radius
:
20
upx
20
upx
0
0
;
.part-left{
width
:
142
upx
;
height
:
128
upx
;
width
:
40%
;
height
:
200
upx
;
border-radius
:
12
upx
;
margin-right
:
20
upx
;
overflow
:
hidden
;
.img{
height
:
100%
;
max-width
:
200
upx
;
}
}
.part-right
{
...
...
@@ -337,12 +325,15 @@ import moment from "@/common/moment";
}
.flex-row
{
display
:
flex
;
flex
:
1
;
flex-direction
:
row
;
align-items
:
center
;
width
:
80%
;
.img{
width
:
12px
;
margin-right
:
8
upx
;
image{
width
:
24
upx
;
max-height
:
50
upx
;
width
:
100%
;
}
}
}
}
...
...
@@ -375,13 +366,13 @@ import moment from "@/common/moment";
flex-direction
:
row
;
justify-content
:
center
;
width
:
100%
;
padding
:
1
2
upx
1%
;
padding
:
1
8
upx
20
upx
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.2
);
.room-stauts{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
max-width
:
40
%
;
width
:
36
%
;
height
:
200
upx
;
background
:
#FFFFFF
;
border-radius
:
8
rpx
;
...
...
@@ -399,6 +390,9 @@ import moment from "@/common/moment";
display
:
flex
;
justify-content
:
space-between
;
margin
:
12
upx
;
.flex-row{
align-items
:
center
;
}
}
.device-list
{
.part{
...
...
@@ -410,6 +404,9 @@ import moment from "@/common/moment";
}
}
}
.room-item
:last-child
{
border-bottom
:
none
;
}
.marginLeft
{
margin-left
:
0
;
}
...
...
pages/my/myInfo.vue
View file @
9caf358d
...
...
@@ -44,7 +44,7 @@
<view
class=
"flex-col content-box"
>
<view
class=
"user-action"
>
<view
v-for=
"(item,k) in userAction"
:key=
"k"
class=
"action-box"
>
<view
v-if=
"item.show|| userInfo.roleType
=='1'
"
:style=
"
{background:item.color}" class="action-item" @tap="onActionNav(item,k)">
<view
v-if=
"item.show|| userInfo.roleType
>= 1
"
:style=
"
{background:item.color}" class="action-item" @tap="onActionNav(item,k)">
<view
class=
"flex-1"
>
<text
class=
"text-title text-lg"
>
{{
item
.
label
}}
</text>
</view>
...
...
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