1
0
forked from dyf/APP

Compare commits

..

2 Commits

Author SHA1 Message Date
c3f33758eb merge upstream 2026-02-05 10:28:08 +08:00
274c037eea 修复6155串数据的问题 2026-02-04 09:08:59 +08:00
12 changed files with 1592 additions and 1803 deletions

View File

@ -81,11 +81,3 @@ export function deviceUpdateVolume(data) {
data:data data:data
}) })
} }
// 语音播放
export function deviceVoiceBroadcast(data) {
return request({
url: `/app/hby100j/device/voiceBroadcast`,
method: 'post',
data:data
})
}

View File

@ -5,10 +5,10 @@ const config = {
BASE_URL: 'http://192.168.2.34:8000',//http://139.224.253.23:8000 BASE_URL: 'http://192.168.2.34:8000',//http://139.224.253.23:8000
API_PREFIX: '', API_PREFIX: '',
// MQTT 配置 // MQTT 配置
MQTT_HOST: '47.120.79.150', MQTT_HOST: 'www.cnxhyc.com',
MQTT_PORT: 9083, MQTT_PORT: 8083,
MQTT_USERNAME: 'admin', MQTT_USERNAME: 'admin',
MQTT_PASSWORD: '#YtvpSfCNG' MQTT_PASSWORD: '#YtvpSfCNG'
}, },
// 生产环境 // 生产环境
production: { production: {

View File

@ -2,7 +2,7 @@
"name" : "星汉物联", "name" : "星汉物联",
"appid" : "__UNI__A21EF43", "appid" : "__UNI__A21EF43",
"description" : "设备管控", "description" : "设备管控",
"versionName" : "1.0.15", "versionName" : "1.0.16",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +1,34 @@
<template> <template>
<view class="maincontent contentBg"> <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' }"> :down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataListA" class="li" :key="index" :ref="'swipeItem_' + index"> <view v-for="(item, index) in dataListA" class="li" :key="index" :ref="'swipeItem_' + index">
<view class="itemIcon center" <view class="itemIcon center" :class="{'displayNone':!Status.isEdit,'check':isCheck(item,index)}"
:class="{ 'displayNone': !Status.isEdit, 'check': isCheck(item, index) }" v-on:click.stop="checkToggle(item,index)">
v-on:click.stop="checkToggle(item, index)"> <image class="img" :class="{'displayNone':!isCheck(item,index)}"
<image class="img" :class="{ 'displayNone': !isCheck(item, index) }"
src="/static/images/common/gou.png" mode="aspectFit"></image> src="/static/images/common/gou.png" mode="aspectFit"></image>
</view> </view>
<view class="itemMain " :class="{ 'Edit': Status.isEdit }"> <view class="itemMain " :class="{'Edit':Status.isEdit}">
<uni-swipe-action-item :right-options="Options" @click="handleSwipeClick($event, item, index)" <uni-swipe-action-item :right-options="Options" @click="handleSwipeClick($event, item, index)"
class="device-card "> class="device-card ">
<view @click.stop="handleFile(item, index)"> <view @click.stop="handleFile(item,index)">
<view class="item"> <view class="item">
<view class="itemLeft "> <view class="itemLeft ">
<view class="title">{{ item.fileNameExt }}</view> <view class="title">{{ item.fileNameExt }}</view>
<view class="smallTitle"> <view class="smallTitle">
<!-- 展示前端生成的时间 --> <!-- 展示前端生成的时间 -->
<text>{{ item.createTime || Common.DateFormat(new Date(), <text>{{item.createTime || Common.DateFormat(new Date(), "yyyy年MM月dd日")}}</text>
"yyyy年MM月dd日") }}</text> <text v-show="item.duration">{{item.duration}}</text>
<text v-show="item.duration">{{ item.duration }}</text> <image :class="{'displayNone':!item.fileUrl}" class="img"
<image :class="{ 'displayNone': !item.fileUrl }" class="img"
src="/static/images/100/volume.png" mode="aspectFit" src="/static/images/100/volume.png" mode="aspectFit"
@click.stop="play(item, index)"></image> @click.stop="play(item,index)"></image>
</view> </view>
</view> </view>
<view class="itemRight "> <view class="itemRight ">
<view class="btn" @click.stop="Apply(item, index)" <view class="btn" @click.stop="Apply(item,index)"
:class="{ 'active': item.useStatus, 'btn-default': !item.useStatus }"> :class="{'active':item.useStatus,'btn-default':!item.useStatus}">
{{ item.useStatus == 1 ? '使用中' : '使用' }} {{item.useStatus==1 ?'使用中':'使用'}}
</view> </view>
</view> </view>
<view class="clear"></view> <view class="clear"></view>
@ -42,7 +40,7 @@
</uni-swipe-action> </uni-swipe-action>
</mescroll-uni> </mescroll-uni>
<view class="footer"> <view class="footer">
<view class="addContent" :class="{ 'displayNone': Status.isEdit }"> <view class="addContent" :class="{'displayNone':Status.isEdit}">
<view class="addItem" @click="gotoRecord('Record')"> <view class="addItem" @click="gotoRecord('Record')">
<view class="imgContent center"> <view class="imgContent center">
<image class="img" src="/static/images/100/record.png" mode="aspectFit"></image> <image class="img" src="/static/images/100/record.png" mode="aspectFit"></image>
@ -62,7 +60,7 @@
<view class="txt">文字转语音</view> <view class="txt">文字转语音</view>
</view> </view>
</view> </view>
<view class="editContent" :class="{ 'displayNone': !Status.isEdit }"> <view class="editContent" :class="{'displayNone':!Status.isEdit}">
<view class="btn-del" @click.stop="delCheckList()">删除</view> <view class="btn-del" @click.stop="delCheckList()">删除</view>
</view> </view>
</view> </view>
@ -82,12 +80,6 @@
<audio :src="cPlay.src" :id="cPlay.Id" :name="cPlay.name" author=""> <audio :src="cPlay.src" :id="cPlay.Id" :name="cPlay.name" author="">
</view> --> </view> -->
<global-loading ref="loading"></global-loading> <global-loading ref="loading"></global-loading>
<!-- 圆形进度条 + 全屏遮罩层升级中显示 -->
<view v-if="isUpdating" class="mask-layer">
<view class="circle-progress-box">
<progress :percent="updateProgress" activeColor="#bbe600" backgroundColor="#686767" :border-radius='22' show-info stroke-width="15" class="custom-progress" />
</view>
</view>
</view> </view>
</template> </template>
@ -99,7 +91,6 @@
var timeout = null; var timeout = null;
import MescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue' import MescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue'
import BleTool from '@/utils/BleHelper.js' import BleTool from '@/utils/BleHelper.js'
import MqttClient from '@/utils/mqtt.js';
import { import {
deviceVoliceList, deviceVoliceList,
videRenameAudioFile, videRenameAudioFile,
@ -123,7 +114,6 @@
isEdit: false, isEdit: false,
playState: '', playState: '',
playPath: '', playPath: '',
mqttClient: null,
Pop: { Pop: {
showPop: false, //是否显示弹窗 showPop: false, //是否显示弹窗
popType: 'custom', popType: 'custom',
@ -203,10 +193,7 @@
createTime: "", //创建时间 createTime: "", //创建时间
fileUrl: "", //本地地址 fileUrl: "", //本地地址
fileUrl: "", //网络地址 fileUrl: "", //网络地址
}, }
updateProgress: 0, // 升级进度0-100
isUpdating: false, // 是否正在升级(控制进度条显示/隐藏)
mqttSubscribeSuccess: false // MQTT订阅是否成功
} }
}, },
onLoad() { onLoad() {
@ -225,10 +212,7 @@
console.log("页面返回") console.log("页面返回")
}, },
onUnload() { onUnload() {
// 页面卸载时断开MQTT连接 console.log("页面卸载了");
if (this.mqttClient) {
this.mqttClient.disconnect();
}
}, },
methods: { methods: {
//语音管理列表 //语音管理列表
@ -468,72 +452,57 @@
} }
}, },
Apply(item, index) { Apply(item, index) {
this.mqttClient = new MqttClient(); console.log(item, 'itemmm');
this.updateProgress = 0;
this.isUpdating = true;
let data = { let data = {
id: item.id id: item.id
} }
deviceUpdateVoice(data).then((RES) => { deviceUpdateVoice(data).then((RES) => {
if (RES.code == 200) { if (RES.code == 200) {
this.updateProgress = 0;
this.isUpdating = true;
this.mqttClient.connect(() => {
// 订阅来自设备的状态更新
const statusTopic = `status/894078/HBY100/${this.device.deviceImei}`;
this.mqttClient.subscribe(statusTopic, (payload) => {
console.log(payload, 'payloadpayloadpayload');
try {
// 解析MQTT返回的payload
const payloadObj = typeof payload === 'string' ? JSON.parse(
payload) : payload;
// 取出进度值(用可选链避免字段不存在报错)
const progress = payloadObj.data?.progress;
if (progress !== undefined && !isNaN(progress) && progress >=
0 && progress <= 100) {
this.updateProgress = progress;
console.log('当前升级进度:', progress + '%');
// 进度到100%时,触发升级完成逻辑
if (progress === 100) {
clearTimeout(this.upgradeTimer);
uni.showToast({
title: '升级完成!',
icon: 'success',
duration: 2000
});
this.isUpdating = false;
setTimeout(() => {
uni.navigateBack();
}, 1500);
}
}
} catch (e) {
clearTimeout(this.upgradeTimer);
console.error('解析MQTT payload失败', e);
}
})
})
} else {
uni.showToast({ uni.showToast({
title: RES.msg, title: RES.msg,
icon: 'none', icon: 'none',
duration: 1000 duration: 1000
}); });
console.log("状态修改完成");
// eventChannel.emit('audioApply', item.Id);
console.log("返回上一页");
setTimeout(()=>{
uni.navigateBack();
},1000)
} }
}) })
this.upgradeTimer = setTimeout(() => {
// 超时后执行:隐藏进度条+提示超时+重置进度 let task = () => {
uni.showToast({ //let fileList = uni.getStorageSync(Common.audioStorageKey);
title: '升级进度同步超时', // for (let i = 0; i < these.dataListA.length; i++) {
icon: 'none', // let ele = these.dataListA[i];
duration: 2000 // if (i === index) {
}); // these.$set(these.dataListA[index], "isApply", true);
this.isUpdating = false; // 关闭进度条 // fileList.find(v => {
this.updateProgress = 0; // 重置进度值 // if (!v.devices) {
// 可选如果需要取消MQTT订阅加这行根据需求选择 // v.devices = [];
// this.mqttClient.unsubscribe(statusTopic); // }
}, 6000); // 6000ms = 6秒时间可直接修改 // 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() { closePop: function() {
this.Status.Pop.showPop = false; this.Status.Pop.showPop = false;
@ -639,18 +608,7 @@
} }
</script> </script>
<style lang="less"> <style>
.custom-progress{
border-radius: 10rpx;
}
.custom-progress .uni-progress-bar{
border-radius: 10rpx !important;
}
.custom-progress .uni-progress-info{
color: #BBE600;
font-size: 40rpx;
font-weight: 600;
}
.popup-prompt { .popup-prompt {
width: 100%; width: 100%;
margin-top: 40rpx; margin-top: 40rpx;
@ -687,6 +645,8 @@
} }
.li .itemMain {}
.li .item { .li .item {
width: 100%; width: 100%;
height: 200rpx; height: 200rpx;
@ -889,28 +849,4 @@
height: 100%; height: 100%;
justify-content: flex-end; justify-content: flex-end;
} }
/* 全屏遮罩层:半透明黑色,覆盖整个页面,禁止底层滚动/点击 */
.mask-layer {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.7);
/* 半透明黑,可调整透明度 */
z-index: 9999;
/* 遮罩层层级拉满,确保在最上层 */
display: flex;
justify-content: center;
align-items: center;
/* 让内部圆形进度条垂直+水平居中 */
}
/* 圆形进度条容器 */
.circle-progress-box {
position: relative;
width: 70%;
height: 100rpx;
}
</style> </style>

View File

@ -656,7 +656,7 @@
proParam: function() { proParam: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/productDes/index?id=' + this.formData.id, url: '/pages/common/productDes/index?id=' + this.device.id,
success(ev) { success(ev) {
} }
@ -664,7 +664,7 @@
}, },
handRemark: function() { handRemark: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/operatingInstruct/index?id=' + this.formData.id, url: '/pages/common/operatingInstruct/index?id=' + this.device.id,
success(ev) { success(ev) {
} }
@ -672,7 +672,7 @@
}, },
handVideo: function() { handVideo: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/operationVideo/index?id=' + this.formData.id, url: '/pages/common/operationVideo/index?id=' + this.device.id,
success(ev) { success(ev) {
} }

View File

@ -649,7 +649,7 @@
proParam: function() { proParam: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/productDes/index?id=' + this.formData.id, url: '/pages/common/productDes/index?id=' + this.device.id,
success(ev) { success(ev) {
} }
@ -657,7 +657,7 @@
}, },
handRemark: function() { handRemark: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/operatingInstruct/index?id=' + this.formData.id, url: '/pages/common/operatingInstruct/index?id=' + this.device.id,
success(ev) { success(ev) {
} }
@ -665,7 +665,7 @@
}, },
handVideo: function() { handVideo: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/operationVideo/index?id=' + this.formData.id, url: '/pages/common/operationVideo/index?id=' + this.device.id,
success(ev) { success(ev) {
} }

View File

@ -55,19 +55,12 @@
import { import {
deviceInfo, deviceInfo,
} from '@/api/common/index.js' } from '@/api/common/index.js'
// 1. 导入所有需要的报警接口
import { import {
deviceSendAlarmMessage, //6170对应类型接口 deviceSendAlarmMessage
deviceDefaultAlarm
} from '@/api/6170/callPolice.js' } from '@/api/6170/callPolice.js'
import {
deviceForceAlarmActivation
} from '@/api/100J/HBY100-J.js'
// BJQ100J 对应的接口
import { import {
deviceRealTimeStatus //设备状态 deviceRealTimeStatus //设备状态
} from '@/api/6170/deviceControl.js' } from '@/api/6170/deviceControl.js'
export default { export default {
components: { components: {
CustomPopup CustomPopup
@ -81,34 +74,12 @@
popupConfirmText: '确认', popupConfirmText: '确认',
popupType: 'force', // 'force' or 'cancel' popupType: 'force', // 'force' or 'cancel'
pendingAlarmAction: '', pendingAlarmAction: '',
sendInfo: '', sendInfo: ''
// 2. 核心typeName 与接口的映射表
alarmApiMapping: {
'HBY100-J': { //100J类型
sendApi: deviceForceAlarmActivation,
statusTypeName: 'FunctionAccessBatchStatusRule_BJQ100J'
},
'BJQ6170': { //6170类型
sendApi: deviceSendAlarmMessage,
statusTypeName: 'FunctionAccessBatchStatusRule_BJQ200J'
}
},
loading: false,
total: 0
} }
}, },
computed: { computed: {
selectedDeviceIds() { selectedDeviceIds() {
return this.deviceList.filter(item => item.checked).map(item => item.id); return this.deviceList.filter(item => item.checked).map(item => item.id);
},
// 自动匹配当前typeName对应的接口配置
currentApiConfig() {
const currentTypeName = this.sendInfo.typeName || '';
// 匹配到则用对应配置,匹配不到用默认配置
return this.alarmApiMapping[currentTypeName] || {
sendApi: deviceDefaultAlarm,
statusTypeName: 'FunctionAccessBatchStatusRule_Default'
};
} }
}, },
methods: { methods: {
@ -122,19 +93,15 @@
// 全选/取消全选 // 全选/取消全选
selectAll() { selectAll() {
console.log('123'); console.log('123');
// 仅对在线设备进行全选/取消 const allSelected = this.deviceList.every(item => item.checked);
const allSelected = this.deviceList.every(item => item.onlineStatus === 1 && item.checked);
this.deviceList.forEach(item => { this.deviceList.forEach(item => {
// 离线设备不修改checked状态 item.checked = !allSelected;
if (item.onlineStatus === 1) {
item.checked = !allSelected;
}
}); });
this.$forceUpdate(); this.$forceUpdate();
}, },
// 获取设备列表 // 获取设备列表
getData(deviceType) { getData(deviceType) {
console.log(deviceType, 'deviceTypedeviceType');
this.loading = true; this.loading = true;
let data = { let data = {
pageNum: 1, pageNum: 1,
@ -160,7 +127,7 @@
const selectedDevices = this.deviceList.filter(item => item.checked) const selectedDevices = this.deviceList.filter(item => item.checked)
if (selectedDevices.length === 0) { if (selectedDevices.length === 0) {
uni.showToast({ uni.showToast({
title: '请选择一个在线设备', title: '请选择一个设备',
icon: 'none' icon: 'none'
}); });
return; return;
@ -169,13 +136,14 @@
this.popupMessage = '确认要对所选设备开启强制报警?'; this.popupMessage = '确认要对所选设备开启强制报警?';
this.showPopupFlag = true; this.showPopupFlag = true;
this.pendingAlarmAction = 1 this.pendingAlarmAction = 1
}, },
// 解除报警 // 解除报警
cancelAlarm() { cancelAlarm() {
const selectedDevices = this.deviceList.filter(item => item.checked); const selectedDevices = this.deviceList.filter(item => item.checked);
if (selectedDevices.length === 0) { if (selectedDevices.length === 0) {
uni.showToast({ uni.showToast({
title: '请选择一个在线设备', title: '请选择一个设备',
icon: 'none' icon: 'none'
}); });
return; return;
@ -185,61 +153,61 @@
this.showPopupFlag = true; this.showPopupFlag = true;
this.pendingAlarmAction = 0 this.pendingAlarmAction = 0
}, },
//动态调用对应接口 // 确认
async sendAlarmCommand() { async sendAlarmCommand() {
const selectedDevices = this.deviceList.filter(item => item.checked); const selectedDevices = this.deviceList.filter(item => item.checked);
const deviceIds = selectedDevices.map(item => item.id); const deviceIds = selectedDevices.map(item => item.id);
const deviceImeiList = selectedDevices.map(item => item.deviceImei); const deviceImeiList = selectedDevices.map(item => item.deviceImei);
const isAlarming = this.pendingAlarmAction == 1; const isAlarming = this.pendingAlarmAction == 1;
if (selectedDevices.length === 0) {
uni.showToast({
title: '请选择在线设备',
icon: 'none'
});
return;
}
try { try {
uni.showLoading({ uni.showLoading({
title: isAlarming ? '设备报警中...' : '解除报警中...', title: isAlarming ? '设备报警中...' : '解除报警中...',
mask: true mask: true
}); });
// 获取当前typeName对应的接口和参数配置 // 2. 准备请求数据
const { const batchId = generateShortId();
sendApi, const data = {
statusTypeName deviceIds: deviceIds,
} = this.currentApiConfig;
// 准备请求数据
// const batchId = generateShortId();
const requestData = {
deviceIds: deviceIds,
typeName: this.sendInfo.typeName, typeName: this.sendInfo.typeName,
deviceImeiList: deviceImeiList, deviceImeiList: deviceImeiList,
// batchId: batchId, batchId: batchId,
voiceStrobeAlarm: this.pendingAlarmAction == 1 ? '1' : '0' instructValue: this.pendingAlarmAction == 1 ? '1' : '0'
}; };
// 动态调用匹配的接口 const registerRes = await deviceSendAlarmMessage(data);
const registerRes = await sendApi(requestData); if (registerRes.code !== 200) {
if (registerRes.code == 200) {
uni.showToast({ uni.showToast({
title: isAlarming ? '强制报警开启成功' : '报警已解除', title: registerRes.msg,
icon: 'success' icon: 'none'
})
return
}
// 4. 获取设备状态
let deviceImei = this.sendInfo.deviceImei
let typeName = this.sendInfo.typeName
const statusRes = await getdeviceSTatus({
functionMode: 2,
batchId,
typeName:'FunctionAccessBatchStatusRule',
deviceImei,
interval: 500
},
deviceRealTimeStatus
);
if (statusRes.data.functionAccess === 'OK') {
uni.showToast({
title: statusRes.msg,
icon: 'none'
}); });
this.showPopupFlag = false this.showPopupFlag = false
uni.$emit('deviceStatusUpdate', {}); uni.$emit('deviceStatusUpdate', {});
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 500) }, 500)
} else {
uni.showToast({
title: registerRes.msg || '状态查询失败',
icon: 'none'
});
} }
} catch (error) { } catch (error) {
console.error('报警操作异常:', error);
uni.showToast({ uni.showToast({
title: '网络异常,请重试', title: error.message,
icon: 'none' icon: 'none'
}); });
} finally { } finally {
@ -249,6 +217,7 @@
// 点击确认状态 // 点击确认状态
onPopupConfirm() { onPopupConfirm() {
this.sendAlarmCommand(this.popupType); this.sendAlarmCommand(this.popupType);
// 处理确认逻辑
}, },
}, },
onLoad(options) { onLoad(options) {
@ -258,6 +227,7 @@
this.getData(data.data.id) this.getData(data.data.id)
this.sendInfo = data.data this.sendInfo = data.data
}); });
// 如果需要向调用页面返回数据,可以触发 'ack' 事件
eventChannel.emit('ack', {}) eventChannel.emit('ack', {})
}, },
} }
@ -266,7 +236,7 @@
<style scoped> <style scoped>
.container { .container {
min-height: 100vh; min-height: 100vh;
background-color: rgb(18, 18, 18); background-color:rgb(18, 18, 18);
box-sizing: border-box; box-sizing: border-box;
overflow-x: hidden; overflow-x: hidden;

View File

@ -590,7 +590,7 @@ these.Status.apiType = data.apiType;
proParam: function() { proParam: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/productDes/index?id=' + this.formData.id, url: '/pages/common/productDes/index?id=' + this.device.id,
success(ev) { success(ev) {
} }
@ -598,7 +598,7 @@ these.Status.apiType = data.apiType;
}, },
handRemark: function() { handRemark: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/operatingInstruct/index?id=' + this.formData.id, url: '/pages/common/operatingInstruct/index?id=' + this.device.id,
success(ev) { success(ev) {
} }
@ -606,7 +606,7 @@ these.Status.apiType = data.apiType;
}, },
handVideo: function() { handVideo: function() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/operationVideo/index?id=' + this.formData.id, url: '/pages/common/operationVideo/index?id=' + this.device.id,
success(ev) { success(ev) {
} }

View File

@ -18,11 +18,11 @@
<image src="/static/images/common/more.png" mode="aspectFit" class="more"></image> <image src="/static/images/common/more.png" mode="aspectFit" class="more"></image>
</view> </view>
</view> </view>
<!-- <view class="sendFlex" v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0 || activeTabInfo.communicationMode==2"> <view class="sendFlex" v-if="activeTab && activeTab.id !== ''&& activeTabInfo.communicationMode==0 || activeTabInfo.communicationMode==2">
<view class="callpolice" @click="callpolice">报警</view> <view class="callpolice" @click="callpolice">报警</view>
<view class="Sendmessage" @click="location">位置</view> <view class="Sendmessage" @click="location">位置</view>
<view class="Sendmessage" @click="handleSend" v-if="activeTabInfo.typeName!=='HBY100-J'">发送信息</view> <view class="Sendmessage" @click="handleSend">发送信息</view>
</view> --> </view>
<!-- <scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100" style="height:80vh;"> --> <!-- <scroll-view class="device-list" scroll-y @scrolltolower="onScrollToLower" :lower-threshold="100" style="height:80vh;"> -->
<mescroll-uni class="device-list" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption" <mescroll-uni class="device-list" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption"
:down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }"> :down="downOption" :fixed="false" :style="{ height: mescrollHeight + 'px' }">

View File

@ -307,21 +307,21 @@ export default {
value: "50", value: "50",
label: "报警模式", label: "报警模式",
checked: false, checked: false,
type: ['100','100J'] type: ['100']
}, },
{ {
value: "51", value: "51",
label: "警示灯", label: "警示灯",
checked: false, checked: false,
type: ['100','100J'] type: ['100']
}, },
{ {
value: "52", value: "52",
label: "语音管理", label: "语音管理",
checked: false, checked: false,
type: ['100','100J'] type: ['100']
}, },
{ {
@ -342,12 +342,6 @@ export default {
checked: false, checked: false,
type: ['4877'] type: ['4877']
}, },
{
value: "56",
label: "灯光类型设置",
checked: false,
type: ['100J']
},
] ]
let arr = []; let arr = [];

View File

@ -1,5 +1,5 @@
import config from '../config/index.js'; import config from '../config/index.js';
export const env = 'production'; //production development //开发of线上 改这里就行 export const env = 'development'; //production development //开发of线上 改这里就行
const BASE = config[env]; const BASE = config[env];
const request = (options) => { const request = (options) => {
console.log("options" + JSON.stringify(options), BASE.BASE_URL) console.log("options" + JSON.stringify(options), BASE.BASE_URL)
@ -22,7 +22,7 @@ const request = (options) => {
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(options.data[key])}`) .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(options.data[key])}`)
.join('&'); .join('&');
url += `?${params}`; url += `?${params}`;
} }
const config = { const config = {
url: url, url: url,