1
0
forked from dyf/APP

018A添加报警日志

This commit is contained in:
liub
2026-04-24 08:51:26 +08:00
parent 1f88de4710
commit 5128c29d86
10 changed files with 1260 additions and 54 deletions

View File

@ -1,5 +1,20 @@
<template>
<view class="content contentBg">
<uni-nav-bar :border="false" @clickLeft="prevPage" fixed="true" statusBar="true" background-color="#121212"
color="#FFFFFF" :title="Status.navbar.title">
<template v-slot:left>
<view>
<uni-icons type="left" size="24" color="#FFFFFF"></uni-icons>
</view>
</template>
<block slot="right">
<view class="navbarRight center">
<image @click.stop="handleRightClick(index,item)" v-for="item,index in Status.navbar.icons"
class="img" :src="item.src" mode="aspectFit"></image>
</view>
</block>
</uni-nav-bar>
<view class="eq">
<view class="leftImg" @click.stop="previewImg(device.devicePic?device.devicePic:formData.img)">
<image class="img" :src="device.devicePic?device.devicePic:formData.img" mode="aspectFit"></image>
@ -189,9 +204,19 @@
curr: 0,
total: 0,
pageHide: false,
usrToggle: false
usrToggle: false,
navbar: {
icons: [{
src: '/static/images/common/msg.png'
},
{
src: '/static/images/common/shape.png'
}
],
title: 'HBY018A',
showBack: true,
height: 90
},
},
formData: {
img: '/static/images/common/HBY018A.png',
@ -264,7 +289,8 @@
contact1Phone: "",
contact2Phone: "",
sosSmsMsg: ""
}
},
permissions: []
}
},
@ -296,7 +322,15 @@
// console.log("收到父页面的参数:" + JSON.stringify(data));
var device = data.data;
these.device = device;
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.getDeviceDetail();
let f = these.getDevice();
if (!f) {
@ -389,6 +423,41 @@
},
methods: {
prevPage() {
uni.navigateBack({
});
},
handleRightClick(s, e) {
if (s === 0) {
uni.navigateTo({
url: '/pages/018A/018AMsg',
success(res) {
res.eventChannel.emit('detailData', these.device);
}
});
return;
} else if (s === 1) {
console.log("分享");
uni.navigateTo({
url: '/pages/common/share/index',
events: {
ack: function(data) {}
},
success: (res) => {
let json = {
persissonType: '018A'
};
Object.assign(json, these.device);
res.eventChannel.emit('share', {
data: json
});
}
})
}
},
closeAction() {
for (let index = 0; index < this.dic.actionSheets.length; index++) {
let menu = this.dic.actionSheets[index];
@ -610,11 +679,13 @@
this.device.longitude = lnglat[0];
this.device.latitude = lnglat[1];
this.formData.sta_longitude = lnglat[0];
this.formData.sta_latitude = lnglat[1];
Common.regeo(lnglat[0], lnglat[1]).then(res => {
this.formData.address = res.regeocode.formatted_address
this.formData.address = res.regeocode.formatted_address;
this.setBleFormData();
}).catch(ex => {
console.error("逆地理失败了")
}).finally(this.routePlan);
@ -631,6 +702,12 @@
reGeoTime = setTimeout(task, 500);
},
gotoPage(page) {
if (!this.permissions.includes('57') && this.Status.apiType !== 'listA') {
MsgError('无操作权限', '确定', these);
return;
}
uni.navigateTo({
url: '/pages/common/sosSet/' + page,
success(res) {
@ -771,7 +848,7 @@
this.device.longitude = this.formData.sta_longitude;
this.device.latitude = this.formData.sta_latitude;
console.log("device=",this.device);
console.log("device=", this.device);
uni.navigateTo({
url: '/pages/common/map/index',
events: {
@ -790,6 +867,11 @@
},
LighSetting(item, index) {
if (!this.permissions.includes('51') && this.Status.apiType !== 'listA') {
MsgError('无操作权限', '确定', these);
return;
}
let val = item.key;
if (item.key === this.formData.sta_Side_Light) {
val = 0;
@ -818,7 +900,11 @@
sosToggle(type) {
if (!this.permissions.includes('46') && this.Status.apiType !== 'listA') {
MsgError('无操作权限', '确定', these);
return;
}
if (this.formData.sta_ShakeBit != 1 && this.formData.sta_ShakeBit != 0) {
MsgError("设备正在报警中", '', these);
return;