Merge branch 'liubiao-main'

This commit is contained in:
fengerli
2025-07-14 11:35:47 +08:00
76 changed files with 13725 additions and 1117 deletions

View File

@ -24,8 +24,8 @@
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">
<uni-swipe-action-item :right-options="Options"
@click.stop="handleSwipeClick($event, item, index)" class="device-card">
<!-- 设备卡片内容保持不变 -->
<!-- <view @click.stop="handleFile(item)">
<view class="device-header">
@ -192,6 +192,7 @@
getTab() {
deviceTypeList({}).then((res) => {
if (res.code == 200) {
console.log("deviceTypeList=" + JSON.stringify(res.data));
this.tabs = [{
id: '',
name: '全部设备',
@ -264,9 +265,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;
}
},
@ -363,31 +373,46 @@
})
},
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?id=${item.id}`
})
} else {
uni.navigateTo({
url: '/pages/6155/index'
})
}
url: `/pages/6170/deviceControl/index?id=${item.id}`
});
return;
}
if (item.typeName == '6155') {
uni.navigateTo({
url: "/pages/6155/deviceDetail",
events: {
ack: function(data) {
}
},
success: (res) => {
res.eventChannel.emit('detailData', {
data: item
});
}
})
}
},
onIntall() {
this.page = 1;
this.finished = false;
this.getData(); // 重新加载第一页数据
},
},
onIntall() {
this.page = 1;
this.finished = false;
this.getData(); // 重新加载第一页数据
},
},
onShow() {
this.getTab()
this.onIntall()
onShow() {
this.getTab()
this.onIntall()
}
}
}
</script>
<style>