From 15d2bbba1f0cecc6b7f827e3f2887d5fdb917532 Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Fri, 27 Feb 2026 11:51:12 +0800 Subject: [PATCH 1/8] =?UTF-8?q?100J=E7=9B=B8=E5=85=B3bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 150 +++++++++++++++++++------- pages/100J/audioManager/AudioList.vue | 3 +- 2 files changed, 113 insertions(+), 40 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 76fef92..30d0073 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -22,7 +22,9 @@ - {{ Math.floor((Number(deviceInfo.batteryRemainingTime)||0)/60) }}小时 {{ (Number(deviceInfo.batteryRemainingTime)||0)%60 }}分钟 + + {{ Math.floor((Number(deviceInfo.batteryRemainingTime) || 0) / 60) }}小时 + {{ (Number(deviceInfo.batteryRemainingTime) || 0) % 60 }}分钟 续航时间 @@ -43,21 +45,21 @@ {{ deviceInfo.onlineStatus === 0 ? '离线' : deviceInfo.onlineStatus === 2 ? '故障' : '在线' }} - - 定位信息 - - - {{ deviceInfo && deviceInfo.longitude ? Number(deviceInfo.longitude).toFixed(4) : '' }} - {{ deviceInfo && deviceInfo.latitude ? Number(deviceInfo.latitude).toFixed(4) : '' }} + + 定位信息 + + + {{ deviceInfo && deviceInfo.longitude ? Number(deviceInfo.longitude).toFixed(4) : '' }} + {{ deviceInfo && deviceInfo.latitude ? Number(deviceInfo.latitude).toFixed(4) : '' }} + + + + {{ deviceInfo.address }} + - - - {{ deviceInfo.address }} - - + - { - // // 订阅来自设备的状态更新 - // const statusTopic = `status/894078/HBY100/${data.data.deviceImei}`; - // this.mqttClient.subscribe(statusTopic, (payload) => { - // try { - // // 解析MQTT返回的payload - // const payloadObj = typeof payload === 'string' ? JSON.parse( - // payload) : payload; - // } catch (e) { - - // } - // }) - // }) + + this.mqttClient.connect(() => { + // 订阅来自设备的状态更新 + const statusTopic = `status/894078/HBY100/${data.data.deviceImei}`; + this.mqttClient.subscribe(statusTopic, (payload) => { + try { + // 解析MQTT返回的payload + const payloadObj = typeof payload === 'string' ? JSON.parse( + payload) : payload; + console.log(payloadObj, '这是我的数据类型么'); + const data = payloadObj.data ?? {}; + const funcType = payloadObj.funcType ?? ''; // 从顶层获取funcType + const { + siren_alarm = { + enable: 0, + mode: 0 + }, + led_strobe = { + enable: 0, + mode: 0, + frequency: 0 + }, + volume = 0, + brightness = { + red: 0, + green: 0, + blue: 0 + }, + + } = data; + // 3. 赋值对应的字段 + + // 续航时间相关 + if (funcType == '4') { + these.deviceInfo.batteryPercentage = data.level //电量 + these.deviceInfo.batteryRemainingTime = data + .battery_remaining_time //续航时间 + } else if (funcType == '14') { + // 调节相关字段 + these.formData.strobeFrequency = led_strobe.frequency || + 0.5; //频率 + these.formData.volume = volume || 10; //音量 + these.formData.lightBrightness = brightness.red || + 10; //亮度值,不管红色,蓝色,黄色 + } + // 报警模式相关字段赋值 + // 是语音根据这个字段做判断 + if (funcType === '6') { + // 语音频闪报警:0=关闭,1=开启 + const voiceStrobeAlarm = data.voice_strobe_alarm ?? 0; + these.formData.sta_VoiceType = voiceStrobeAlarm === 1 ? '1' : + '-1'; + } else if (funcType === '12') { + // 报警模式:直接用alarmMode作为sta_VoiceType + const alarmMode = data.mode ?? 0; + these.formData.sta_VoiceType = alarmMode + ''; // 转字符串匹配key + } + // 警示灯模式选中切换 + if (funcType === '10') { + const enable = data.enable ?? 0; // 开关:1=开,0=关 + const mode = data.mode ?? 0; // 模式:0/1/2/3/4/5/6 + if (enable === 1) { + // 开启状 + these.formData.sta_LightType = mode + ''; + } else { + // 关闭状态:赋值-1,表示关闭 + these.formData.sta_LightType = '-1'; + } + } + // 报警模式相关字段 + console.log('formData赋值完成:', these.formData); + } catch (e) { + // 捕获异常并打印,方便排查问题(不要空catch) + console.log('解析MQTT payload失败:', e); + } + }) + }) console.log(data, 'datatatatat'); these.fetchDeviceDetail(data.data.id) }); @@ -502,6 +568,7 @@ }, // 获取设备详情(普通详情) fetchDeviceDetail(id) { + let that = this deviceDetail(id).then((res) => { if (res.code == 200) { const validData = Object.fromEntries( @@ -511,13 +578,17 @@ }) ); Object.assign(this.formData, validData); - this.deviceInfo = res.data; - // 0 红色爆闪,1 蓝色爆闪,2 黄色爆闪,3,红色顺时针旋转爆闪,4黄色顺时针旋转爆闪,5,红蓝顺时针旋转爆闪,6 红蓝交替爆闪 - this.formData.sta_LightType = (res.data.strobeMode ?? 0) + '' - // 0爆闪关闭, 1爆闪开启 - const strobeEnable = res.data.strobeEnable ?? 0; - this.formData.sta_LightType = strobeEnable === 1 ? 1 : -1; - if (res.data.alarmMode == 7) { + that.deviceInfo = res.data; + const strobeEnable = res.data.strobeEnable ?? 0; // 0=关闭,1=开启 + const strobeMode = res.data.strobeMode ?? 0; // 0=红闪、1=蓝闪、3=红色顺时针... + if (strobeEnable === 1) { + // 开启状态 + that.formData.sta_LightType = strobeMode + ''; + } else { + // 关闭状态 + that.formData.sta_LightType = '-1'; + } + if (this.formData_VoiceType == 7) { this.formData.sta_VoiceType = res.data.voiceStrobeAlarm ?? 0; } else { this.formData.sta_VoiceType = res.data.alarmMode + '' @@ -687,6 +758,8 @@ }, // 警示灯开关闭 lightTypeSet(item, index) { + console.log('走了么'); + let val = item.key; // 切换选中/取消选中逻辑 if (this.formData.sta_LightType === val) { @@ -1749,27 +1822,28 @@ width: 100%; font-size: 32rpx; } + .info-row { display: flex; justify-content: space-between; } - + .info-label { font-size: 28rpx; color: rgba(255, 255, 255, 0.87); white-space: nowrap; } - + .info-value { font-size: 28rpx; color: rgba(255, 255, 255, 0.6); } - + .status-running { /* color: rgba(255, 255, 255, 0.6); */ text-align: end; } - + .locationGPS { width: 88%; text-align: end; diff --git a/pages/100J/audioManager/AudioList.vue b/pages/100J/audioManager/AudioList.vue index 0ddca29..cedf3e5 100644 --- a/pages/100J/audioManager/AudioList.vue +++ b/pages/100J/audioManager/AudioList.vue @@ -469,12 +469,11 @@ }, Apply(item, index) { this.mqttClient = new MqttClient(); - this.updateProgress = 0; - this.isUpdating = true; let data = { id: item.id } deviceUpdateVoice(data).then((RES) => { + console.log(RES,'RES'); if (RES.code == 200) { this.updateProgress = 0; this.isUpdating = true; From 8fab54032b29daa57c5d329e4c486ab4e8c87735 Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Fri, 27 Feb 2026 17:53:13 +0800 Subject: [PATCH 2/8] =?UTF-8?q?100JBUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 81 +++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 20 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 30d0073..c6e121f 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -62,7 +62,7 @@ - {{ deviceInfo.voiceStrobeAlarm === 1 ? '报警中' : '强制报警' }} @@ -314,7 +314,6 @@ lightBrightness: 10, sta_system: '', warnTime: 0, - sta_SOSType: 0 }, dic: { sta_VoiceType: { @@ -497,7 +496,6 @@ } = data; // 3. 赋值对应的字段 - // 续航时间相关 if (funcType == '4') { these.deviceInfo.batteryPercentage = data.level //电量 @@ -506,18 +504,45 @@ } else if (funcType == '14') { // 调节相关字段 these.formData.strobeFrequency = led_strobe.frequency || - 0.5; //频率 + 0.5; //频率 these.formData.volume = volume || 10; //音量 these.formData.lightBrightness = brightness.red || - 10; //亮度值,不管红色,蓝色,黄色 + 10; //亮度值 + // 报警模式,选中,首次上报值,或者切换设备按键上报值 + const enable = siren_alarm.enable ?? 0; // 报警开关:1=开,0=关 + const mode = siren_alarm.mode ?? 0; // 模式:0/1/2/3/4/5/6 + if (these.formData.sta_VoiceType != 7) { + if (enable === 1) { + // 开启状 + these.formData.sta_VoiceType = mode + ''; + } else { + // 关闭状态:赋值-1,表示关闭 + these.formData.sta_VoiceType = mode + ''; + } + } else { + // 播放语音,上报消息 + const voiceStrobeAlarm = data.voice_broadcast ?? 0; + if (voiceStrobeAlarm === 1) { + these.formData.sta_VoiceType = '7' + } else { + these.formData.sta_VoiceType = '-1' + } + } + + } // 报警模式相关字段赋值 - // 是语音根据这个字段做判断 + // 是语音播放根据这个字段 if (funcType === '6') { - // 语音频闪报警:0=关闭,1=开启 - const voiceStrobeAlarm = data.voice_strobe_alarm ?? 0; - these.formData.sta_VoiceType = voiceStrobeAlarm === 1 ? '1' : - '-1'; + console.log('我是谁', data.voice_broadcast); + // 语音频闪报警:0=关闭,1=开启 ui7是播放的状态 + const voiceStrobeAlarm = data.voice_broadcast ?? 0; + if (voiceStrobeAlarm === 1) { + these.formData.sta_VoiceType = '7' + } else { + these.formData.sta_VoiceType = '-1' + } + } else if (funcType === '12') { // 报警模式:直接用alarmMode作为sta_VoiceType const alarmMode = data.mode ?? 0; @@ -804,8 +829,8 @@ val = '-1'; } this.formData.sta_VoiceType = val; - console.log(this.formData.sta_VoiceType, 'this.formData.sta_VoiceType') // 模式类型为7时才去判断 + console.log(val, 'valllll'); if (val === '7' || val === '-1') { let data = { deviceId: this.deviceInfo.deviceId, @@ -824,6 +849,28 @@ }); } }) + } else if (this.deviceInfo.voiceStrobeAlarm == 1) { + console.log('走到这里了没'); + // 如果强制报警已经开启了,那么切换下面的模式需要时,需要触发报警指令 + const data = { + deviceIds: [this.deviceInfo.deviceId], + // 声光报警开关开启传1 + voiceStrobeAlarm: 1, + mode: this.formData.sta_VoiceType + }; + deviceForceAlarmActivation(data).then((res) => { + if (res.code === 200) { + uni.showToast({ + title: '强制报警已开启', + icon: 'none' + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none' + }); + } + }) } }, @@ -848,8 +895,7 @@ showCancel: true, buttonCancelText: '取消', okCallback: () => { - console.log(this.formData.sta_SOSType, 'this.formData.sta_SOSType'); - this.formData.sta_SOSType = isClose ? 0 : 1; + this.deviceInfo.voiceStrobeAlarm = isClose ? 0 : 1; //强制报警,报警中 0是强制报警,1是报警中 const data = { deviceIds: [this.deviceInfo.deviceId], // 声光报警开关:关闭传0,开启传1 @@ -868,12 +914,7 @@ icon: 'none' }); } - }).catch((err) => { - uni.showToast({ - title: '请求失败,请重试', - icon: 'none' - }); - }); + }).catch((err) => {}); } }; }, @@ -887,7 +928,7 @@ if (receive.deviceId !== this.formData.deviceId) { return; } - if (this.formData.sta_battery <= 20) { + if (this.deviceInfo.batteryPercentage <= 20) { this.showMsg("设备电量低"); } }, From e6e8e8379675278e6b8ffe51e80fcb07d2cf104a Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Fri, 27 Feb 2026 18:49:23 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=92=AD=E6=94=BE?= =?UTF-8?q?=EF=BC=8C=E5=BC=BA=E5=88=B6=E6=8A=A5=E8=AD=A6=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 3269 +++++++++++++++++++-------------------- 1 file changed, 1633 insertions(+), 1636 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index c6e121f..56fd3d0 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -212,772 +212,42 @@ \ No newline at end of file From dd2864040176f82b6200ea56104a8608598f680f Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Mon, 2 Mar 2026 11:06:48 +0800 Subject: [PATCH 4/8] =?UTF-8?q?100J4G=E7=9B=B8=E5=85=B3bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 3274 +++++++++++++++++----------------- pages/common/index/index.vue | 11 +- 2 files changed, 1650 insertions(+), 1635 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 56fd3d0..721e2f3 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -212,42 +212,793 @@ \ No newline at end of file diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue index 7c19474..e706aba 100644 --- a/pages/common/index/index.vue +++ b/pages/common/index/index.vue @@ -40,15 +40,15 @@ 设备:{{item.deviceName}} - ID:{{item.deviceImei}} + ID:{{item.deviceImei}} ID:{{item.deviceMac}} 在线 + v-if="item.onlineStatus==1">在线 离线 + v-if="item.onlineStatus==0">离线 电量:{{item.battery || '0'}}% @@ -386,7 +386,7 @@ import BleReceive from '@/utils/BleReceive'; if (res.code == 200) { //console.log("deviceTypeList=" + JSON.stringify(res.data)); this.tabs = [{ - id: '', + id: '', name: '全部设备', typeName: '全部设备' }, @@ -405,9 +405,6 @@ import BleReceive from '@/utils/BleReceive'; this.deviceList = []; this.activeTab = index; this.activeTabInfo = tab - - - this.downCallback(); }, // 获取设备列表 From 253733ad2b9188a54d762461b47e69cdc33fa56f Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Mon, 2 Mar 2026 18:51:38 +0800 Subject: [PATCH 5/8] =?UTF-8?q?100J4Gbug=E5=B7=B2=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/common/shareDevices/index.vue | 4 ++-- pages/common/shareManagement/index.vue | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/common/shareDevices/index.vue b/pages/common/shareDevices/index.vue index 55bbeca..553f302 100644 --- a/pages/common/shareDevices/index.vue +++ b/pages/common/shareDevices/index.vue @@ -216,7 +216,7 @@ const res = await deviceShareAdd({ phonenumber: this.phone, smsCode: this.code, - deviceId: this.itemInfo.id, + deviceId: this.itemInfo.id || this.itemInfo.deviceId, permission: selectedPermissions.join(',') }) @@ -250,8 +250,8 @@ const eventChannel = this.getOpenerEventChannel(); // 监听 'shareDevice' 事件,获取传过来的数据 eventChannel.on('shareDevice', (data) => { - console.log(data, 'data1t111'); this.itemInfo = data.data; + console.log(this.itemInfo,'this.itemInfo'); this.permissions=Common.getPermissions(this.itemInfo.persissonType); console.log(this.itemInfo.persissonType,'this.itemInfo.persissonType'); }) diff --git a/pages/common/shareManagement/index.vue b/pages/common/shareManagement/index.vue index 2bd6487..44485e2 100644 --- a/pages/common/shareManagement/index.vue +++ b/pages/common/shareManagement/index.vue @@ -86,7 +86,9 @@ }, getData(val) { let data = { - deviceId: val + deviceId: val, + pageNum: 1, + pageSize: 500 } deviceShareList(data).then((res) => { if (res.code == 200) { @@ -117,7 +119,7 @@ eventChannel.on('shareManagement', (data) => { console.log(data, 'data1t111'); this.itemInfo = data.data; - this.getData(this.itemInfo.id) + this.getData(this.itemInfo.id ||this.itemInfo.deviceId) }) } } From 569c7cf0b4453a38788f44b76d79760cb0e7307c Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Tue, 3 Mar 2026 17:19:14 +0800 Subject: [PATCH 6/8] =?UTF-8?q?100J=E5=88=86=E4=BA=AB=E6=8E=A5=E5=8F=A3bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 721e2f3..3daa3e8 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -231,6 +231,9 @@ deviceUpdateVolume, deviceVoiceBroadcast } from '@/api/100J/HBY100-J.js' + import { + deviceShareId + } from '@/api/6170/deviceControl.js' var these = null; import Common from '@/utils/Common.js' const pagePath = "/pages/100/HBY100"; @@ -453,17 +456,7 @@ these.Status.navTitle = data.data.deviceName; these.Status.apiType = data.apiType; these.Status.isRightIconVisible = these.Status.apiType === 'listA'; - - if (data.apiType !== 'listA') { - Common.getdeviceShareId(data.data.id).then(res => { - if (res.code == 200) { - if (res.data.permission) { - these.permissions = res.data.permission.split(','); - } - } - }); - - } + this.mqttClient = new MqttClient(); this.mqttClient.connect(() => { @@ -503,7 +496,7 @@ .battery_remaining_time //续航时间 // 设备按键, app同步 } else if (funcType == '14') { - // 调节相关字段 + // 调节亮度,音量,频率相关字段 these.formData.strobeFrequency = led_strobe.frequency || 0.5; //频率 these.formData.volume = volume || 10; //音量 @@ -587,7 +580,13 @@ }) }) console.log(data, 'datatatatat'); - these.fetchDeviceDetail(data.data.id) + if (these.Status.apiType === 'listA') { + these.fetchDeviceDetail(data.data.id) + } else { + console.log('走到这里了没'); + // 分享权限详情 + these.fetchSharedDeviceDetail(data.data.id) + } }); this.createThrottledFunctions(); @@ -639,6 +638,18 @@ } }) }, + // 获取分享设备详情 + async fetchSharedDeviceDetail(id) { + try { + const res = await deviceShareId(id) + if (res.code == 200) { + console.log(this.deviceInfo,'this.deviceInfo'); + this.deviceInfo=res.data + } + } catch (error) { + + } + }, handleRightClick(item, s) { if (item && item.callback) { item.callback(item, s); From 8c6bd7941005c95df815d438a9cd2540fec38a63 Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Wed, 4 Mar 2026 09:58:06 +0800 Subject: [PATCH 7/8] =?UTF-8?q?100Jbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 73 +++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index 3daa3e8..c2afd3b 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -231,9 +231,6 @@ deviceUpdateVolume, deviceVoiceBroadcast } from '@/api/100J/HBY100-J.js' - import { - deviceShareId - } from '@/api/6170/deviceControl.js' var these = null; import Common from '@/utils/Common.js' const pagePath = "/pages/100/HBY100"; @@ -241,6 +238,7 @@ data() { return { mqttClient: null, + activePermissions: [], // 存储当前设备的权限数组 Status: { isRightIconVisible: false, navTitle: '', @@ -249,6 +247,7 @@ curr: 0, total: 0, pageHide: false, + Pop: { showPop: false, //是否显示弹窗 popType: 'custom', @@ -456,7 +455,7 @@ these.Status.navTitle = data.data.deviceName; these.Status.apiType = data.apiType; these.Status.isRightIconVisible = these.Status.apiType === 'listA'; - + this.mqttClient = new MqttClient(); this.mqttClient.connect(() => { @@ -580,13 +579,13 @@ }) }) console.log(data, 'datatatatat'); + // 分享接口 if (these.Status.apiType === 'listA') { these.fetchDeviceDetail(data.data.id) } else { - console.log('走到这里了没'); - // 分享权限详情 - these.fetchSharedDeviceDetail(data.data.id) + these.fetchDeviceDetail(data.data.deviceId) } + }); this.createThrottledFunctions(); @@ -638,17 +637,13 @@ } }) }, - // 获取分享设备详情 - async fetchSharedDeviceDetail(id) { - try { - const res = await deviceShareId(id) - if (res.code == 200) { - console.log(this.deviceInfo,'this.deviceInfo'); - this.deviceInfo=res.data - } - } catch (error) { - - } + // 检查权限的方法 + hasPermission(permissionCode) { + // 如果还在加载中,直接返回false + if (this.pageLoading) return false + // 如果不是分享设备,默认有全部权限 + if (!this.isSharedDevice) return true + return this.activePermissions.includes(permissionCode) }, handleRightClick(item, s) { if (item && item.callback) { @@ -858,28 +853,8 @@ this.formData.sta_VoiceType = val; // 模式类型为7时才去判断 console.log(val, 'valllll'); - const voiceStrobeAlarm = this.deviceInfo?.voiceStrobeAlarm ?? 0; // 兜底0,避免undefined const isVoiceOperate = val === '7' || val === '-1'; // 标记是否是语音开启/关闭操作 - if (voiceStrobeAlarm === 0 && isVoiceOperate) { - let data = { - deviceId: this.deviceInfo.deviceId, - voiceBroadcast: Number(this.formData.sta_VoiceType) === -1 ? 0 : 1 - } - deviceVoiceBroadcast(data).then((res) => { - if (res.code == 200) { - uni.showToast({ - title: res.msg, - icon: 'none' - }); - } else { - uni.showToast({ - title: res.msg, - icon: 'none' - }); - } - }) - } else if (this.deviceInfo.voiceStrobeAlarm == 1) { - console.log('走到这里了没'); + if (this.deviceInfo.voiceStrobeAlarm == 1) { // 如果强制报警已经开启了,那么切换下面的模式需要时,需要触发报警指令 const data = { deviceIds: [this.deviceInfo.deviceId], @@ -900,8 +875,26 @@ }); } }) + } else if (isVoiceOperate) { + console.log('我是谁'); + let data = { + deviceId: this.deviceInfo.deviceId, + voiceBroadcast: Number(this.formData.sta_VoiceType) === -1 ? 0 : 1 + } + deviceVoiceBroadcast(data).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: res.msg, + icon: 'none' + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none' + }); + } + }) } - }, // 报警模式 sosSetting(item) { From 2db6ac47b7d5fcb0cc6505dd3c7a632065aa6242 Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Wed, 4 Mar 2026 14:25:01 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E9=A2=91=E7=8E=87=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/100J/HBY100-J.vue | 4 +++- pages/common/shareManagement/index.vue | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue index c2afd3b..98fe36c 100644 --- a/pages/100J/HBY100-J.vue +++ b/pages/100J/HBY100-J.vue @@ -163,7 +163,7 @@ {{ formData.strobeFrequency }}HZ - @@ -583,6 +583,8 @@ if (these.Status.apiType === 'listA') { these.fetchDeviceDetail(data.data.id) } else { + this.activePermissions = data.data.permission ? data.data.permission.split(',') : []; + console.log(this.activePermissions,'this.activePermissions'); these.fetchDeviceDetail(data.data.deviceId) } diff --git a/pages/common/shareManagement/index.vue b/pages/common/shareManagement/index.vue index 44485e2..b2e7669 100644 --- a/pages/common/shareManagement/index.vue +++ b/pages/common/shareManagement/index.vue @@ -181,12 +181,13 @@ border-radius: 32px; background: rgba(255, 200, 78, 0.06); display: inline-block; - width: 152rpx; - height: 60rpx; + width: 100rpx; + height: 50rpx; text-align: center; - line-height: 60rpx; + line-height: 50rpx; color: rgba(224, 52, 52, 1); cursor: pointer; + margin-top: 30rpx; } .IMG {