6155部分功能提交
This commit is contained in:
@ -24,8 +24,8 @@
|
||||
<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)"
|
||||
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index" >
|
||||
<uni-swipe-action-item :right-options="Options" @click.stop="handleSwipeClick($event, item, index)"
|
||||
class="device-card">
|
||||
<!-- 设备卡片内容保持不变 -->
|
||||
<view @click.stop="handleFile(item)">
|
||||
@ -165,6 +165,7 @@
|
||||
getTab() {
|
||||
deviceTypeList({}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
console.log("deviceTypeList="+JSON.stringify(res.data));
|
||||
this.tabs = [{
|
||||
id: '',
|
||||
name: '全部设备',
|
||||
@ -237,9 +238,18 @@
|
||||
});
|
||||
break;
|
||||
case 'bluetooth':
|
||||
// uni.navigateTo({
|
||||
// url: 'pages/common/addBLE/AddDevice',
|
||||
// success:(res)=>{
|
||||
// res.eventChannel.emit('key', { data: 'data from starter page' })
|
||||
// },fail: (ex) => {
|
||||
// console.log("跳转失败了",JSON.stringify(ex));
|
||||
// }
|
||||
// });
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/6155/bluetooth/bluetooth'
|
||||
});
|
||||
url:"/pages/common/addBLE/addEquip"
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
@ -330,17 +340,29 @@
|
||||
})
|
||||
},
|
||||
handleFile(item) {
|
||||
console.log(item, 'item');
|
||||
console.log('item'+JSON.stringify(item));
|
||||
// communicationMode 0是4G 1是蓝牙
|
||||
if (item.communicationMode == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/6170/deviceControl/index'
|
||||
})
|
||||
} else {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(item.typeName=='6155'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/6155/index'
|
||||
url:"/pages/6155/deviceDetail",
|
||||
events:{
|
||||
ack:function(data){
|
||||
|
||||
}
|
||||
},
|
||||
success: (res) => {
|
||||
res.eventChannel.emit('detailData', { data: item });
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
onIntall() {
|
||||
|
Reference in New Issue
Block a user