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