merge upstream
This commit is contained in:
@ -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',
|
||||
})
|
||||
}
|
||||
// 爆闪模式
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
@ -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',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="maincontent contentBg">
|
||||
<mescroll-uni class="device-list" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption"
|
||||
<mescroll-uni class="device-list" @init=" " @down="downCallback" @up="upCallback" :up="upOption"
|
||||
:down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }">
|
||||
<uni-swipe-action ref="swipeAction">
|
||||
<view v-for="(item, index) in dataListA" class="li" :key="index" :ref="'swipeItem_' + index">
|
||||
@ -27,8 +27,8 @@
|
||||
</view>
|
||||
<view class="itemRight ">
|
||||
<view class="btn" @click.stop="Apply(item,index)"
|
||||
:class="{'active':item.isApply,'btn-default':!item.isApply}">
|
||||
{{item.isApply ?'使用中':'使用'}}
|
||||
:class="{'active':item.useStatus,'btn-default':!item.useStatus}">
|
||||
{{item.useStatus==1 ?'使用中':'使用'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
@ -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;
|
||||
deviceUpdateVoice(data).then((RES) => {
|
||||
if (RES.code == 200) {
|
||||
uni.showToast({
|
||||
title: RES.msg,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
} else {
|
||||
these.$set(these.dataListA[i], "isApply", false);
|
||||
}
|
||||
}
|
||||
console.log("状态修改完成");
|
||||
eventChannel.emit('audioApply', item.Id);
|
||||
// eventChannel.emit('audioApply', item.Id);
|
||||
console.log("返回上一页");
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack();
|
||||
},1000)
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user