100J4G相关bug修复

This commit is contained in:
fengerli
2026-03-02 11:06:48 +08:00
parent e6e8e83796
commit dd28640401
2 changed files with 1650 additions and 1635 deletions

View File

@ -501,6 +501,7 @@ export default {
these.deviceInfo.batteryPercentage = data.level //电量 these.deviceInfo.batteryPercentage = data.level //电量
these.deviceInfo.batteryRemainingTime = data these.deviceInfo.batteryRemainingTime = data
.battery_remaining_time //续航时间 .battery_remaining_time //续航时间
// 设备按键, app同步
} else if (funcType == '14') { } else if (funcType == '14') {
// 调节相关字段 // 调节相关字段
these.formData.strobeFrequency = led_strobe.frequency || these.formData.strobeFrequency = led_strobe.frequency ||
@ -508,12 +509,22 @@ export default {
these.formData.volume = volume || 10; //音量 these.formData.volume = volume || 10; //音量
these.formData.lightBrightness = brightness.red || these.formData.lightBrightness = brightness.red ||
10; //亮度值 10; //亮度值
// 警示灯
const enable1 = led_strobe.enable ?? 0; // 开关1=开0=关
const mode1 = led_strobe.mode ?? 0; // 模式0/1/2/3/4/5/6
if (enable1 === 1) {
// 开启状
these.formData.sta_LightType = mode1 + '';
} else {
// 关闭状态:赋值-1表示关闭
these.formData.sta_LightType = '-1';
}
// 报警模式,选中,首次上报值,或者切换设备按键上报值 // 报警模式,选中,首次上报值,或者切换设备按键上报值
const enable = siren_alarm.enable ?? 0; // 报警开关1=开0=关 const enable = siren_alarm.enable ?? 0; // 报警开关1=开0=关
const mode = siren_alarm.mode ?? 0; // 模式0/1/2/3/4/5/6 const mode = siren_alarm.mode ?? 0; // 模式0/1/2/3/4/5/6
if (these.formData.sta_VoiceType != 7) { if (these.formData.sta_VoiceType != 7) {
if (enable === 1) { if (enable === 1) {
// 开启状 // 开启状
these.formData.sta_VoiceType = mode + ''; these.formData.sta_VoiceType = mode + '';
} else { } else {
// 关闭状态:赋值-1表示关闭 // 关闭状态:赋值-1表示关闭
@ -528,11 +539,8 @@ export default {
these.formData.sta_VoiceType = '-1' these.formData.sta_VoiceType = '-1'
} }
} }
} }
// 报警模式相关字段赋值 // 报警模式相关字段赋值,是语音播放根据这个字段
// 是语音播放根据这个字段
if (funcType === '6') { if (funcType === '6') {
console.log('我是谁', data.voice_broadcast); console.log('我是谁', data.voice_broadcast);
// 语音频闪报警0=关闭1=开启 ui7是播放的状态 // 语音频闪报警0=关闭1=开启 ui7是播放的状态
@ -542,11 +550,21 @@ export default {
} else { } else {
these.formData.sta_VoiceType = '-1' these.formData.sta_VoiceType = '-1'
} }
// 强制报警按键解除报警状态,app同步
} else if (funcType === '12') { } else if (funcType === '12') {
// 报警模式直接用alarmMode作为sta_VoiceType const enable_alarm = data.voice_strobe_alarm ??
const alarmMode = data.mode ?? 0; 0; // 报警开关1=开0=关
these.formData.sta_VoiceType = alarmMode + ''; // 转字符串匹配key const mode_alarm = data.mode ?? 0; // 模式0/1/2/3/4/5/6
if (enable_alarm === 1) {
// 开启状
these.deviceInfo.voiceStrobeAlarm = 1;
these.formData.sta_VoiceType = mode_alarm + ''
} else {
// 关闭状态:赋值-1表示关闭
these.deviceInfo.voiceStrobeAlarm = -1;
// 模式还是选中的,模式,解除也是
these.formData.sta_VoiceType = mode_alarm + ''
}
} }
// 警示灯模式选中切换 // 警示灯模式选中切换
if (funcType === '10') { if (funcType === '10') {

View File

@ -40,15 +40,15 @@
<view class="device-name"> <view class="device-name">
<view>设备:{{item.deviceName}}</view> <view>设备:{{item.deviceName}}</view>
<view class="ID"> <view class="ID">
<view class="ID" v-if="item.communicationMode==0">ID:{{item.deviceImei}} <view class="ID" v-if="item.communicationMode==0 || item.communicationMode==2">ID:{{item.deviceImei}}
</view> </view>
<view class="ID" v-else>ID:{{item.deviceMac}}</view> <view class="ID" v-else>ID:{{item.deviceMac}}</view>
<!-- 在线状态 --> <!-- 在线状态 -->
<view class="onlines" <view class="onlines"
v-if="item.communicationMode==0 && item.onlineStatus==1">在线</view> v-if="item.onlineStatus==1">在线</view>
<!-- 离线状态 --> <!-- 离线状态 -->
<view class="offlines" <view class="offlines"
v-if="item.communicationMode==0 && item.onlineStatus==0">离线</view> v-if="item.onlineStatus==0">离线</view>
<view>电量{{item.battery || '0'}}%</view> <view>电量{{item.battery || '0'}}%</view>
</view> </view>
</view> </view>
@ -405,9 +405,6 @@ import BleReceive from '@/utils/BleReceive';
this.deviceList = []; this.deviceList = [];
this.activeTab = index; this.activeTab = index;
this.activeTabInfo = tab this.activeTabInfo = tab
this.downCallback(); this.downCallback();
}, },
// 获取设备列表 // 获取设备列表