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
73a675d1
Commit
73a675d1
authored
Jan 27, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化,优化保洁相关内容
parent
59a1608b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
43 deletions
+90
-43
cleanManage.vue
pages/cleanManage/cleanManage.vue
+4
-4
index.vue
pages/cleanRecord/index.vue
+58
-7
index.vue
pages/deviceManage/index.vue
+15
-20
myInfo.vue
pages/my/myInfo.vue
+13
-12
No files found.
pages/cleanManage/cleanManage.vue
View file @
73a675d1
...
...
@@ -140,7 +140,8 @@ import moment from "@/common/moment";
color
:
"#ff0000"
}
],
cleanStatusEnum
:{}
cleanStatusEnum
:{},
userInfo
:{}
};
},
filters
:{
...
...
@@ -149,6 +150,7 @@ import moment from "@/common/moment";
}
},
onShow
()
{
this
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
this
.
onGetDicts
()
},
methods
:{
...
...
@@ -169,7 +171,6 @@ import moment from "@/common/moment";
},
onLoading
(){
getListStore
().
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
code
===
200
){
let
list
=
res
.
data
.
data
&&
res
.
data
.
data
.
length
?
res
.
data
.
data
:[];
this
.
list
=
list
.
map
(
item
=>
{
...
...
@@ -188,7 +189,6 @@ import moment from "@/common/moment";
},
onNavToInfo
(){
getStarOrder
().
then
(
res
=>
{
console
.
log
(
res
,
"查询保洁中的订单"
)
if
(
res
.
data
.
code
===
200
){
uni
.
navigateTo
({
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
res
.
data
.
data
.
id
...
...
@@ -219,7 +219,7 @@ import moment from "@/common/moment";
})
},
onNavSearch
(
val
){
if
(
val
.
recordsStatus
==
0
){
if
(
val
.
recordsStatus
==
0
||
val
.
recordsUserId
===
this
.
userInfo
.
id
){
uni
.
navigateTo
({
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
val
.
recordsId
})
...
...
pages/cleanRecord/index.vue
View file @
73a675d1
...
...
@@ -30,10 +30,30 @@
<text>
{{
item
.
startDate
||
'-'
}}
</text>
</view>
<view
class=
"flex-row part-1"
>
<view
class=
"flex-1 flex-col"
>
<text>
提交图片:
</text>
<view
class=
"flex-row bg-img-box"
>
<view
class=
"bg-img"
v-for=
"(vals,i) in item.startImage"
:key=
"i"
@
tap=
"ViewImage(item.startImage,i)"
>
<image
:src=
"vals"
mode=
"aspectFill"
></image>
</view>
</view>
</view>
</view>
<view
class=
"flex-row part-1"
>
<text>
完成时间:
</text>
<text>
{{
item
.
endDate
||
'-'
}}
</text>
</view>
<view
class=
"flex-row part-1"
>
<view
class=
"flex-1 flex-col"
>
<text>
提交图片:
</text>
<view
class=
"flex-row bg-img-box"
>
<view
class=
"bg-img"
v-for=
"(vals,i) in item.endImage"
:key=
"i"
@
tap=
"ViewImage(item.endImage,i)"
>
<image
:src=
"vals"
mode=
"aspectFill"
></image>
</view>
</view>
</view>
</view>
<view
class=
"flex-row part-1"
>
<text>
备注:
</text>
<text>
{{
item
.
remark
||
'无'
}}
</text>
</view>
...
...
@@ -90,7 +110,8 @@ import NoLogin from "@/components/noLogin/noLogin"
pageSize
:
10
},
loginStatus
:
true
,
cleanStatusEnum
:{}
cleanStatusEnum
:{},
userInfo
:{}
};
},
onLoad
()
{
...
...
@@ -103,9 +124,16 @@ import NoLogin from "@/components/noLogin/noLogin"
}
},
onShow
()
{
this
.
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
this
.
onGetDicts
()
},
methods
:
{
ViewImage
(
url
,
index
)
{
uni
.
previewImage
({
urls
:
url
,
current
:
index
});
},
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
...
...
@@ -127,13 +155,20 @@ import NoLogin from "@/components/noLogin/noLogin"
})
this
.
status
=
'loading'
cleanList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
let
list
=
res
.
data
.
rows
.
map
(
item
=>
{
return
{
...
item
,
startImage
:
item
.
startImage
?
item
.
startImage
.
split
(
','
):[],
endImage
:
item
.
endImage
?
item
.
endImage
.
split
(
','
):[]
}
})
if
(
this
.
queryParams
.
pageNum
==
1
){
this
.
list
=
res
.
data
.
rows
this
.
list
=
list
}
else
{
this
.
list
=
[...
this
.
list
,...
res
.
data
.
rows
]
this
.
list
=
[...
this
.
list
,...
list
]
}
if
(
this
.
list
.
length
<
res
.
data
.
total
){
this
.
status
=
"loadmore"
...
...
@@ -153,9 +188,11 @@ import NoLogin from "@/components/noLogin/noLogin"
this
.
onLoading
()
},
onNavToOrderInfo
(
val
){
uni
.
navigateTo
({
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
val
.
id
})
if
(
val
.
consumerId
===
this
.
userInfo
.
id
){
uni
.
navigateTo
({
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
val
.
id
})
}
}
}
}
...
...
@@ -192,4 +229,17 @@ import NoLogin from "@/components/noLogin/noLogin"
}
}
}
.bg-img-box
{
display
:
flex
;
flex-wrap
:
wrap
;
.bg-img{
width
:
48%
;
height
:
200
upx
;
margin
:
10
upx
1%
;
image{
width
:
100%
;
height
:
100%
;
}
}
}
</
style
>
\ No newline at end of file
pages/deviceManage/index.vue
View file @
73a675d1
...
...
@@ -51,7 +51,7 @@
<text
class=
"text-title"
>
门禁控制
</text>
<view
v-if=
"val.deviceList.door.status ==1"
class=
""
>
<text>
电量:
{{
val
.
deviceList
.
door
.
voltage
}}
</text>
<button
@
tap=
"onDeviceRun(10,val.deviceList.door.
dev
Id)"
class=
"cu-btn bg-blue margin-left-sm"
>
开启
</button>
<button
@
tap=
"onDeviceRun(10,val.deviceList.door.
room
Id)"
class=
"cu-btn bg-blue margin-left-sm"
>
开启
</button>
</view>
<view
v-else-if=
"val.deviceList.door.status =='0'"
class=
""
>
<text>
离线
</text>
...
...
@@ -62,7 +62,7 @@
<view
v-if=
"val.deviceList.el.status >=1"
class=
""
>
<!--
<button
@
tap=
"onDeviceRun(20,val.deviceList.el.devId)"
class=
"cu-btn bg-blue margin-right-sm"
>
开启
</button>
<button
@
tap=
"onDeviceRun(40,val.deviceList.el.devId)"
class=
"cu-btn bg-blue"
>
关闭
</button>
-->
<switch
data-type=
"door"
:data-index=
"index"
:data-k=
"k"
:data-id=
"val.deviceList.el.
dev
Id"
@
change=
"onSwitchDoor"
:class=
"val.deviceList.el.status==3?'checked':''"
:checked=
"val.deviceList.el.status==3?true:false"
color=
"#e54d42"
></switch>
<switch
data-type=
"door"
:data-index=
"index"
:data-k=
"k"
:data-id=
"val.deviceList.el.
room
Id"
@
change=
"onSwitchDoor"
:class=
"val.deviceList.el.status==3?'checked':''"
:checked=
"val.deviceList.el.status==3?true:false"
color=
"#e54d42"
></switch>
</view>
<view
v-else
class=
""
>
<text>
离线
</text>
...
...
@@ -134,7 +134,7 @@ import moment from "@/common/moment";
cleanStatusEnum
:{},
switchDoor
:
true
,
switchEl
:
true
,
deviceTime
:
{}
,
deviceTime
:
false
,
optionStatus
:{
10
:
'开门'
,
20
:
'取电'
,
...
...
@@ -184,13 +184,15 @@ import moment from "@/common/moment";
devType
:
item
.
devType
,
devId
:
item
.
devId
,
voltage
:
item
.
voltage
,
status
:
item
.
status
status
:
item
.
status
,
roomId
:
val
.
id
}
}
else
{
deviceList
[
'el'
]
=
{
devType
:
item
.
devType
,
devId
:
item
.
devId
,
status
:
item
.
status
status
:
item
.
status
,
roomId
:
val
.
id
}
}
...
...
@@ -234,28 +236,25 @@ import moment from "@/common/moment";
this
.
$forceUpdate
();
},
onSwitchDoor
(
e
){
console
.
log
(
e
,
909090
)
let
t
=
e
.
target
.
value
?
20
:
40
let
t
=
e
.
target
.
value
?
20
:
40
this
.
onDeviceRun
(
t
,
e
.
target
.
dataset
.
id
)
},
onDeviceRun
(
opType
,
dev
Id
){
onDeviceRun
(
opType
,
room
Id
){
let
that
=
this
;
if
(
this
.
deviceTime
[
devId
]
){
if
(
this
.
deviceTime
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"操作频繁,请稍微再试"
})
return
}
this
.
deviceTime
[
devId
]
=
true
;
this
.
deviceTime
=
true
;
uni
.
showLoading
({
title
:
"请求中"
})
deviceRun
({
opType
,
dev
Id
room
Id
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
data
.
code
===
200
){
...
...
@@ -263,13 +262,9 @@ import moment from "@/common/moment";
icon
:
"success"
,
title
:
this
.
optionStatus
[
opType
]
+
"成功"
})
return
((
id
)
=>
{
setTimeout
(()
=>
{
that
.
deviceTime
[
id
]
=
false
;
},
5000
)
})(
devId
)
setTimeout
(()
=>
{
that
.
deviceTime
=
false
;
},
5000
)
}
})
}
...
...
pages/my/myInfo.vue
View file @
73a675d1
...
...
@@ -143,7 +143,18 @@
assetsPath
:
config
.
assetsPath
,
hostUrl
:
config
.
hostUrl
,
userInfo
:{},
userAction
:[
userAction
:[],
wifiData
:{
name
:
""
,
password
:
''
},
servicePhone
:
''
,
userName
:
''
,
deviceRole
:
false
}
},
onShow
()
{
this
.
userAction
=
[
{
label
:
"订单"
,
iconUrl
:
config
.
assetsPath
+
'/my_list_15.png'
,
...
...
@@ -176,17 +187,7 @@
color
:
"#F1EEFE"
,
show
:
false
}
],
wifiData
:{
name
:
""
,
password
:
''
},
servicePhone
:
''
,
userName
:
''
,
deviceRole
:
false
}
},
onShow
()
{
];
this
.
onCheckUserLogin
();
this
.
onGetSysConfig
();
},
...
...
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