018A初步完成
This commit is contained in:
@ -29,10 +29,10 @@
|
||||
<view v-if="deviceList.length>0">
|
||||
<uni-swipe-action ref="swipeAction" >
|
||||
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
|
||||
<uni-swipe-action-item :right-options="Options"
|
||||
<uni-swipe-action-item :right-options="Options" :show="item.showOption"
|
||||
@click="handleSwipeClick($event, item, index)" class="device-card"
|
||||
:style="{ border: item.communicationMode==0 && item.onlineStatus==1 && item.alarmStatus==1 ? '1px solid rgba(224, 52, 52, 1)' : 'none' }">
|
||||
<view @click.stop="handleFile(item)">
|
||||
<view @click.stop="handleFile(item,index)">
|
||||
<view class="device-header">
|
||||
<view class="deviceIMG">
|
||||
<image :src="item.devicePic" class="IMG" mode="aspectFit"></image>
|
||||
@ -62,7 +62,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/common/cires.png" class="circle" mode="aspectFit"></image>
|
||||
<image @click.stop="swipeToggle(item,index)" src="/static/images/common/cires.png" class="circle" mode="aspectFit"></image>
|
||||
</uni-swipe-action-item>
|
||||
</block>
|
||||
</uni-swipe-action>
|
||||
@ -242,7 +242,8 @@
|
||||
isLock: false,
|
||||
empty: {
|
||||
tip: '暂无数据',
|
||||
hideScroll: false
|
||||
hideScroll: false,
|
||||
icon: '/static/images/common/empty.png'
|
||||
},
|
||||
textNoMore: '没有更多数据了'
|
||||
},
|
||||
@ -697,13 +698,20 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
swipeToggle(item,index){
|
||||
if(!item.showOption || item.showOption=='none'){
|
||||
this.$set(this.deviceList[index],'showOption','right');
|
||||
return;
|
||||
}
|
||||
this.$set(this.deviceList[index],'showOption','none');
|
||||
},
|
||||
// 列表跳转
|
||||
handleFile(item) {
|
||||
let url = item.detailPageUrl;
|
||||
// url="/pages/6075/BJQ6075L";
|
||||
// if(!url){
|
||||
// url="/pages/6075/BJQ6075"
|
||||
// }
|
||||
handleFile(item,index) {
|
||||
if(item.showOption=='right'){
|
||||
this.$set(this.deviceList[index],'showOption','none');
|
||||
return;
|
||||
}
|
||||
let url = item.detailPageUrl;
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
events: {
|
||||
@ -773,7 +781,7 @@
|
||||
});
|
||||
// 监听设备状态更新事件
|
||||
uni.$on('deviceStatusUpdate', (data) => {
|
||||
console.log('列表收到消息了么');
|
||||
// console.log('列表收到消息了么');
|
||||
this.downCallback();
|
||||
});
|
||||
ble = bleTool.getBleTool();
|
||||
@ -805,9 +813,9 @@
|
||||
|
||||
//接收到消息的回调
|
||||
ble.addReceiveCallback((receive, device, path, recArr) => {
|
||||
console.error("首页收到消息了");
|
||||
// console.error("首页收到消息了");
|
||||
let json=recei.ReceiveData(receive, device, path, recArr);
|
||||
console.error("消息内容",json);
|
||||
// console.error("消息内容",json);
|
||||
this.updateBleStatu();
|
||||
}, pagePath);
|
||||
|
||||
@ -1148,7 +1156,7 @@
|
||||
border-radius: 40rpx;
|
||||
padding: 30rpx;
|
||||
text-align: center;
|
||||
border: 1px solid #E034344d;
|
||||
border: 1px solid #E0343480;
|
||||
}
|
||||
|
||||
|
||||
@ -1161,7 +1169,7 @@
|
||||
}
|
||||
|
||||
.agreement-popupC .cancelBtn{
|
||||
border:1rpx solid #E034344d;
|
||||
border:1rpx solid #E03434;
|
||||
color:#E03434;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user