diff --git a/pages/6170/callPolice/index.vue b/pages/6170/callPolice/index.vue index 948c023..d496b60 100644 --- a/pages/6170/callPolice/index.vue +++ b/pages/6170/callPolice/index.vue @@ -66,7 +66,6 @@ data() { return { deviceList: [], - messageToSend: '', //发送信息 showPopupFlag: false, popupTitle: '', popupMessage: '确认要对所选设备开启强制报警?', @@ -88,12 +87,12 @@ * @param {string} batchId - 批次ID * @param {number} [interval=1000] - 轮询间隔(毫秒) */ - async getdeviceSTatus(val, batchId, interval =800) { + async getdeviceSTatus(val, batchId, interval = 800) { let retries = 0; const checkStatus = async () => { try { const data = { - functionMode: val, //批量的传2 + functionMode: val, //批量的传2 batchId: batchId, typeName: this.sendInfo.typeName, deviceImei: this.sendInfo.deviceImei @@ -163,7 +162,6 @@ // 强制报警 forceAlarm() { const selectedDevices = this.deviceList.filter(item => item.checked) - const deviceIds = selectedDevices.map(item => item.id); if (selectedDevices.length === 0) { uni.showToast({ title: '请选择一个设备', @@ -192,25 +190,25 @@ this.showPopupFlag = true; this.pendingAlarmAction = 0 }, - async sendAlarmCommand(type) { + // 确认 + async sendAlarmCommand() { const selectedDevices = this.deviceList.filter(item => item.checked); const deviceIds = selectedDevices.map(item => item.id); const deviceImeiList = selectedDevices.map(item => item.deviceImei); - let loadingShown = false; + const isAlarming = this.pendingAlarmAction == 1; try { uni.showLoading({ - title: '报警中...', + title: isAlarming ? '设备报警中...' : '解除报警中...', mask: true }); - loadingShown = true; // 2. 准备请求数据 const batchId = generateShortId(); const data = { - sendMsg: this.messageToSend, deviceIds: deviceIds, batchId: batchId, typeName: this.sendInfo.typeName, - deviceImeiList: deviceImeiList + deviceImeiList: deviceImeiList, + instructValue: this.pendingAlarmAction == 1 ? '1' : '0' }; // 3.人员信息 const registerRes = await deviceSendAlarmMessage(data); diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 2d01980..fbf3a1f 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -63,11 +63,9 @@ {{ deviceInfo.address }} - - - + 设备强制报警中 灯光亮度 {{ sliderValue }}% - - @@ -164,8 +160,7 @@ - + @@ -274,1402 +269,1415 @@ \ No newline at end of file diff --git a/pages/common/index/index.vue b/pages/common/index/index.vue index 99a5e48..e64d4a2 100644 --- a/pages/common/index/index.vue +++ b/pages/common/index/index.vue @@ -31,7 +31,7 @@ + :style="{ border: item.communicationMode==0 && item.onlineStatus==1 && item.alarmStatus==1 ? '1px solid rgba(224, 52, 52, 1)' : 'none' }"> @@ -54,7 +54,7 @@ + v-if="item.communicationMode==0 && item.onlineStatus==1 && item.alarmStatus==1"> 报警中 已连接