@ -607,6 +607,8 @@
// 开启状
// 开启状
these . deviceInfo . voiceStrobeAlarm = 1 ;
these . deviceInfo . voiceStrobeAlarm = 1 ;
these . formData . sta _VoiceType = mode _alarm + ''
these . formData . sta _VoiceType = mode _alarm + ''
} else if ( mode _alarm == 7 ) {
these . formData . sta _VoiceType !== 7
} else {
} else {
// 关闭状态:赋值-1, 表示关闭
// 关闭状态:赋值-1, 表示关闭
these . deviceInfo . voiceStrobeAlarm = - 1 ;
these . deviceInfo . voiceStrobeAlarm = - 1 ;
@ -771,7 +773,9 @@
this . formData . bleStatu = 'connecting' ;
this . formData . bleStatu = 'connecting' ;
bleTool . LinkBlue ( f . deviceId , f . writeServiceId , f . wirteCharactId , f . notifyCharactId ) . then ( ( ) => {
bleTool . LinkBlue ( f . deviceId , f . writeServiceId , f . wirteCharactId , f . notifyCharactId ) . then ( ( ) => {
this . formData . bleStatu = true ;
this . formData . bleStatu = true ;
this . bleStateRecovry ( { deviceId : f . deviceId } ) ;
this . bleStateRecovry ( {
deviceId : f . deviceId
} ) ;
} ) . catch ( ( ) => {
} ) . catch ( ( ) => {
this . formData . bleStatu = 'err' ;
this . formData . bleStatu = 'err' ;
} ) ;
} ) ;
@ -809,7 +813,7 @@
// 关闭状态
// 关闭状态
that . formData . sta _LightType = '-1' ;
that . formData . sta _LightType = '-1' ;
}
}
if ( this . formData . sta _VoiceType === '7' || thi s. formD ata. sta _VoiceTyp e === 7 ) {
if ( this . formData . sta _VoiceType === '7' || re s. d ata. alarmMod e == 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 + ''
@ -1088,10 +1092,16 @@
if ( res . code == 200 ) {
if ( res . code == 200 ) {
uni . showToast ( { title : res . msg || '已切换' , icon : 'none' } ) ;
uni . showToast ( { title : res . msg || '已切换' , icon : 'none' } ) ;
} else {
} else {
uni . showToast ( { title : res . msg || '操作失败' , icon : 'none' } ) ;
uni . showToast ( {
title : res . msg || '操作失败' ,
icon : 'none'
} ) ;
}
}
} ) . catch ( ( ) => {
} ) . catch ( ( ) => {
uni . showToast ( { title : '下发失败,请检查蓝牙或网络' , icon : 'none' } ) ;
uni . showToast ( {
title : '下发失败,请检查蓝牙或网络' ,
icon : 'none'
} ) ;
} ) ;
} ) ;
}
}
// 未开启强制报警时,在 0– 6 内置音色间切换或取消选中:只改按钮选中,不下发
// 未开启强制报警时,在 0– 6 内置音色间切换或取消选中:只改按钮选中,不下发
@ -1281,7 +1291,8 @@
const last6 = target . slice ( - 6 ) ;
const last6 = target . slice ( - 6 ) ;
const item = bleTool . data . LinkedList . find ( ( v ) => {
const item = bleTool . data . LinkedList . find ( ( v ) => {
const m = macNorm ( v . macAddress || '' ) ;
const m = macNorm ( v . macAddress || '' ) ;
return v . deviceId === res . deviceId && ( m === target || ( m . length >= 6 && m . slice ( - 6 ) === last6 ) ) ;
return v . deviceId === res . deviceId && ( m === target || ( m . length >= 6 && m . slice ( - 6 ) ===
last6 ) ) ;
} ) ;
} ) ;
return ! ! item ;
return ! ! item ;
} ,
} ,