1
This commit is contained in:
@ -37,13 +37,25 @@
|
|||||||
<text class="value">{{ deviceInfo.deviceName }}</text>
|
<text class="value">{{ deviceInfo.deviceName }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text class="lbl">IMEI</text>
|
<text class="lbl">设备IMEI</text>
|
||||||
<text class="value">{{ deviceInfo.deviceImei }}</text>
|
<text class="value">{{ deviceInfo.deviceImei }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<text class="lbl">Mac地址</text>
|
||||||
|
<text class="value">{{device.deviceMac}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<text class="lbl">蓝牙名称</text>
|
||||||
|
<text class="value valueFont">{{device.bluetoothName}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item" @click.top="bleStatuToggle">
|
||||||
|
<text class="lbl">蓝牙状态</text>
|
||||||
|
<text class="value" :class="formData.bleStatu?'green':'red'">{{device.getbleStatu}}</text>
|
||||||
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text class="lbl">设备状态</text>
|
<text class="lbl">设备状态</text>
|
||||||
<text class="value">{{ deviceInfo.onlineStatus === 0 ? '离线' : deviceInfo.onlineStatus
|
<text class="value"
|
||||||
=== 2 ? '故障' : '在线' }}</text>
|
:class="deviceInfo.onlineStatus===0?'red':'green'">{{ deviceInfo.onlineStatus === 0 ? '离线': '在线' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-row">
|
<view class="info-row">
|
||||||
<text class="info-label" style="display: flex; align-items: center;">定位信息</text>
|
<text class="info-label" style="display: flex; align-items: center;">定位信息</text>
|
||||||
@ -592,7 +604,18 @@
|
|||||||
console.log(this.activePermissions, 'this.activePermissions');
|
console.log(this.activePermissions, 'this.activePermissions');
|
||||||
these.fetchDeviceDetail(data.data.deviceId)
|
these.fetchDeviceDetail(data.data.deviceId)
|
||||||
}
|
}
|
||||||
|
// 尝试连接蓝牙
|
||||||
|
if (data.data.deviceMac) {
|
||||||
|
// 假设 deviceMac 是蓝牙的 deviceId
|
||||||
|
bleTool.LinkBlue(data.data.deviceMac).then(() => {
|
||||||
|
console.log("100J 蓝牙连接成功");
|
||||||
|
this.bleStateRecovry({
|
||||||
|
deviceId: data.data.deviceMac
|
||||||
|
});
|
||||||
|
}).catch(err => {
|
||||||
|
console.log("100J 蓝牙连接失败,将使用4G", err);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.createThrottledFunctions();
|
this.createThrottledFunctions();
|
||||||
|
|
||||||
@ -603,16 +626,7 @@
|
|||||||
bleTool.addStateBreakCallback(this.bleStateBreak, "HBY100J");
|
bleTool.addStateBreakCallback(this.bleStateBreak, "HBY100J");
|
||||||
bleTool.addStateRecoveryCallback(this.bleStateRecovry, "HBY100J");
|
bleTool.addStateRecoveryCallback(this.bleStateRecovry, "HBY100J");
|
||||||
|
|
||||||
// 尝试连接蓝牙
|
|
||||||
if (data.data.deviceMac) {
|
|
||||||
// 假设 deviceMac 是蓝牙的 deviceId
|
|
||||||
bleTool.LinkBlue(data.data.deviceMac).then(() => {
|
|
||||||
console.log("100J 蓝牙连接成功");
|
|
||||||
this.bleStateRecovry({deviceId: data.data.deviceMac});
|
|
||||||
}).catch(err => {
|
|
||||||
console.log("100J 蓝牙连接失败,将使用4G", err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user