merge upstream
This commit is contained in:
@ -700,12 +700,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
bleStatuToggle() {
|
bleStatuToggle() {
|
||||||
|
const mac = (this.device && this.device.deviceMac) || (this.deviceInfo && this.deviceInfo.deviceMac);
|
||||||
|
if (!mac) return;
|
||||||
|
const macNorm = (m) => (m || '').replace(/:/g, '').toUpperCase();
|
||||||
|
const targetMacNorm = macNorm(mac);
|
||||||
|
const last6 = targetMacNorm.slice(-6);
|
||||||
let f = bleTool.data.LinkedList.find((v) => {
|
let f = bleTool.data.LinkedList.find((v) => {
|
||||||
return v.macAddress == this.device.deviceMac;
|
const m = macNorm(v.macAddress || '');
|
||||||
|
return m === targetMacNorm || (m.length >= 6 && m.slice(-6) === last6);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!f) {
|
if (!f) {
|
||||||
this.tryConnect100JBle(this.device.deviceMac);
|
this.tryConnect100JBle(mac);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.formData.bleStatu === true) {
|
if (this.formData.bleStatu === true) {
|
||||||
@ -757,8 +763,8 @@
|
|||||||
// 关闭状态
|
// 关闭状态
|
||||||
that.formData.sta_LightType = '-1';
|
that.formData.sta_LightType = '-1';
|
||||||
}
|
}
|
||||||
if (this.formData_VoiceType == 7) {
|
if (this.formData.sta_VoiceType === '7' || this.formData.sta_VoiceType === 7) {
|
||||||
this.formData.sta_VoiceType = res.data.voiceStrobeAlarm ?? 0;
|
this.formData.sta_VoiceType = (res.data.voiceStrobeAlarm ?? 0) + '';
|
||||||
} else {
|
} else {
|
||||||
this.formData.sta_VoiceType = res.data.alarmMode + ''
|
this.formData.sta_VoiceType = res.data.alarmMode + ''
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user