6170分享设备页面功能开发
This commit is contained in:
@ -21,39 +21,46 @@
|
||||
|
||||
<scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100"
|
||||
style="height:80vh;">
|
||||
<uni-swipe-action ref="swipeAction">
|
||||
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
|
||||
<uni-swipe-action-item :right-options="Options" @click="handleSwipeClick($event, item, index)"
|
||||
class="device-card">
|
||||
<view @click.stop="handleFile(item)">
|
||||
<view class="device-header">
|
||||
<view class="deviceIMG">
|
||||
<image :src="item.devicePic" class="IMG"></image>
|
||||
</view>
|
||||
<view class="device-name">
|
||||
<view>设备:{{item.deviceName}}</view>
|
||||
<view class="ID">
|
||||
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
|
||||
<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"
|
||||
@click="handleSwipeClick($event, item, index)" class="device-card">
|
||||
<view @click.stop="handleFile(item)">
|
||||
<view class="device-header">
|
||||
<view class="deviceIMG">
|
||||
<image :src="item.devicePic" class="IMG"></image>
|
||||
</view>
|
||||
<view class="device-name">
|
||||
<view>设备:{{item.deviceName}}</view>
|
||||
<view class="ID">
|
||||
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}}
|
||||
</view>
|
||||
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
||||
<view class="onlines" v-if="item.communicationMode==0">在线</view>
|
||||
<view>电量:90%</view>
|
||||
</view>
|
||||
<view class="ID" v-else>ID:{{item.deviceMac}}</view>
|
||||
<view class="onlines" v-if="item.communicationMode==0">在线</view>
|
||||
<view>电量:90%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="item.communicationMode==1">
|
||||
<view class="device-status online">已连接</view>
|
||||
<view class="device-status unline">未连接</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="item.communicationMode==1">
|
||||
<view class="device-status online">已连接</view>
|
||||
<view class="device-status unline">未连接</view>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/cires.png" class="circle"></image>
|
||||
</uni-swipe-action-item>
|
||||
</block>
|
||||
</uni-swipe-action>
|
||||
<!-- 加载状态提示 -->
|
||||
<view class="loading-status">
|
||||
<text v-if="loading">加载中...</text>
|
||||
<text v-if="finished">没有更多数据了</text>
|
||||
<image src="/static/images/cires.png" class="circle"></image>
|
||||
</uni-swipe-action-item>
|
||||
</block>
|
||||
</uni-swipe-action>
|
||||
<!-- 加载状态提示 -->
|
||||
<view class="loading-status">
|
||||
<text v-if="loading">加载中...</text>
|
||||
<text v-if="finished">没有更多数据了</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="noDATA">
|
||||
<view> <uni-icons type="image-filled" size="120" color="rgba(255, 255, 255, 0.9)"></uni-icons>
|
||||
</view>
|
||||
暂无数据
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@ -420,6 +427,7 @@
|
||||
// 绑定页面做了监听,新增成功,刷新页面
|
||||
uni.$on('refreshDeviceList', () => {
|
||||
this.getTab() // 刷新数据
|
||||
this.onIntall()
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -592,6 +600,7 @@
|
||||
width: 68rpx;
|
||||
height: 50rpx;
|
||||
margin-left: 17%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.onlines {
|
||||
@ -625,6 +634,11 @@
|
||||
padding: 20rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.noDATA{
|
||||
text-align: center;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
transform: translate(-0%,100%);
|
||||
}
|
||||
|
||||
/* 遮罩层 */
|
||||
.agreement-mask {
|
||||
|
Reference in New Issue
Block a user