开关
This commit is contained in:
parent
e5a84d1abf
commit
7f65dc2afe
|
@ -38,17 +38,62 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="cenc">
|
<view class="cenc">
|
||||||
共享时间:{{listobj.businessTimeStart == undefined ? '--' : listobj.businessTimeStart}}-{{listobj.businessTimeEnd == undefined ? '--' : listobj.businessTimeEnd}} <text
|
共享时间:{{listobj.businessTimeStart == undefined ? '--' : listobj.businessTimeStart}}-{{listobj.businessTimeEnd == undefined ? '--' : listobj.businessTimeEnd}} <text
|
||||||
class="bu">{{listobj.availableDeviceCount}}台可共享</text>
|
class="bu">{{listobj.availableDeviceCount == undefined ? '--' : listobj.availableDeviceCount}}台可共享</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="chakan" @click="btnchak(listobj.storeId)">
|
<!-- <view class="chakan" @click="btnchak(listobj.storeId)">
|
||||||
<view class="">
|
<view class="">
|
||||||
本店共有{{listobj.deviceCount == undefined ? '--' : listobj.deviceCount}}台共享设备
|
本店共有{{listobj.deviceCount == undefined ? '--' : listobj.deviceCount}}台共享设备
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
查看 <u-icon name="arrow-right" color="#6863D9" size="24" style="margin-left: 10rpx;"></u-icon>
|
查看 <u-icon name="arrow-right" color="#6863D9" size="24" style="margin-left: 10rpx;"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="warp_box" style="width: 100%;height: 1040rpx;overflow: scroll;">
|
||||||
|
<view class="swiper" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
|
||||||
|
<view>
|
||||||
|
<view class="swiper-item ">
|
||||||
|
<view class="card_box" v-for="(item,index) in wateringList" :key="index">
|
||||||
|
<view class="card" @click="btnxq(item.deviceNo)">
|
||||||
|
<view class="card_left">
|
||||||
|
<view class="card_left_tit">
|
||||||
|
{{item.deviceName}}
|
||||||
|
</view>
|
||||||
|
<view class="card_left_sta">
|
||||||
|
<image
|
||||||
|
src="https://api.ccttiot.com/smartmeter/img/static/uZSiz7XWpxcXEkl6sTwj"
|
||||||
|
mode="aspectFit"></image>
|
||||||
|
<view class="sta_txt" v-if="item.status==3">
|
||||||
|
维修中
|
||||||
|
</view>
|
||||||
|
<view class="sta_txt" v-if="item.status==2" style="color:greenyellow;">
|
||||||
|
使用中
|
||||||
|
</view>
|
||||||
|
<view class="sta_txt" v-if="item.status==1" style="color:seagreen;">
|
||||||
|
空闲
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card_left_no">
|
||||||
|
S/N码:{{item.deviceNo}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card_right">
|
||||||
|
<image v-if="item.customPicture" :src="item.customPicture" mode="aspectFit"></image>
|
||||||
|
<image v-else :src="item.picture" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
|
||||||
|
<image style="width: 200rpx;height: 200rpx;"
|
||||||
|
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit"></image>
|
||||||
|
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">暂无更多设备...</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="anniu">
|
<view class="anniu">
|
||||||
<view class="" @click="mapFun">
|
<view class="" @click="mapFun">
|
||||||
|
@ -88,6 +133,13 @@
|
||||||
mapScaleInterval: null,
|
mapScaleInterval: null,
|
||||||
listmap: [],
|
listmap: [],
|
||||||
iconflag: false,
|
iconflag: false,
|
||||||
|
pagenum: 1,
|
||||||
|
wateringList: [],
|
||||||
|
pagesize: 10,
|
||||||
|
isLoading: false,
|
||||||
|
noMoreData: false,
|
||||||
|
total: 0,
|
||||||
|
showflag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
@ -97,6 +149,7 @@
|
||||||
this.falgb = true
|
this.falgb = true
|
||||||
}
|
}
|
||||||
this.getxq()
|
this.getxq()
|
||||||
|
this.getlist()
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.mapContext = uni.createMapContext('map', this);
|
this.mapContext = uni.createMapContext('map', this);
|
||||||
|
@ -126,6 +179,40 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getlist() {
|
||||||
|
this.$u.get(`/app/device/listByStore/${this.storeId}?pageNum=${this.pagenum}&pageSize=${this.pagesize}`)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.total = res.total
|
||||||
|
if (this.total > 0) {
|
||||||
|
this.showflag = false
|
||||||
|
} else {
|
||||||
|
this.showflag = true
|
||||||
|
}
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
// 有数据,追加到列表
|
||||||
|
this.wateringList = this.wateringList.concat(res.rows)
|
||||||
|
this.pagenum++
|
||||||
|
} else {
|
||||||
|
// 没有更多数据
|
||||||
|
this.noMoreData = true;
|
||||||
|
}
|
||||||
|
this.isLoading = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
let sum = this.total / this.pagesize
|
||||||
|
if (this.pagenum - 1 < sum) {
|
||||||
|
this.getlist(); // 上拉加载更多
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '没有更多设备了',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
// 查询拖动到指定为止的店铺
|
// 查询拖动到指定为止的店铺
|
||||||
regionchange(e) {
|
regionchange(e) {
|
||||||
this.iconflag = true
|
this.iconflag = true
|
||||||
|
@ -326,7 +413,11 @@
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
btnxq(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/page_components/fuwu/index?id=' + id
|
||||||
|
})
|
||||||
|
},
|
||||||
getMyLocation() {
|
getMyLocation() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
|
@ -442,7 +533,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
page {
|
page {
|
||||||
background: linear-gradient(180deg, #D9D8FF 0%, rgba(255, 255, 255, 0) 100%);
|
background:#D9D8FF;
|
||||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,20 +542,96 @@
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
.swiper {
|
||||||
|
.swiper-item {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.card_box {
|
||||||
|
margin-top: 34rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.card {
|
||||||
|
display: flex;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 672rpx;
|
||||||
|
height: 250rpx;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(255, 255, 255, 0);
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
|
||||||
|
.card_left {
|
||||||
|
width: 310rpx;
|
||||||
|
margin-top: 46rpx;
|
||||||
|
margin-left: 50rpx;
|
||||||
|
|
||||||
|
.card_left_tit {
|
||||||
|
font-size: 44rpx;
|
||||||
|
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #8883F0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_left_sta {
|
||||||
|
|
||||||
|
margin-top: 15rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 23.32rpx;
|
||||||
|
height: 36.47rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.sta_txt {
|
||||||
|
margin-left: 15rpx;
|
||||||
|
color: #262B37;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_left_no {
|
||||||
|
margin-top: 15rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #95989D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_right {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 40rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.list_item {
|
.list_item {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 84rpx;
|
top: 160rpx;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
-webkit-transform: translateX(-50%);
|
||||||
width: 706rpx;
|
transform: translateX(-50%);
|
||||||
height: 420rpx;
|
width: 100%;
|
||||||
background: #FFFFFF;
|
height: 91vh;
|
||||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
background: #f8f8f8;
|
||||||
border-radius: 20rpx;
|
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
||||||
margin: auto;
|
border-radius: 20rpx;
|
||||||
padding: 46rpx 40rpx;
|
margin: auto;
|
||||||
box-sizing: border-box;
|
padding: 46rpx 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
.chakan {
|
.chakan {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -486,8 +653,14 @@
|
||||||
|
|
||||||
.anniu {
|
.anniu {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
position: fixed;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 100%;
|
||||||
|
padding: 60rpx;
|
||||||
|
bottom: 20rpx;
|
||||||
|
|
||||||
view {
|
view {
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
|
@ -506,7 +679,8 @@
|
||||||
.list {
|
.list {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 16rpx;
|
padding-bottom: 16rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
.pic {
|
.pic {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
|
@ -523,7 +697,7 @@
|
||||||
|
|
||||||
.cen {
|
.cen {
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
.cena {
|
.cena {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user