11
This commit is contained in:
parent
c397c56f68
commit
6110c37621
1439
common/uqrcode.js
Normal file
1439
common/uqrcode.js
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -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
387
page_moban/toufcesuo.vue
Normal 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>
|
||||
|
|
@ -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">
|
||||
SN:12154522544
|
||||
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">
|
||||
SN:22451254
|
||||
<!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 --><!-- 房间 -->
|
||||
<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">
|
||||
SN:2234681537
|
||||
<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;
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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
519
page_shanghu/editshop.vue
Normal 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
153
page_shanghu/erwm.vue
Normal 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>
|
||||
|
|
@ -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
435
page_shanghu/roomedit.vue
Normal 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
556
page_shanghu/roomxq.vue
Normal 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">
|
||||
SN:2234681537
|
||||
</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>
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
SN:32562365B
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
})
|
||||
},
|
||||
// 请求本人所有门店
|
||||
|
|
|
|||
35
pages.json
35
pages.json
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user