From d62d3f734a726bef3573340a2b38f89138d04703 Mon Sep 17 00:00:00 2001
From: fengerli <528575642@qq.com>
Date: Wed, 4 Feb 2026 15:27:43 +0800
Subject: [PATCH] =?UTF-8?q?100J=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/100J/HBY100-J.js | 54 +-
config/index.js | 2 +-
pages/100J/HBY100-J.vue | 2754 +++++++++++++------------
pages/100J/audioManager/AudioList.vue | 98 +-
4 files changed, 1557 insertions(+), 1351 deletions(-)
diff --git a/api/100J/HBY100-J.js b/api/100J/HBY100-J.js
index 7a3ca1d..078b289 100644
--- a/api/100J/HBY100-J.js
+++ b/api/100J/HBY100-J.js
@@ -24,10 +24,60 @@ export function deviceDeleteAudioFile(params) {
})
}
+// 更新语音,使用语音
+export function deviceUpdateVoice(data) {
+ return request({
+ url: `/app/hby100j/device/updateVoice`,
+ method: 'post',
+ data:data
+ })
+}
// 100J信息
export function deviceDetail(id) {
return request({
- url: `/app/hby100/device/${id}`,
+ url: `/app/hby100j/device/${id}`,
method: 'get',
})
-}
\ No newline at end of file
+}
+// 爆闪模式
+export function deviceStrobeMode(data) {
+ return request({
+ url: `/app/hby100j/device/strobeMode`,
+ method: 'post',
+ data:data
+ })
+}
+
+// 强制报警
+export function deviceForceAlarmActivation(data) {
+ return request({
+ url: `/app/hby100j/device/forceAlarmActivation`,
+ method: 'post',
+ data:data
+ })
+}
+// 爆闪频率
+export function deviceStrobeFrequency(data) {
+ return request({
+ url: `/app/hby100j/device/strobeFrequency`,
+ method: 'post',
+ data:data
+ })
+}
+// 灯光调节亮度
+export function deviceLightAdjustment(data) {
+ return request({
+ url: `/app/hby100j/device/lightAdjustment`,
+ method: 'post',
+ data:data
+ })
+}
+
+// 调节音量
+export function deviceUpdateVolume(data) {
+ return request({
+ url: `/app/hby100j/device/updateVolume`,
+ method: 'post',
+ data:data
+ })
+}
diff --git a/config/index.js b/config/index.js
index d239f4a..3776862 100644
--- a/config/index.js
+++ b/config/index.js
@@ -2,7 +2,7 @@
const config = {
// 开发环境
development: {
- BASE_URL: 'http://192.168.110.172:8000',//http://139.224.253.23:8000
+ BASE_URL: 'http://192.168.2.34:8000',//http://139.224.253.23:8000
API_PREFIX: '',
// MQTT 配置
MQTT_HOST: 'www.cnxhyc.com',
diff --git a/pages/100J/HBY100-J.vue b/pages/100J/HBY100-J.vue
index 8731117..af09b27 100644
--- a/pages/100J/HBY100-J.vue
+++ b/pages/100J/HBY100-J.vue
@@ -40,8 +40,8 @@
设备状态
- {{ deviceInfo.onlineStatus === 0 ? '离线' : deviceInfo.onlineStatus === 2 ? '故障' : '在线' }}
+ {{ deviceInfo.onlineStatus === 0 ? '离线' : deviceInfo.onlineStatus
+ === 2 ? '故障' : '在线' }}
定位信息
@@ -51,8 +51,8 @@
{{ deviceInfo && deviceInfo.latitude ? Number(deviceInfo.latitude).toFixed(4) : '' }}
-
+
{{ deviceInfo.address }}
@@ -62,7 +62,7 @@
- {{ formData.sta_SOSType === 1 ? '报警中' : '强制报警' }}
+ {{ deviceInfo.chargeState === 1 ? '报警中' : '强制报警' }}
解除
@@ -97,19 +97,18 @@
-
+
-
-
播放语音
-
@@ -161,27 +160,21 @@
频率
{{ formData.sta_LightFreq }}HZ
-
-
-
-
-
-
产品信息
@@ -202,7 +195,6 @@
-
\ No newline at end of file
diff --git a/pages/100J/audioManager/AudioList.vue b/pages/100J/audioManager/AudioList.vue
index 5ebbf95..1396358 100644
--- a/pages/100J/audioManager/AudioList.vue
+++ b/pages/100J/audioManager/AudioList.vue
@@ -1,6 +1,6 @@
-
@@ -27,8 +27,8 @@
- {{item.isApply ?'使用中':'使用'}}
+ :class="{'active':item.useStatus,'btn-default':!item.useStatus}">
+ {{item.useStatus==1 ?'使用中':'使用'}}
@@ -94,7 +94,8 @@
import {
deviceVoliceList,
videRenameAudioFile,
- deviceDeleteAudioFile
+ deviceDeleteAudioFile,
+ deviceUpdateVoice
} from '@/api/100J/HBY100-J.js'
import {
showLoading,
@@ -185,9 +186,6 @@
createTime: "", //创建时间
fileUrl: "", //本地地址
fileUrl: "", //网络地址
- statu: "", //状态,是否公开
- isApply: "" //是否使用中
-
},
cPlay: {
Id: "", //编号
@@ -195,8 +193,6 @@
createTime: "", //创建时间
fileUrl: "", //本地地址
fileUrl: "", //网络地址
- statu: "", //状态,是否公开
- isApply: "" //是否使用中
}
}
},
@@ -208,7 +204,7 @@
console.log(rec, 'ressss');
this.blue = rec.ble;
this.device = rec.data;
- this.getinitData(rec.data.deviceId,true)
+ this.getinitData(rec.data.deviceId, true)
});
},
@@ -220,7 +216,7 @@
},
methods: {
//语音管理列表
- getinitData(val,isLoadMore = false) {
+ getinitData(val, isLoadMore = false) {
let data = {
deviceId: this.device.deviceId
}
@@ -456,40 +452,56 @@
}
},
Apply(item, index) {
- if (item.isApply) {
- return;
+ console.log(item, 'itemmm');
+ let data = {
+ id: item.id
}
- let task = () => {
- let fileList = uni.getStorageSync(Common.audioStorageKey);
- for (let i = 0; i < these.dataListA.length; i++) {
- let ele = these.dataListA[i];
- if (i === index) {
- these.$set(these.dataListA[index], "isApply", true);
- fileList.find(v => {
- if (!v.devices) {
- v.devices = [];
- }
- if (v.Id == ele.Id) {
- v.devices.push(these.device.id);
- return true;
- } else {
- for (let j = 0; j < v.devices.length; j++) {
- if (v.devices[j] === these.device.id) {
- v.devices.splice(j, 1);
- break
- };
- }
- }
- return false;
- });
- } else {
- these.$set(these.dataListA[i], "isApply", false);
- }
+ deviceUpdateVoice(data).then((RES) => {
+ if (RES.code == 200) {
+ uni.showToast({
+ title: RES.msg,
+ icon: 'none',
+ duration: 1000
+ });
+ console.log("状态修改完成");
+ // eventChannel.emit('audioApply', item.Id);
+ console.log("返回上一页");
+ setTimeout(()=>{
+ uni.navigateBack();
+ },1000)
+
}
- console.log("状态修改完成");
- eventChannel.emit('audioApply', item.Id);
- console.log("返回上一页");
- uni.navigateBack();
+
+ })
+
+ let task = () => {
+ //let fileList = uni.getStorageSync(Common.audioStorageKey);
+ // for (let i = 0; i < these.dataListA.length; i++) {
+ // let ele = these.dataListA[i];
+ // if (i === index) {
+ // these.$set(these.dataListA[index], "isApply", true);
+ // fileList.find(v => {
+ // if (!v.devices) {
+ // v.devices = [];
+ // }
+ // if (v.Id == ele.Id) {
+ // v.devices.push(these.device.id);
+ // return true;
+ // } else {
+ // for (let j = 0; j < v.devices.length; j++) {
+ // if (v.devices[j] === these.device.id) {
+ // v.devices.splice(j, 1);
+ // break
+ // };
+ // }
+ // }
+ // return false;
+ // });
+ // } else {
+ // these.$set(these.dataListA[i], "isApply", false);
+ // }
+ // }
+
}
},
closePop: function() {