This commit is contained in:
吴鹏 2024-12-23 18:15:03 +08:00
parent c397c56f68
commit 6110c37621
17 changed files with 4060 additions and 151 deletions

1439
common/uqrcode.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
22155221
</view>
</view>
<view class="ulbox" style="border-bottom: none;">
<view class="ulbox" style="border-bottom: none;" @click="btnsf">
<view class="one">
收费方式
</view>
@ -36,7 +36,7 @@
套餐1
</view>
</view>
<view class="shichang">
<view class="shichang" @click="btnsf">
<view class="stop">
<view class="">
套餐时长
@ -80,7 +80,12 @@
},
methods: {
//
btnsf(){
uni.navigateTo({
url:'/page_moban/shoufei'
})
}
}
}
</script>

387
page_moban/toufcesuo.vue Normal file
View File

@ -0,0 +1,387 @@
<template>
<view class="page">
<u-navbar title="设备信息" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='48' id="navbar">
</u-navbar>
<view class="box">
<view class="ulbox">
<view class="one">
设备名称
</view>
<view class="two">
卫生间门
</view>
</view>
<view class="ulbox" style="border: none;" @click="showthr = true">
<view class="one">
开锁条件
</view>
<view class="two">
{{kstj}} <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
</view>
</view>
<u-select v-model="showthr" :list="listthr" @confirm="btnthr"></u-select>
<view class="anniu">
<view class="tougang" @click="btnshop">
确认投放
</view>
</view>
</view>
<view class="box">
<view class="ulbox">
<view class="one">
设备型号
</view>
<view class="two">
{{xxobj.model == null ? '--' : xxobj.model}}
</view>
</view>
<view class="ulbox">
<view class="one">
设备编号
</view>
<view class="two">
{{xxobj.sn == null ? '--' : xxobj.sn}}
</view>
</view>
<view class="ulbox">
<view class="one">
设备状态
</view>
<view class="two">
<view class="two" v-if="xxobj.placementStatus == 1">
已投放
</view>
<view class="two" v-if="xxobj.placementStatus == 2">
未投放
</view>
</view>
</view>
<view class="ulbox">
<view class="one">
版本号
</view>
<view class="two">
{{xxobj.version == null ? '--' : xxobj.version}}
</view>
</view>
<view class="ulbox" style="border-bottom: none;">
<view class="one">
联网状态
</view>
<view class="two">
{{xxobj.onlineStatus == 1 ? '在线' : '离线'}}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
listthr:[
{
value: '1',
label: '有当前订单可进入'
},{
value: '2',
label: '有历史订单可进入'
},{
value: '3',
label: '无条件'
}],
showthr:false,
xxobj:{},
storeId:'',
sn:'',
ksfs:'',
kstime:'',
kstj:'',
ksfsid:'',
kstjid:''
}
},
onLoad(option) {
this.storeId = option.storeId
this.sn = option.sn
this.getxx()
},
methods: {
//
btnshop(){
let that = this
uni.showModal({
title: '提示',
content: '您确认要投放吗?',
success: function(res) {
if (res.confirm) {
}
}
})
},
//
btnthr(e){
this.kstj = e[0].label
this.kstjid = e[0].value
},
//
getxx(){
this.$u.get(`/app/device/${this.sn}/bySn`).then(res => {
if (res.code == 200) {
this.xxobj = res.data
}
})
},
}
}
</script>
<style lang="scss">
/deep/ .u-iconfont,
/deep/ .u-title{
padding-bottom: 20rpx;
box-sizing: border-box;
}
.jieb{
width: 750rpx;
height: 152rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
border-radius: 0rpx 0rpx 0rpx 0rpx;
position: fixed;
bottom: 0;
left: 0;
.bt{
width: 680rpx;
height: 104rpx;
background: #48893B;
margin: auto;
margin-top: 24rpx;
border-radius: 24rpx;
font-weight: 600;
font-size: 36rpx;
color: #FFFFFF;
text-align: center;
line-height: 104rpx;
}
}
.lianwang{
width: 680rpx;
height: 112rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
margin: auto;
margin-top: 22rpx;
border-radius: 24rpx;
padding: 36rpx 32rpx;
box-sizing: border-box;
.two{
font-size: 32rpx;
color: #7C7C7C;
}
.thr{
font-size: 32rpx;
color: #3D3D3D;
display: flex;
align-items: center;
image{
width: 12rpx;
height: 34rpx;
margin-left: 10rpx;
}
}
}
.jichuxx{
width: 680rpx;
max-height: 458rpx;
background: #FFFFFF;
box-sizing: border-box;
padding: 44rpx 34rpx;
box-sizing: border-box;
margin: auto;
margin-top: 22rpx;
border-radius: 20rpx;
.top{
border-left: 14rpx solid #48893B;
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
padding-left: 24rpx;
box-sizing: border-box;
}
.one{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 28rpx;
.two{
font-size: 32rpx;
color: #7C7C7C;
}
.thr{
font-size: 32rpx;
color: #3D3D3D;
}
}
}
.toufangbox{
width: 680rpx;
height: 284rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto;
margin-top: 22rpx;
padding: 44rpx 34rpx;
box-sizing: border-box;
.shebeibj{
display: flex;
justify-content: space-between;
.lt{
.name{
font-weight: 600;
font-size: 40rpx;
color: #262B37;
}
.zt{
font-size: 28rpx;
color: #5B5B5B;
margin-top: 12rpx;
text{
color: #00BA88;
}
}
}
.rt{
image{
width: 196rpx;
height: 196rpx;
}
}
}
}
.xuanze{
width: 750rpx;
height: 494rpx;
background: #FFFFFF;
border-radius: 40rpx 40rpx 0 0;
position: fixed;
left: 0;
bottom: 0;
z-index: 1;
padding: 42rpx 62rpx;
box-sizing: border-box;
.changj{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.changj_item{
width: 302rpx;
height: 110rpx;
background: #F0F0F0;
border-radius: 6rpx 6rpx 6rpx 6rpx;
font-weight: 600;
text-align: center;
line-height: 110rpx;
font-size: 36rpx;
margin-top: 40rpx;
color: #3D3D3D;
}
}
.top{
display: flex;
justify-content: space-between;
view{
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
image{
width: 50rpx;
height: 50rpx;
}
}
}
}
.mask{
width: 100%;
height: 100vh;
background-color: #000;
opacity: .3;
position: fixed;
top: 0;
left: 0;
}
.anniu{
width: 100%;
height: 152rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
border-radius: 0rpx 0rpx 0rpx 0rpx;
display: flex;
padding: 24rpx 36rpx;
box-sizing: border-box;
justify-content: space-between;
text-align: center;
position: fixed;
left: 0;
bottom: 0;
.tougang{
width: 680rpx;
margin: auto;
height: 104rpx;
background: #48893B;
font-size: 36rpx;
color: #FFFFFF;
line-height: 104rpx;
border-radius: 20rpx;
}
}
.box{
width: 680rpx;
max-height: 708rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: auto;
margin-top: 28rpx;
padding: 0 30rpx;
box-sizing: border-box;
.ulbox{
width: 100%;
height: 118rpx;
line-height: 118rpx;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #D8D8D8;
.one{
font-size: 32rpx;
color: #3D3D3D;
}
.two{
font-size: 32rpx;
color: #7C7C7C;
display: flex;
align-items: center;
image{
width: 14rpx;
height: 42rpx;
margin-left: 20rpx;
}
}
}
}
page {
background: #F6F6F6;
}
</style>

View File

@ -25,60 +25,66 @@
<image src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg" mode=""></image>
</view>
</view>
<!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 --><!-- 店门 -->
<view class="damen">
<view class="name">
店门
</view>
<view class="menbj">
<view class="menbj" :id="objxq.gateSn == null ? 'active' : ''" @click="btnmendian">
<view class="top">
<view class="lt">
<text style="font-weight: 600;font-size: 32rpx;">店门</text>
</view>
<view class="rt">
<text></text> 已绑定
<view class="rt" :id="objxq.gateSn == null ? 'active' : ''">
<text :id="objxq.gateSn == null ? 'active' : ''"></text> {{objxq.gateSn == null ? '未绑定' : '已绑定'}}
</view>
</view>
<view class="bot">
<view class="bot" v-if="objxq.gateSn != null">
<view class="lt">
有当前订单才能进入门店
</view>
<view class="rt">
SN12154522544
SN{{objxq.gateSn}}
</view>
</view>
</view>
</view>
<view class="damen">
<view class="name">
房间
</view>
<view class="fjlist">
<view class="fj_item" v-for="(itemr,index) in 3" :key="index">
<view class="name">
<text>房间</text> <text style="font-size: 28rpx;color: #3D3D3D;"> <text style="margin-bottom: 6rpx;"></text> 已绑定</text>
</view>
<view class="zt">
SN22451254
<!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 -->
<view class="">
<view class="damen" v-for="(item,index) in roomList" :key="index">
<view class="name">
{{item.storeName}}
</view>
<view class="fjlist">
<view class="fj_item" v-for="(val,index) in item.equipmentList" :key="index" @click="btnfj(index)" :id="val.deviceList[0].sn == null ? 'active' : ''">
<view class="name">
<text :id="val.deviceList[0].sn == null ? 'active' : ''">{{val.name}}</text> <text style="font-size: 28rpx;color: #3D3D3D;" :id="val.deviceList[0].sn == null ? 'active' : ''">
<text style="margin-bottom: 6rpx;" :id="val.deviceList[0].sn == null ? 'active' : ''"></text> {{val.deviceList[0].sn == null ? '未绑定' : '已绑定'}}</text>
</view>
<view class="zt" v-if="val.deviceList[0].sn != null">
SN{{val.deviceList[0].sn}}
</view>
</view>
</view>
</view>
</view>
<!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 --><!-- 大厅 -->
<view class="damen">
<view class="name">
大厅
</view>
<view class="menbj">
<view class="menbj" v-for="(item,index) in datingobj.equipmentList" :key="index" :id="item.deviceList[0].sn == null ? 'active' : ''" @click="btndating(index)">
<view class="top">
<view class="lt">
<text style="font-weight: 600;">1号桌</text>
<view class="lt" :id="item.deviceList[0].sn == null ? 'active' : ''">
<text style="font-weight: 600;" :id="item.deviceList[0].sn == null ? 'active' : ''">{{item.name}}</text>
</view>
<view class="rt">
<text></text> 已绑定
<view class="rt" :id="item.deviceList[0].sn == null ? 'active' : ''">
<text :id="item.deviceList[0].sn == null ? 'active' : ''"></text> {{item.deviceList[0].sn == null ? '未绑定' : '已绑定'}}
</view>
</view>
<view class="bot">
<view class="lt">
SN2234681537
<view class="bot" v-if="item.deviceList[0].sn != null">
<view class="lt" :id="item.deviceList[0].sn == null ? 'active' : ''">
SN{{item.deviceList[0].sn}}
</view>
<view class="rt">
@ -86,52 +92,33 @@
</view>
</view>
</view>
<!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 --><!-- 厕所 -->
<view class="damen">
<view class="name">
卫生间配置
</view>
<view class="menbj" style="background-color: #DEF1DA;">
<view class="top">
<view class="lt">
<text style="font-weight: 600;color: #48893B;">卫生间</text>
<view class="" v-for="(val,index) in cesuolist" :key="index">
<view class="menbj" v-for="(item,index) in val.equipmentList" :key="index" :id="item.deviceList[0].sn == null ? 'active' : ''" @click="btncesuo(index)">
<view class="top">
<view class="lt" :id="item.deviceList[0].sn == null ? 'active' : ''">
<text style="font-weight: 600;" :id="item.deviceList[0].sn == null ? 'active' : ''">{{item.name}}</text>
</view>
<view class="rt" :id="item.deviceList[0].sn == null ? 'active' : ''">
<text :id="item.deviceList[0].sn == null ? 'active' : ''"></text> {{item.deviceList[0].sn == null ? '未绑定' : '已绑定'}}
</view>
</view>
<view class="rt" style="color: #48893B;" >
<text style="background-color: #48893B;"></text> 未绑定
</view>
</view>
</view>
<view class="menbj" v-if="false">
<view class="top">
<view class="lt">
<text style="font-weight: 600;">卫生间</text>
</view>
<view class="rt" style="color: #48893B;" >
<text style="background-color: #48893B;"></text> 未绑定
<view class="bot" v-if="item.deviceList[0].sn != null">
<view class="lt" :id="item.deviceList[0].sn == null ? 'active' : ''">
SN{{item.deviceList[0].sn}}
</view>
<view class="rt">
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="mask" v-if="xuanzeflag"></view>
<view class="xuanze" v-if="xuanzeflag">
<view class="top">
<view>选择使用场景</view>
<view @click="xuanzeflag = false"><image src="https://api.ccttiot.com/smartmeter/img/static/uAd1csWlbqF423arI5b6" mode=""></image></view>
</view>
<view class="changj">
<view class="changj_item" @click="btnshop(1)">
自助棋牌
</view>
<view class="changj_item" @click="btnshop(2)">
共享棋牌
</view>
<view class="changj_item" @click="btnshop(3)">
自助台球
</view>
</view>
</view> -->
</view>
</template>
@ -143,19 +130,218 @@
backgroundColor: "#fff",
},
storeId: '',
xuanzeflag:false
xuanzeflag:false,
roomList: [],
datingobj:{},
cesuolist:[],
list: [],
show: false,
roomId: '',
gateSnobj:{},
objxq:{},
deviceId:''
}
},
onLoad(option) {
this.storeId = option.storeId
this.deviceId = option.deviceId
this.getxq()
},
methods: {
//
btnmendian(){
if(this.objxq.gateSn == null){
let that = this
uni.showModal({
title: '温馨提示',
content: '您确定要绑定到该设施上吗?',
success: function (res) {
if (res.confirm) {
let data = {
storeId:that.storeId,
sn:that.deviceId
}
that.$u.put(`/app/room/bandDoor`,data).then(res => {
if(res.code == 200){
uni.showToast({
title: '绑定成功',
icon: 'success',
duration:2000
})
that.getxq()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
} else if (res.cancel) {
}
}
})
}else{
uni.showToast({
title: '该设施已被绑定',
icon: 'none',
duration:2000
})
}
},
//
btnfj(index){
let deviceIds = this.roomList?.[0]?.equipmentList?.[index]?.deviceList?.[0]?.deviceId ?? null
let equipmentId = this.roomList[0].equipmentList[index].equipmentId
console.log(deviceIds,equipmentId,'房间');
if(deviceIds == null){
let that = this
uni.showModal({
title: '温馨提示',
content: '您确定要绑定到该设施上吗?',
success: function (res) {
if (res.confirm) {
that.$u.post(`/app/device/placement/${equipmentId}/${that.deviceId}`).then(res => {
if(res.code == 200){
uni.showToast({
title: '绑定成功',
icon: 'success',
duration:2000
})
that.getxq()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
} else if (res.cancel) {
}
}
})
}else{
uni.showToast({
title: '该设施已被绑定',
icon: 'none',
duration:2000
})
}
},
//
btndating(index){
let deviceIds = this.datingobj?.equipmentList?.[index]?.deviceList?.[0]?.deviceId ?? null
let equipmentId = this.datingobj.equipmentList[index].equipmentId
console.log(deviceIds,equipmentId,'大厅');
if(deviceIds == null){
let that = this
uni.showModal({
title: '温馨提示',
content: '您确定要绑定到该设施上吗?',
success: function (res) {
if (res.confirm) {
that.$u.post(`/app/device/placement/${equipmentId}/${that.deviceId}`).then(res => {
if(res.code == 200){
uni.showToast({
title: '绑定成功',
icon: 'success',
duration:2000
})
that.getxq()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
} else if (res.cancel) {
}
}
})
}else{
uni.showToast({
title: '该设施已被绑定',
icon: 'none',
duration:2000
})
}
},
//
btncesuo(index){
let deviceIds = this.cesuolist?.[0]?.equipmentList?.[index]?.deviceList?.[0]?.deviceId ?? null
let equipmentId = this.cesuolist[0].equipmentList[index].equipmentId
console.log(deviceIds,equipmentId,'厕所');
if(deviceIds == null){
let that = this
uni.showModal({
title: '温馨提示',
content: '您确定要绑定到该设施上吗?',
success: function (res) {
if (res.confirm) {
that.$u.post(`/app/device/placement/${equipmentId}/${that.deviceId}`).then(res => {
if(res.code == 200){
uni.showToast({
title: '绑定成功',
icon: 'success',
duration:2000
})
that.getxq()
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
} else if (res.cancel) {
}
}
})
}else{
uni.showToast({
title: '该设施已被绑定',
icon: 'none',
duration:2000
})
}
},
//
getxq(){
this.$u.get(`app/store/mch/${this.storeId}`).then(res => {
if (res.code == 200) {
this.objxq = res.data
this.roomList = []
this.cesuolist = []
this.datingobj = {}
res.data.roomList.forEach(item => {
if (item.type2 == 1) {
this.roomList.push(item)
} else if (item.type2 == 2) {
this.datingobj = item;
} else if (item.type2 == 3) {
this.cesuolist.push(item)
}
})
console.log(this.roomList)
if(res.data.gateSn != null || res.data.gateSn != ''){
this.gateSnflag = true
this.$u.get(`/app/device/${res.data.gateSn}/bySn`).then(res => {
if(res.code == 200){
this.gateSnobj = res.data
}
})
}else{
this.gateSnflag = false
}
}
})
}
@ -168,6 +354,10 @@
/deep/ .u-title{
padding-bottom: 20rpx;
}
#active{
background-color: #DEF1DA !important;
color: #48893B !important;
}
page {
background: #F6F6F6;
}
@ -187,7 +377,7 @@
flex-wrap: wrap;
justify-content: space-between;
margin-top: 16rpx;
width: 686rpx;
width: 100%;
max-height: 1408rpx;
background: #FFFFFF;
padding: 16rpx;

View File

@ -24,10 +24,10 @@
<view style="color: #ccc;" class="rt" v-if="item.status == 0">
<text style="background-color: #ccc;"></text> 歇业中
</view>
</view>
</view>
<view class="shouru">
<view class="one">
<view class="shang">
<view class="shang">
今日订单
</view>
<view class="xia">

View File

@ -7,25 +7,25 @@
<view class="tongji">
<view class="one">
<view class="kg" v-if="gateSnflag == false"></view>
<view class="kg" v-else></view>
<view class="kg" v-else> <text v-if="gateSnobj.powerStatus == 0">关</text> <text v-if="gateSnobj.powerStatus == 1"></text> </view>
<view class="gn">店门</view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg" mode=""></image>
</view>
<view class="xian"></view>
<view class="one">
<view class="kg">空闲 <text>4</text> </view>
<view class="kg">空闲 <text>2</text> </view>
<view class="gn">房间</view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg" mode=""></image>
</view>
<view class="xian"></view>
<view class="one">
<view class="kg">空闲 <text>11</text> </view>
<view class="kg">空闲 <text>1</text> </view>
<view class="gn">大厅</view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg" mode=""></image>
</view>
<view class="xian"></view>
<view class="one">
<view class="kg" style="color: #FC902A;">暂无设置</view>
<view class="kg" style="color: #FC902A;">空闲 <text>2</text></view>
<view class="gn">卫生间</view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uZNimi3DEsGWsjfJm2Bg" mode=""></image>
</view>
@ -37,7 +37,7 @@
<view class="menbj">
<view class="top">
<view class="lt">
<text style="font-weight: 600;">店门</text> <text v-if="gateSnobj.onlineStatus == 0">设备离线</text>
<text style="font-weight: 600;">店门</text> <text v-if="gateSnobj.onlineStatus == 0" class="lixian">设备离线</text>
</view>
<view class="rt" v-if="gateSnobj.powerStatus == 0">
<text></text> 已关闭
@ -57,65 +57,71 @@
</view>
</view>
</view>
<view class="damen" v-if="roomList != ''">
<view class="name">
房间
</view>
<view class="fjlist">
<view class="fj_item" v-for="(item, index) in roomList" :key="item.id">
<view class="name">
<text>{{item.roomName}}</text>
<text v-if="hasOfflineDevice(item.deviceList)" style="font-size: 28rpx;font-weight: 400;color: #969696;margin-top: 10rpx;">有设备离线</text>
</view>
<view class="zt" v-if="item.status == 1">
<text>运营中</text>
</view>
<view style="color: #ccc;" class="zt" v-if="item.status == 0">
<text style="background-color: #ccc; display: inline-block; width: 0; height: 0;"></text> 歇业中
</view>
</view>
<!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 -->
<view class="" v-if="roomList != ''">
<view class="damen" v-for="(item,index) in roomList" :key="index">
<view class="name">
{{item.storeName}}
</view>
<view class="fjlist">
<view class="fj_item" v-for="(val,index) in item.equipmentList" @click="btnroomxq" :key="index" :id="val.sn == null ? 'active' : ''">
<view class="name">
<text>{{val.name}}</text>
<text v-if="val.deviceList[0].onlineStatus == 0" style="font-size: 28rpx;font-weight: 400;color: #969696;margin-top: 10rpx;">设备离线</text>
</view>
<view class="zt" v-if="item.status == 1">
<text>运营中</text>
</view>
<view style="color: #ccc;" class="zt" v-if="item.status == 0">
<text style="background-color: #ccc; display: inline-block; width: 0; height: 0;"></text> 歇业中
</view>
</view>
</view>
</view>
</view>
<view class="damen" v-if="datingobj.deviceList">
<!-- 大厅 --> <!-- 大厅 --> <!-- 大厅 --> <!-- 大厅 --> <!-- 大厅 --> <!-- 大厅 --> <!-- 大厅 -->
<view class="damen" v-if="datingobj.equipmentList">
<view class="name">
大厅
</view>
<view class="menbj" v-for="(item,index) in datingobj.deviceList" :key="index">
<view class="menbj" v-for="(item,index) in datingobj.equipmentList" @click="btndating" :key="index">
<view class="top">
<view class="lt">
<text style="font-weight: 600;">{{datingobj.roomName}}</text> <text v-if="item.onlineStatus == 0">设备离线</text>
<text style="font-weight: 600;">{{item.name}}</text> <text v-if="item.deviceList[0].onlineStatus == 0" class="lixian">设备离线</text>
</view>
<view class="rt" v-if="item.powerStatus == 0">
<view class="rt" v-if="item.deviceList[0].powerStatus == 0">
<text></text> 已关闭
</view>
<view class="rt" style="color: #48893B;" v-if="item.powerStatus == 1">
<view class="rt" style="color: #48893B;" v-if="item.deviceList[0].powerStatus == 1">
<text style="background-color: #48893B;"></text> 已开启
</view>
</view>
<view class="bot">
<view class="lt">
SN{{item.sn}}
SN{{item.deviceList[0].sn}}
</view>
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF" mode="" v-if="item.powerStatus == 0"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G" mode="" v-if="item.powerStatus == 1"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF" mode="" v-if="item.deviceList[0].powerStatus == 0"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G" mode="" v-if="item.deviceList[0].powerStatus == 1"></image>
</view>
</view>
</view>
</view>
<!-- 房间 --> <!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 -->
<view class="damen" v-if="cesuolist != ''">
<view class="name">
卫生间配置
</view>
<view class="menbj" v-for="(item,index) in cesuolist" :key="index">
<view class="menbj" v-for="(item,index) in cesuolist[0].equipmentList" @click="btncesuo" :key="index">
<view class="top">
<view class="lt">
<text style="font-weight: 600;">{{item.roomName}}</text> <text v-if="hasOfflineDevice(item.deviceList)">设备离线</text>
<text style="font-weight: 600;">{{item.name}}</text> <text v-if="item.deviceList[0].onlineStatus == 0" class="lixian">设备离线</text>
<!-- v-if="hasOfflineDevice(item.deviceList)" -->
</view>
<view class="rt" v-if="item.powerStatus == 0">
<view class="rt" v-if="item.deviceList[0].powerStatus == 0">
<text></text> 已关闭
</view>
<view class="rt" style="color: #48893B;" v-if="item.powerStatus == 1">
<view class="rt" style="color: #48893B;" v-if="item.deviceList[0].powerStatus == 1">
<text style="background-color: #48893B;"></text> 已开启
</view>
</view>
@ -124,8 +130,8 @@
无条件进入卫生间
</view>
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF" mode="" v-if="item.powerStatus == 0"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G" mode="" v-if="item.powerStatus == 1"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/u4Btme5ARjeAyvvTjgBF" mode="" v-if="item.deviceList[0].powerStatus == 0"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/ua6R9hsgQZTfahcpaA8G" mode="" v-if="item.deviceList[0].powerStatus == 1"></image>
</view>
</view>
</view>
@ -155,8 +161,8 @@
</view>
<view class="anniu">
<view class="xinjian" @click="btnadd">
设置
<view class="xinjian" @click="btnedit">
编辑
</view>
<view class="queren" @click="btnroom">
门店配置
@ -207,6 +213,50 @@
</view>
</view>
<view class="mask" style="z-index: 3;" v-if="cesuoflag"></view>
<view class="addmen" v-if="cesuoflag">
<view class="top">
<view class="cha" @click="cesuoflag = false">
×
</view>
<view class="name">
请选择添加卫生间方式
</view>
</view>
<view class="one" @click="btntoufcesuo">
<view class="lt">
<view class="saoma">
扫码添加
</view>
<view class="saomas">
扫描设备上的二维码
</view>
<view class="saomas">
设置卫生间门
</view>
</view>
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/ukzEfdUUjPKUUOxonIgm" mode=""></image>
</view>
</view>
<view class="one" @click="btntoufcesuo">
<view class="lt">
<view class="saoma">
未投放设备列表添加
</view>
<view class="saomas">
选择列表中的设备
</view>
<view class="saomas">
设置卫生间门
</view>
</view>
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/ukzEfdUUjPKUUOxonIgm" mode=""></image>
</view>
</view>
</view>
</view>
</template>
@ -227,7 +277,8 @@
xuanzeflag:false,
addmenflag:false,
gateSnobj:{},
gateSnflag:false
gateSnflag:false,
cesuoflag:false
}
},
onLoad(option) {
@ -235,14 +286,38 @@
this.getxq()
},
methods: {
//
btnedit(){
uni.navigateTo({
url:'/page_shanghu/editshop?storeId=' + this.storeId
})
},
//
btncesuo(){
console.log(this.cesuolist[0].roomId);
},
//
btndating(){
console.log(this.datingobj.roomId);
},
//
btnroomxq(){
console.log(this.roomList[0].roomId);
uni.navigateTo({
url:'/page_shanghu/roomxq?roomId=' + this.roomList[0].roomId
})
},
// deviceList onlineStatus 0
hasOfflineDevice(deviceList) {
console.log(deviceList);
if(deviceList == !null){
return deviceList.some(device => device.onlineStatus == 0)
}
},
//
btnshop(num){
this.xuanzeflag = false
if(num == 1){
this.addmenflag = true
}else if(num == 2){
@ -253,8 +328,16 @@
uni.navigateTo({
url:'/page_moban/datingxq?storeId=' + this.storeId
})
}else if(num == 4){
this.cesuoflag = true
}
},
//
btntoufcesuo(){
uni.navigateTo({
url:'/page_moban/toufcesuo'
})
},
//
btntouf(){
uni.navigateTo({
@ -319,7 +402,8 @@
this.cesuolist.push(item)
}
})
if(res.data.gateSn != null || res.data.gateSn != ''){
console.log(this.roomList);
if(res.data.gateSn != null){
this.gateSnflag = true
this.$u.get(`/app/device/${res.data.gateSn}/bySn`).then(res => {
if(res.code == 200){
@ -342,6 +426,9 @@
/deep/ .u-title{
padding-bottom: 20rpx;
}
.lixian{
color: #969696 !important;
}
.addmen{
width: 694rpx;
height: 702rpx;
@ -543,9 +630,9 @@
display: flex;
justify-content: space-between;
.lt{
text{
text{
font-size: 28rpx;
color: #969696;
color: #3D3D3D;
margin-right: 54rpx;
}
}

519
page_shanghu/editshop.vue Normal file
View File

@ -0,0 +1,519 @@
<template>
<view class="page">
<u-navbar title="编辑门店" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='40' id="navbar">
</u-navbar>
<view class="top">
<view class="one">
<view class="wz">门店名称</view> <view class=""><input type="text" v-model="name" placeholder="请输入门店名称"/> </view>
</view>
<view class="one">
<view class="wz">门店类型</view> <view class="" @click="showlx = true">{{lxname}} <u-icon style="margin-left: 10rpx;" name="arrow-down" color="#808080" size="28"></u-icon> </view>
</view>
<view class="one">
<view class="wz">营业时间</view>
<view class="but" style="display: flex;justify-content: space-between;">
<view class="" style="font-size: 28rpx;color: #666;" @click="btnyinye(1)">{{ksyy}}</view>
--
<view class="" style="font-size: 28rpx;color: #666;" @click="btnyinye(2)">{{jsyy}}</view>
</view>
</view>
<view class="one">
<view class="wz">联系人</view> <view class=""><input type="text" v-model="lianxi" placeholder="请输入联系人名称"/> </view>
</view>
<view class="one">
<view class="wz">联系电话</view> <view class=""><input type="text" v-model="tel" placeholder="请输入联系电话"/> </view>
</view>
<view class="one" style="margin-bottom: 0;">
<view class="wz">选择位置</view> <view class="" @click="btnweizhi">{{xqdz.length > 15 ? xqdz.slice(0,15) : xqdz}} <u-icon style="margin-left: 10rpx;" name="arrow-down" color="#808080" size="28"></u-icon> </view>
</view>
</view>
<u-picker mode="time" v-model="show" default-time="00:00" :params="params" @confirm="btnyy"></u-picker>
<view class="biaoqian">
<view class="name">
标签设置
</view>
<view class="bqliat">
<view
class="bqitem"
v-for="(item, index) in biaoqianlist"
:key="index"
@click="btnbq(item.dictValue,index)"
:class="{ 'active': isSelected(index) }">
{{ item.dictLabel }}
</view>
</view>
</view>
<view class="mdpic">
<view class="tops">
门店照片
</view>
<view class="tishi">
门店环境设备场景等请选择横屏照片或拍照上传
</view>
<view class="pic" @click="getImage">
<image src="https://api.ccttiot.com/smartmeter/img/static/udXUCs8GULJZE9EZBLf1" class="img" mode=""></image>
</view>
<view class="pic" @click="getImage" v-for="(item,index) in imglist" :key="index">
<image :src="item" mode="aspectFill"></image>
<view class="delimg" @click.stop="btndlimg(index)">×</view>
</view>
<ksp-cropper mode="free" :width="352" :height="190" :maxWidth="1024" :maxHeight="1024" :url="url"
@cancel="oncancel" @ok="onok"></ksp-cropper>
</view>
<u-select v-model="showlx" :list="lxlist" @confirm="btnlx"></u-select>
<view class="anniu">
<view class="xinjian" @click="btnquxiao">
删除
</view>
<view class="queren" @click="btnadd">
修改
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
params: {
hour: true,
minute: true,
},
show: false,
ksyy: '开始营业时间',
jsyy: '结束营业时间',
imglist: [],
token: '',
userImgs: '',
url:'',
latitude:'',
longitude:'',
xqdz:'选择位置',
biaoqianlist:[],
bqindex:-1,
selectedIndices: [],
idlist:[],
name:'',
lianxi:'',
tel:'',
showlx:false,
lxlist:[
{
value: '2',
label: '棋牌'
},{
value: '1',
label: '茶室'
},{
value: '3',
label: '台球'
},
],
lxname:'请选择类型',
lxid:'',
storeId:''
}
},
onLoad(option) {
this.storeId = option.storeId
this.lianxi = ''
this.getxx()
this.getQiniuToken()
this.getbiaoqian()
},
onShow() {
},
methods: {
//
btndlimg(index){
this.imglist.splice(index, 1)
console.log(this.imglist);
},
//
getxx(){
this.$u.get(`app/store/${this.storeId}`).then(res => {
if(res.code == 200){
this.name = res.data.name
this.lianxi = res.data.contactName
this.tel = res.data.contactMobile
this.xqdz = res.data.address
this.longitude = res.data.lng
this.latitude = res.data.lat
this.ksyy = res.data.businessTimeStart
this.jsyy = res.data.businessTimeEnd
this.lxid = res.data.type
if(this.lxid == 1){
this.lxname = '茶室'
}else if(this.lxid == 2){
this.lxname = '棋牌'
}else if(this.lxid == 3){
this.lxname = '台球'
}
this.imglist = res.data.picture.split(",")
console.log(res.data.tags);
if(res.data.tags.length > 0){
this.selectedIndices = res.data.tags.map(item => {
return item - 1
})
}
console.log(this.selectedIndices);
}
})
},
//
btnquxiao(){
let that = this
uni.showModal({
title: '温馨提示',
content: '您确定要删除该门店吗?',
success: function (res) {
if (res.confirm) {
that.$u.delete(`app/store/${that.storeId}`).then(res =>{
if(res.code == 200){
uni.showToast({
title: '删除成功',
icon: 'success',
duration:2000
})
setTimeout(()=>{
uni.navigateBack({
delta:2
})
},1000)
}
})
} else if (res.cancel) {
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
}
})
},
//
btnadd(){
let picture = this.imglist.join(",") //
let arr = this.selectedIndices.map(item => {
return item != null ? item + 1 : null
})
let ss_store_tags = arr.filter(item => {
return item !== null && !isNaN(item)
})
console.log(ss_store_tags)
let data = {
storeId:this.storeId,
name:this.name,
contactName:this.lianxi,
contactMobile:this.tel,
address:this.xqdz,
lng:this.longitude,
lat:this.latitude,
businessTimeStart:this.ksyy,
businessTimeEnd:this.jsyy,
picture:picture,
type:this.lxid,
tags:ss_store_tags
}
this.$u.put("/app/store",data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '修改成功',
icon: 'success',
duration:2000
})
setTimeout(()=>{
uni.navigateBack()
},1000)
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration:2000
})
}
})
},
//
btnlx(e){
this.lxid = e[0].value
this.lxname= e[0].label
},
//
btnbq(dictValue,index) {
const indexExists = this.selectedIndices.includes(index);
if (indexExists) {
this.selectedIndices = this.selectedIndices.filter(i => i !== index);
} else {
this.selectedIndices.push(index);
}
},
isSelected(index) {
console.log(index,this.selectedIndices);
return this.selectedIndices.includes(index);
},
//
getImage() {
if(this.imglist.length >= 5){
uni.showToast({
title: '最多上传五张图片',
icon: 'none'
})
}else{
uni.chooseImage({
count: 1,
success: (rst) => {
this.url = rst.tempFilePaths[0]
console.log(this.url);
}
})
}
},
onok(ev) {
this.url = ""
this.path = ev.path
let _this = this
let math = 'static/' + _this.$u.guid(20)
wx.uploadFile({
url: 'https://up-z2.qiniup.com',
name: 'file',
filePath: _this.path,
formData: {
token: _this.token, //token
key: 'smartmeter/img/' + math
},
success: function(res) {
let str = JSON.parse(res.data)
_this.userImgs = 'https://lxnapi.ccttiot.com/' + str.key
_this.imglist.push(_this.userImgs)
console.log(_this.imglist);
}
})
},
oncancel() {
// url
this.url = "";
},
//
btnweizhi(){
uni.chooseLocation({
success: (res) => {
console.log(res);
this.latitude = res.latitude
this.longitude = res.longitude
this.xqdz = res.name
},
fail: function(err) {
if (err.errMsg && err.errMsg.indexOf('chooseLocation:cancel') === 0) {
uni.showToast({
title: '您取消了位置选择',
icon: 'none'
})
} else {
console.log('选择位置失败', err)
}
},
})
},
// token
getQiniuToken() {
this.$u.get("/common/qiniu/uploadInfo").then((res) => {
if (res.code == 200) {
this.token = res.token
}
})
},
//
getbiaoqian(){
this.$u.get(`/appVerify/getDictData?dictType=ss_store_tags`).then((res) => {
if (res.code == 200) {
this.biaoqianlist = res.data
}
})
},
//
btnyinye(num) {
this.show = true
this.yynum = num
},
//
btnyy(e) {
if (this.yynum == 1) {
this.ksyy = e.hour + ':' + e.minute
} else {
this.jsyy = e.hour + ':' + e.minute
}
},
}
}
</script>
<style lang="scss">
.active{
background-color: #48893B !important;
color: #fff !important;
}
page {
background: #F6F6F6;
padding-bottom: 200rpx;
box-sizing: border-box;
}
/deep/ .panel{
position: fixed;
width: 100%;
height: 100%;
top: 0;
bottom: 0;
left: 0;
z-index: 99 !important;
overflow: hidden;
}
.biaoqian{
width: 680rpx;
max-height: 624rpx;
background: #FFFFFF;
padding: 44rpx 34rpx;
box-sizing: border-box;
margin: auto;
margin-top: 22rpx;
border-radius: 20rpx;
.name{
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.bqliat{
margin-top: 30rpx;
display: flex;
flex-wrap: wrap;
.bqitem{
margin-right: 10rpx;
border: 1px solid #48893B;
color: #48893B;
padding: 10rpx;
margin-top: 10rpx;
}
image{
width: 226rpx;
height: 58rpx;
}
}
}
.anniu{
width: 750rpx;
height: 152rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
border-radius: 0rpx 0rpx 0rpx 0rpx;
position: fixed;
left: 0;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 0 36rpx;
box-sizing: border-box;
padding-top: 24rpx;
.queren{
width: 330rpx;
height: 104rpx;
background: #48893B;
text-align: center;
line-height: 104rpx;
font-weight: 600;
font-size: 36rpx;
color: #FFFFFF;
border-radius: 20rpx;
}
.xinjian{
width: 330rpx;
height: 104rpx;
border: 2rpx solid #48893B;
border-radius: 20rpx;
text-align: center;
line-height: 104rpx;
font-weight: 600;
font-size: 36rpx;
color: #48893B;
}
}
.mdpic{
width: 680rpx;
max-height: 2500rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto;
margin-top: 22rpx;
padding: 38rpx;
box-sizing: border-box;
.tops{
font-size: 32rpx;
color: #3D3D3D;
}
.tishi{
font-size: 24rpx;
color: #3D3D3D;
margin-top: 20rpx;
}
.pic{
margin-top: 36rpx;
position: relative;
.delimg{
width: 40rpx;
height: 40rpx;
background-color: red;
color: #fff;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
font-size: 50rpx;
position: absolute;
top: -10rpx;
right: -10rpx;
}
.img{
width: 144rpx;
height: 144rpx;
}
image{
width: 610rpx;
height: 280rpx;
}
}
}
.top{
width: 680rpx;
max-height: 986rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto;
margin-top: 22rpx;
padding: 50rpx 38rpx;
box-sizing: border-box;
.one{
display: flex;
justify-content: space-between;
margin-bottom: 34rpx;
align-items: center;
font-size: 28rpx;
color: #808080;
.wz{
color: #3D3D3D;
}
input{
text-align: right;
}
}
}
</style>

153
page_shanghu/erwm.vue Normal file
View File

@ -0,0 +1,153 @@
<template>
<view class="page">
<u-navbar title="二维码" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='50' id="navbar">
</u-navbar>
<view class="tishi">
<text>微信扫一扫使用小程序</text>
<text>开启您的一天好心情</text>
</view>
<view class="img">
<!-- <image class="bj" src="https://api.ccttiot.com/smartmeter/img/static/uo2AtaJDlN9q2PxlBEDx" mode=""></image> -->
<!-- 展示二维码 -->
<view class="imgewm">
<canvas canvas-id="qrcode" style="height: 100%;margin: 0 auto;" />
<view class="" style="width: 100%;text-align: center;margin-top: 20rpx;">
SN:{{sn}}
</view>
</view>
</view>
<view class="anniu" @click="saveCanvas">
保存二维码
</view>
</view>
</template>
<script>
import uQRCode from '@/common/uqrcode.js'
export default {
data() {
return {
bgc: {
backgroundColor: "#DEF1DA",
},
sn:''
}
},
onLoad(option) {
this.sn = option.sn
this.qrFun()
},
mounted() {
this.drawCanvas()
},
methods: {
drawCanvas() {
const ctx = uni.createCanvasContext('qrcode', this);
ctx.setFillStyle('#fff');
ctx.fillRect(10, 10, 250, 250);
ctx.draw();
},
//
saveCanvas() {
uni.canvasToTempFilePath({
canvasId: 'qrcode',
success: (res) => {
console.log(res.tempFilePath); //
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function() {
uni.showToast({
title: '保存成功',
icon: 'success'
});
}
});
},
fail: (err) => {
console.error(err);
}
});
},
//****//
qrFun: function() {
this.wemflag = true
uQRCode.make({
canvasId: 'qrcode',
text: 'https://kg.chuantewulian.cn/w?s=' + this.sn,
size: 300,
margin: 0,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
})
},
}
}
</script>
<style lang="scss">
/deep/ .u-iconfont,
/deep/ .u-title{
padding-bottom: 20rpx;
}
.imgewm {
width: 700rpx;
height:700rpx;
margin: auto;
margin-top: 54rpx;
z-index: 2;
}
.tishi{
width: 620rpx;
height: 180rpx;
background: #F8FFF6;
border-radius: 20rpx 20rpx 20rpx 20rpx;
text-align: center;
padding-top: 20rpx;
box-sizing: border-box;
margin: auto;
margin-top: 54rpx;
text{
margin-top: 16rpx;
display: block;
font-size: 36rpx;
color: #3D3D3D;
}
}
page {
width: 750rpx;
height: 1624rpx;
background: #DEF1DA;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.name{
width: 100%;
text-align: center;
font-size: 36rpx;
}
.img{
width: 666rpx;
height: 870rpx;
padding: 0 30rpx;
box-sizing: border-box;
margin-top: 30rpx;
}
.anniu{
width: 546rpx;
height: 88rpx;
background: #48893B;
border-radius: 59rpx 59rpx 59rpx 59rpx;
font-weight: 600;
font-size: 40rpx;
color: #FFFFFF;
text-align: center;
line-height: 88rpx;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 80rpx;
}
</style>

View File

@ -139,7 +139,8 @@
let arr = this.selectedIndices.map(item => {
return item + 1
})
let ss_store_tags = arr.join(',')
// console.log(arr);
let ss_store_tags = arr
let data = {
name:this.name,
contactName:this.lianxi,
@ -151,7 +152,7 @@
businessTimeEnd:this.jsyy,
picture:picture,
type:this.lxid,
ss_store_tags:ss_store_tags
tags:ss_store_tags
}
this.$u.post("/app/store",data).then((res) => {
if (res.code == 200) {

435
page_shanghu/roomedit.vue Normal file
View File

@ -0,0 +1,435 @@
<template>
<view class="page">
<u-navbar title="编辑房间" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='40' id="navbar">
</u-navbar>
<view class="dalist">
<view class="box">
<view class="name">
<view class="lt">
名称
</view>
<view class="rt">
<input type="text" placeholder="请输入房间名称"/> <image src="https://api.ccttiot.com/smartmeter/img/static/uCta8cp7uXd1lGjZS6sc" mode=""></image>
</view>
</view>
<view class="name">
<view class="lt">
类型
</view>
<view class="rt" @click="show = true">
{{leixing}} <image src="https://api.ccttiot.com/smartmeter/img/static/uCta8cp7uXd1lGjZS6sc" mode=""></image>
</view>
</view>
<view class="name" style="border: none;">
<view class="lt">
是否开启保洁功能
</view>
<view class="rt">
<u-switch size="32" v-model="checked" active-color="#48893B" inactive-color="#eee"></u-switch>
</view>
</view>
</view>
<view class="biaoqian">
<view class="name">
标签设置
</view>
<view class="bqliat">
<view
class="bqitem"
v-for="(item, index) in biaoqianlist"
:key="index"
@click="btnbq(item.dictValue,index)"
:class="{ 'active': isSelected(index) }">
{{ item.dictLabel }}
</view>
</view>
</view>
<view class="biaoqian">
<view class="name">
房间照片
</view>
<image v-if="imgurl == ''" @click="getImage" src="https://api.ccttiot.com/smartmeter/img/static/uRBDOOtzMZgSbCcXQPGH" mode=""></image>
<image v-else :src="imgurl" mode=""></image>
<ksp-cropper mode="free" :width="150" :height="150" :maxWidth="1024" :maxHeight="1024" :url="url"
@cancel="oncancel" @ok="onok"></ksp-cropper>
</view>
<view class="biaoqian">
<view class="name">
价格设置
</view>
<view class="shoufei" @click="btnshoufei">
<view class="shang">
<view class="">
收费方式
</view>
<view class="">
<text>套餐1 </text> <image src="https://api.ccttiot.com/smartmeter/img/static/u0rIwef50qNN4aaeqSfl" mode=""></image>
</view>
</view>
<view class="shichang">
<view class="stop">
<view class="">
套餐时长
</view>
<view class="">
套餐价格()
</view>
</view>
<view class="stop" v-for="(item,index) in 4" :key="index" style="background-color: #F9F9F9;">
<view class="">
3小时
</view>
<view class="">
99.9
</view>
</view>
</view>
<view class="wz">
订单提前结束剩余消费时长金额不返还
</view>
</view>
<!-- <view class="shoufei" @click="btnguize">
<view class="shang">
<view class="">
取消规则
</view>
<view class="">
<text>取消规则1 </text> <image src="https://api.ccttiot.com/smartmeter/img/static/u0rIwef50qNN4aaeqSfl" mode=""></image>
</view>
</view>
<view class="shichang">
<view class="stop">
<view class="">
取消时长
</view>
<view class="">
违约金
</view>
<view class="">
说明
</view>
</view>
<view class="stop" v-for="(item,index) in 4" :key="index" style="background-color: #F9F9F9;">
<view class="">
开始前30分钟外
</view>
<view class="">
不收取
</view>
<view class="">
</view>
</view>
</view>
</view> -->
</view>
<u-select v-model="show" :list="list" @confirm="confirm"></u-select>
<view class="anniu">
<view class="xinjian" @click="btndt">
取消
</view>
<view class="queren" @click="btnmd">
确认新建
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
leixing:'请选择类型',
show:false,
checked:false,
list:[
{
value: '2',
label: '棋牌'
},
{
value: '1',
label: '茶室'
},
{
value: '3',
label: '台球'
},
],
type:'',
biaoqianlist:[],
selectedIndices:[],
token:'',
url:'',
imgurl:''
}
},
onLoad() {
},
onShow() {
this.getbiaoqian()
this.getQiniuToken()
},
methods: {
//
btnshoufei(){
uni.navigateTo({
url:'/page_moban/shoufei'
})
},
//
btnbq(dictValue,index) {
const indexExists = this.selectedIndices.includes(index);
if (indexExists) {
this.selectedIndices = this.selectedIndices.filter(i => i !== index);
} else {
this.selectedIndices.push(index);
}
},
isSelected(index) {
return this.selectedIndices.includes(index);
},
//
getbiaoqian(){
this.$u.get(`/appVerify/getDictData?dictType=ss_room_tags`).then((res) => {
if (res.code == 200) {
this.biaoqianlist = res.data
}
})
},
//
getImage() {
uni.chooseImage({
count: 1,
success: (rst) => {
this.url = rst.tempFilePaths[0]
console.log(this.url);
}
})
},
onok(ev) {
this.url = ""
this.path = ev.path
let _this = this
let math = 'static/' + _this.$u.guid(20)
wx.uploadFile({
url: 'https://up-z2.qiniup.com',
name: 'file',
filePath: _this.path,
formData: {
token: _this.token, //token
key: 'smartmeter/img/' + math
},
success: function(res) {
let str = JSON.parse(res.data)
_this.imgurl = 'https://lxnapi.ccttiot.com/' + str.key
}
})
},
oncancel() {
// url
this.url = "";
},
// token
getQiniuToken() {
this.$u.get("/common/qiniu/uploadInfo").then((res) => {
if (res.code == 200) {
this.token = res.token
}
})
},
//
confirm(e){
this.type = e[0].value
this.leixing =e[0].label
},
//
btnmd(){
},
//
btndt(){
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
.active{
background-color: #48893B !important;
color: #fff !important;
}
page {
background: #F6F6F6;
}
.dalist{
width: 100%;
height: 80vh;
overflow: scroll;
padding-bottom: 40rpx;
box-sizing: border-box;
}
.biaoqian{
width: 680rpx;
max-height: 1624rpx;
background: #FFFFFF;
padding: 44rpx 34rpx;
box-sizing: border-box;
margin: auto;
margin-top: 22rpx;
border-radius: 20rpx;
.shoufei{
margin-top: 30rpx;
.wz{
font-size: 24rpx;
color: #3D3D3D;
margin-top: 24rpx;
margin-bottom: 20rpx;
}
.shichang{
margin-top: 34rpx;
.stop{
display: flex;
width: 618rpx;
height: 76rpx;
line-height: 76rpx;
background: #F0F0F0;
view{
width: 50%;
text-align: center;
font-size: 28rpx;
color: #3D3D3D;
}
}
}
.shang{
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
view{
font-size: 32rpx;
color: #3D3D3D;
display: flex;
align-items: center;
image{
width: 14rpx;
height: 42rpx;
margin-top: 0;
margin-right: 10rpx;
}
}
}
}
image{
width: 144rpx;
height: 144rpx;
margin-top: 30rpx;
}
.name{
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.bqliat{
margin-top: 30rpx;
display: flex;
flex-wrap: wrap;
.bqitem{
margin-right: 10rpx;
border: 1px solid #48893B;
color: #48893B;
padding: 10rpx;
margin-top: 10rpx;
}
image{
width: 226rpx;
height: 58rpx;
}
}
}
.anniu{
width: 750rpx;
height: 152rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
border-radius: 0rpx 0rpx 0rpx 0rpx;
position: fixed;
left: 0;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 0 36rpx;
box-sizing: border-box;
padding-top: 24rpx;
.queren{
width: 314rpx;
height: 104rpx;
background: #48893B;
text-align: center;
line-height: 104rpx;
font-weight: 600;
font-size: 36rpx;
color: #FFFFFF;
border-radius: 20rpx;
}
.xinjian{
width: 314rpx;
height: 104rpx;
border: 2rpx solid #48893B;
border-radius: 20rpx;
text-align: center;
line-height: 104rpx;
font-weight: 600;
font-size: 36rpx;
color: #48893B;
}
}
.box{
width: 680rpx;
max-height: 408rpx;
background: #FFFFFF;
margin: auto;
margin-top: 22rpx;
border-radius: 20rpx;
.name{
display: flex;
justify-content: space-between;
align-items: center;
width: 618rpx;
margin: auto;
height: 110rpx;
border-bottom: 1px solid #D8D8D8;
.lt{
font-size: 32rpx;
color: #3D3D3D;
}
.rt{
display: flex;
align-items: center;
input{
text-align: right;
}
image{
width: 14rpx;
height: 42rpx;
margin-left: 10rpx;
}
}
}
}
</style>

556
page_shanghu/roomxq.vue Normal file
View File

@ -0,0 +1,556 @@
<template>
<view class="page">
<u-navbar title="房间详情" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='50' id="navbar">
</u-navbar>
<view class="boxtop">
<view class="top">
<view class="name">
房间1
</view>
<view class="yuny">
<text></text> 运营中
</view>
</view>
<view class="bot">
<view class="" @click="btnjfgz">
<image src="https://api.ccttiot.com/smartmeter/img/static/udeYbjiOdwddMbUM90QB" mode=""></image> 计费规则
</view>
<view class="" @click="btnewm">
<image src="https://api.ccttiot.com/smartmeter/img/static/uT7NCRBVoRy8KFIF9Gtq" mode=""></image> 下载二维码
</view>
<view class="" @click="btnroomsz">
<image src="https://api.ccttiot.com/smartmeter/img/static/uTBNF3xzr0EAJjzJ3Ggc"mode=""></image> 房间设置
</view>
</view>
</view>
<view class="tops">
<view class="lt">
设施列表
</view>
<view class="rt" @click="flag = !flag">
添加
</view>
<view class="tianjia" v-if="flag">
<view class="" @click="btnaddfm(1)">
添加房门
</view>
<view class="" @click="btnaddfm(2)">
添加电源
</view>
<view class="" @click="btnaddfm(3)" style="border: none;">
添加设施
</view>
</view>
</view>
<view class="list">
<view class="item_list">
<view class="lt">
<view class="name">
房间门 <text>设备离线</text>
</view>
<view class="sn">
SN2234681537
</view>
</view>
<view class="rt">
<view class="name">
<text></text> 已关闭
</view>
<view class="img">
<image src="https://api.ccttiot.com/smartmeter/img/static/uvqVahRyvBHooSDLQfED" mode=""></image>
</view>
</view>
</view>
<view class="item_list" @click="btnwbd">
<view class="lt">
<view class="name">
房间灯 <text>设备离线</text>
</view>
</view>
<view class="rt">
<view class="name">
<text></text> 未绑定
</view>
</view>
</view>
</view>
<!-- 添加房门 -->
<view class="mask" v-if="fmflag"></view>
<view class="addmen" v-if="fmflag">
<view class="top">
<view class="cha" @click="fmflag = false">
×
</view>
<view class="name">
请选择添加{{roomtxt}}方式
</view>
</view>
<view class="one" @click="btntoufcesuo">
<view class="lt">
<view class="saoma">
扫码添加
</view>
<view class="saomas">
扫描设备上的二维码
</view>
<view class="saomas">
设置{{roomtxt}}
</view>
</view>
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/ukzEfdUUjPKUUOxonIgm" mode=""></image>
</view>
</view>
<view class="one" @click="btntouffm">
<view class="lt">
<view class="saoma">
未投放设备列表添加
</view>
<view class="saomas">
选择列表中的设备
</view>
<view class="saomas">
设置{{roomtxt}}
</view>
</view>
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/ukzEfdUUjPKUUOxonIgm" mode=""></image>
</view>
</view>
</view>
<view class="mask" v-if="pricegzflag"></view>
<view class="pricegz" v-if="pricegzflag">
<view class="top">
下单须知
</view>
<view class="shuom">
基础单价每1小时10元最低消费时长2小 押金金额100元订单结束30分钟内退 订单提前结束剩余消费时长金额 不返还
</view>
<view class="annius" @click="pricegzflag = false">
确认
</view>
</view>
<view class="anniu">
<view class="xinjian" @click="btndt">
下线维护
</view>
<view class="xinjian" @click="btndt">
全开
</view>
<view class="xinjian" @click="btndt">
全关
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
roomId:'',
flag:false,
fmflag:false,
roomtxt:'',
pricegzflag:false
}
},
onLoad(option) {
this.roomId = option.roomId
this.getxq()
},
methods: {
//
btnjfgz(){
this.pricegzflag = true
},
//
btnroomsz(){
uni.navigateTo({
url:'/page_shanghu/roomedit'
})
},
//
btnewm(){
uni.navigateTo({
url:'/page_shanghu/erwm'
})
},
//
btntoufcesuo(){
this.fmflag = false
uni.scanCode({
onlyFromCamera: true,
scanType: ['qrCode'],
success: res => {
function getQueryParam(url, paramName) {
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
let results = regex.exec(url);
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
}
console.log(res);
let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue)
let id = getQueryParam(decodedValue, 'sn')
let that = this
let data = {
sn: id,
storeId:this.storeId
}
uni.navigateTo({
url:'/page_shanghu/weishebei'
})
}
})
},
//
btntouffm(){
this.fmflag = false
uni.navigateTo({
url:'/page_shanghu/weishebei'
})
},
//
btnaddfm(num){
if(num == 1){
this.roomtxt = '房门'
this.fmflag = true
this.flag = false
}else if(num == 2){
this.roomtxt = '电源'
this.fmflag = true
this.flag = false
}else if(num == 3){
this.roomtxt = '设施'
this.fmflag = true
this.flag = false
}
},
//
getxq(){
this.$u.get(`/app/room/${this.roomId}`).then(res =>{
if(res.code == 200){
}
})
}
}
}
</script>
<style lang="scss">
/deep/ .u-iconfont,
/deep/ .u-title{
padding-bottom: 20rpx;
}
.pricegz{
width: 636rpx;
max-height: 438rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
padding: 52rpx 46rpx;
box-sizing: border-box;
margin: auto;
position: fixed;
top: 490rpx;
left: 50%;
transform: translateX(-50%);
z-index: 3;
.top{
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
}
.shuom{
font-size: 28rpx;
color: #3D3D3D;
margin-top: 24rpx;
}
.annius{
width: 542rpx;
height: 86rpx;
background: #48893B;
border-radius: 14rpx 14rpx 14rpx 14rpx;
text-align: center;
line-height: 86rpx;
font-weight: 600;
font-size: 36rpx;
color: #FFFFFF;
margin-top: 30rpx;
}
}
.mask{
width: 100%;
height: 100vh;
background-color: #000;
opacity: .3;
position: fixed;
top: 0;
left: 0;
z-index: 3;
}
.addmen{
width: 694rpx;
height: 702rpx;
background: linear-gradient( 180deg, #DEF1DA 0%, #FFFFFF 100%, #FFFFFF 100%);
border-radius: 36rpx 36rpx 36rpx 36rpx;
position: fixed;
top: 464rpx;
left: 50%;
transform: translateX(-50%);
z-index: 3;
box-shadow: 1px 2px 4px -3px;
.one{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
.rt{
image{
width: 60rpx;
height: 60rpx;
}
}
.saoma{
font-weight: 600;
font-size: 36rpx;
color: #48893B;
margin-top: 10rpx;
}
.saomas{
font-size: 28rpx;
color: #48893B;
margin-top: 10rpx;
}
width: 584rpx;
height: 224rpx;
border: 2rpx solid #48893B;
border-radius: 20rpx;
margin: auto;
margin-top: 48rpx;
padding: 38rpx 44rpx;
box-sizing: border-box;
}
.top{
display: flex;
flex-wrap: wrap;
padding: 0 26rpx;
box-sizing: border-box;
.name{
font-weight: 600;
font-size: 44rpx;
color: #48893B;
width: 100%;
text-align: center;
position: absolute;
top: 56rpx;
left: 50%;
transform: translateX(-50%);
}
.cha{
font-size: 68rpx;
font-weight: 600;
width: 100%;
text-align: right;
}
}
}
.anniu{
width: 750rpx;
height: 152rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
border-radius: 0rpx 0rpx 0rpx 0rpx;
position: fixed;
left: 0;
bottom: 0;
display: flex;
justify-content: space-between;
padding: 0 36rpx;
box-sizing: border-box;
padding-top: 24rpx;
.xinjian{
width: 214rpx;
height: 104rpx;
border: 2rpx solid #48893B;
border-radius: 20rpx;
text-align: center;
line-height: 104rpx;
font-weight: 600;
font-size: 36rpx;
color: #48893B;
}
}
page {
background: #F6F6F6;
}
.list{
padding: 0 32rpx;
box-sizing: border-box;
margin-top: 42rpx;
.item_list{
display: flex;
justify-content: space-between;
margin-top: 18rpx;
max-height: 184rpx;
.rt{
.name{
display: flex;
align-items: center;
text{
width: 10rpx;
height: 10rpx;
background: #7C7C7C;
border-radius: 50%;
margin-right: 10rpx;
font-size: 28rpx;
color: #969696;
}
}
.img{
text-align: right;
margin-top: 20rpx;
image{
width: 50rpx;
height: 50rpx;
}
}
}
.lt{
.name{
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
text{
font-size: 28rpx;
color: #969696;
font-weight: 400;
margin-left: 30rpx;
}
}
.sn{
font-size: 26rpx;
color: #3D3D3D;
margin-top: 26rpx;
}
}
padding: 32rpx 30rpx;
box-sizing: border-box;
width: 680rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
}
}
.boxtop{
width: 680rpx;
height: 244rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
margin: auto;
margin-top: 22rpx;
padding: 34rpx 30rpx;
box-sizing: border-box;
.bot{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 40rpx;
view{
display: flex;
align-items: center;
justify-content: center;
width: 204rpx;
height: 54rpx;
border-radius: 27rpx 27rpx 27rpx 27rpx;
border: 1rpx solid #7C7C7C;
image{
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
}
}
.name{
font-weight: 600;
font-size: 30rpx;
color: #3D3D3D;
}
.yuny{
display: flex;
align-items: center;
font-weight: 600;
font-size: 28rpx;
color: #48893B;
text{
width: 10rpx;
height: 10rpx;
background: #48893B;
border-radius: 50%;
margin-right: 10rpx;
}
}
.top{
display: flex;
justify-content: space-between;
border-bottom: 1px solid #D8D8D8;
padding-bottom: 22rpx;
box-sizing: border-box;
}
}
.tops{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 36rpx;
box-sizing: border-box;
margin-top: 70rpx;
position: relative;
.tianjia{
width: 170rpx;
height: 214rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(0,0,0,0.3);
border-radius: 12rpx 12rpx 12rpx 12rpx;
position: absolute;
top: 80rpx;
right: 36rpx;
view{
width: 120rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
margin: auto;
border-bottom: 1px solid #D8D8D8;
font-size: 28rpx;
color: #3D3D3D;
}
}
.lt{
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.rt{
width: 126rpx;
height: 58rpx;
background: #48893B;
border-radius: 6rpx 6rpx 6rpx 6rpx;
font-weight: 600;
text-align: center;
line-height: 58rpx;
font-size: 28rpx;
color: #FFFFFF;
}
}
</style>

View File

@ -53,7 +53,7 @@
</view>
</view>
</view>
<view class="sbm">
<view class="sbm" @click.stop="btnewm(item.sn)">
<text></text>
<view class="">
设备码
@ -147,6 +147,12 @@
url:'/page_shanghu/index'
})
},
//
btnewm(sn){
uni.navigateTo({
url:'/page_shanghu/erwm?sn=' + sn
})
},
//
btnsousuo(){
this.pagesum = 1
@ -314,7 +320,7 @@
border-radius: 14rpx 14rpx 14rpx 14rpx;
border: 2rpx solid #48893B;
text-align: center;
line-height: 62rpx;
line-height: 64rpx;
font-size: 32rpx;
color: #48893B;
}

View File

@ -3,8 +3,8 @@
<u-navbar title="设备信息" :border-bottom="false" :background="bgc" back-icon-color="#262B37" title-color='#262B37'
title-size='36' height='48' id="navbar">
</u-navbar>
<view class="box" v-if="xianshiflag">
<view class="ulbox">
<view class="box" v-if="xxobj.placementStatus == 2">
<view class="ulbox" @click="editnameflag = true">
<view class="one">
设备名称
</view>
@ -66,25 +66,25 @@
</view>
<!-- 已投放 已投放 已投放 -->
<view class="" v-else>
<view class="" v-if="xxobj.placementStatus == 1">
<view class="toufangbox">
<view class="shebeibj">
<view class="lt">
<view class="name">
竹韵包厢
<view class="name" @click="editnameflag = true">
{{xxobj.deviceName}} <u-icon name="edit-pen-fill" color="#3f3f3f" size="38"></u-icon>
</view>
<view class="zt">
设备状态<text>投放</text>
设备状态<text v-if="xxobj.placementStatus == 1">已投放</text><text v-if="xxobj.placementStatus == 2">投放</text>
</view>
<view class="zt">
SN32562365B
SN{{xxobj.sn}}
</view>
<view class="zt">
更新时间2024-09-29 10:23:59
更新时间{{xxobj.updateTime}}
</view>
</view>
<view class="rt">
<image src="https://api.ccttiot.com/smartmeter/img/static/u1sz4KYjWV94zY1AbFSv" mode=""></image>
<image :src="xxobj.picture" mode=""></image>
</view>
</view>
</view>
@ -97,7 +97,7 @@
设备名称
</view>
<view class="thr">
一号桌
{{xxobj.deviceName}}
</view>
</view>
<view class="one">
@ -105,23 +105,26 @@
店铺名称
</view>
<view class="thr">
福鼎-西湖店
{{mdianobj.name == null ? '--' : mdianobj.name}}
</view>
</view>
<view class="one">
<view class="two">
详细地址
</view>
<view class="thr">
福建省宁德市福鼎市太姥山镇
<view class="thr" v-if="mdianobj.address">
{{mdianobj.address.length > 15 ? mdianobj.address.slice(0,15) + '...' : mdianobj.address}}
</view>
<view class="thr" v-else>
--
</view>
</view>
<view class="one">
<view class="two">
投放时间
绑定时间
</view>
<view class="thr">
2024-11-30 13:45:22
{{xxobj.activationTime == null ? '--' : xxobj.activationTime}}
</view>
</view>
</view>
@ -130,7 +133,7 @@
联网状态
</view>
<view class="thr">
在线 <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
{{xxobj.onlineStatus == 0 ? '离线' : '在线'}} <image src="https://api.ccttiot.com/smartmeter/img/static/uS5JydUQDmvbMyg4nsdo" mode=""></image>
</view>
</view>
<view class="jieb" @click="btnjiebang">
@ -139,6 +142,22 @@
</view>
</view>
</view>
<view class="mask" v-if="editnameflag"></view>
<view class="editname" v-if="editnameflag">
<view class="top">
修改设备名称
</view>
<input type="text" v-model="name" placeholder="请输入设备名称"/>
<view class="btnanniu">
<view class="quxiao" @click="editnameflag = false">
取消
</view>
<view class="queren" @click="btneditname">
确认
</view>
</view>
</view>
<!-- <view class="mask" v-if="xuanzeflag"></view>
<view class="xuanze" v-if="xuanzeflag">
<view class="top">
@ -171,7 +190,9 @@
deviceId:'',
xxobj:{},
xuanzeflag:false,
xianshiflag:true
editnameflag:false,
name:'',
mdianobj:{}
}
},
onLoad(option) {
@ -179,6 +200,38 @@
this.getxx()
},
methods: {
//
btneditname(){
let data = {
deviceName:this.name
}
this.$u.post(`/app/device/editName/${this.deviceId}?deviceName=${this.name}`,data).then(res =>{
if(res.code == 200){
this.getxx()
this.name = ''
this.editnameflag = false
uni.showToast({
title: '修改成功',
icon: 'success',
duration: 2000
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
},
//
getmendian(){
this.$u.get(`app/store/mch/${this.xxobj.storeId}`).then(res => {
if (res.code == 200) {
this.mdianobj = res.data
}
})
},
//
btnshop(){
uni.navigateTo({
@ -190,11 +243,8 @@
this.$u.get(`/app/device/${this.deviceId}`).then(res => {
if (res.code == 200) {
this.xxobj = res.data
if(res.data.placementStatus == null || res.data.placementStatus == 2){
this.xianshiflag = true
}else{
this.xuanzeflag = false
}
this.getmendian()
this.name = this.xxobj.deviceName
}
})
},
@ -240,6 +290,50 @@
padding-bottom: 20rpx;
box-sizing: border-box;
}
.editname{
width: 580rpx;
max-height: 400rpx;
background-color: #fff;
border-radius: 24rpx;
position: fixed;
top: 414rpx;
left: 50%;
transform: translateX(-50%);
.btnanniu{
display: flex;
margin-top: 60rpx;
border-top: 1px solid #D8D8D8;
.quxiao{
border-right: 1px solid #D8D8D8;
}
view{
width: 50%;
height: 120rpx;
line-height: 120rpx;
text-align: center;
font-size: 32rpx;
font-weight: 600;
}
}
input{
width: 480rpx;
height: 80rpx;
line-height: 80rpx;
margin: auto;
background-color: #D8D8D8;
margin-top: 50rpx;
padding-left: 30rpx;
box-sizing: border-box;
border-radius: 10rpx;
}
.top{
font-size: 32rpx;
font-weight: 600;
text-align: center;
width: 100%;
margin-top: 30rpx;
}
}
.jieb{
width: 750rpx;
height: 152rpx;

View File

@ -142,12 +142,14 @@
kstime:'',
kstj:'',
ksfsid:'',
kstjid:''
kstjid:'',
deviceId:''
}
},
onLoad(option) {
this.storeId = option.storeId
this.sn = option.sn
this.deviceId = option.deviceId
this.getxx()
},
methods: {

View File

@ -6,7 +6,7 @@
<view class="list"
@touchstart="onTouchStart"
@touchend="onTouchEnd">
<view class="list_item" v-for="(item,index) in list" :key="index" @click="btnedit(item.sn)">
<view class="list_item" v-for="(item,index) in list" :key="index" @click="btnedit(item.sn,item.deviceId)">
<view class="top">
<view class="sn">SN:{{item.sn}}</view>
<view class="zt" style="color: #48893B;" v-if="item.onlineStatus == 1">
@ -20,7 +20,7 @@
<image :src="item.picture" mode=""></image>
<view class="sbxx">
<view class="">
门店名称{{item.storeName == null ? '--' : item.storeName}}
设备名称{{item.deviceName == null ? '--' : item.deviceName}}
</view>
<view class="">
投放位置--
@ -31,14 +31,14 @@
</view>
</view>
</view>
<view class="sbm">
<!-- <view class="sbm">
<text></text>
<view class="">
设备码
</view>
</view>
</view> -->
</view>
<view class="" style="width: 100%;text-align: center;margin-top: 100rpx;font-size: 34rpx;color: #ccc;">
<view class="" style="width: 100%;text-align: center;margin-top: 50rpx;font-size: 34rpx;color: #ccc;">
没有更多设备啦...
</view>
</view>
@ -79,9 +79,9 @@
},
methods: {
//
btnedit(sn){
btnedit(sn,deviceId){
uni.navigateTo({
url:'/page_shanghu/toufsb?storeId=' + this.storeId + '&sn=' + sn
url:'/page_shanghu/toufsb?storeId=' + this.storeId + '&sn=' + sn + '&deviceId=' + deviceId
})
},
//
@ -148,7 +148,7 @@
}
.list{
width: 100%;
height: 1230rpx;
height: 1430rpx;
overflow: scroll;
padding-bottom: 50rpx;
box-sizing: border-box;

View File

@ -73,11 +73,11 @@
},
methods: {
//
btnroom(){
uni.navigateTo({
url:'/page_shanghu/shoproom?storeId='+ this.storeId + '&deviceId=' + this.deviceId
})
},
// btnroom(){
// uni.navigateTo({
// url:'/page_shanghu/shoproom?storeId='+ this.storeId + '&deviceId=' + this.deviceId
// })
// },
//
btnadd(){
uni.navigateTo({
@ -89,7 +89,7 @@
// this.activeindex = index
this.storeId = storeId
uni.navigateTo({
url:'/page_shanghu/bangding?storeId=' + storeId
url:'/page_shanghu/bangding?storeId=' + storeId + '&deviceId=' + this.deviceId
})
},
//

View File

@ -321,6 +321,34 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "roomxq",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "roomedit",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "erwm",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "editshop",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
]
}, {
@ -347,6 +375,13 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},{
"path": "toufcesuo",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
]
}, {