上报和设置楼层定位和预案逻辑修正;视频联动代码使用最新方式

main
zhangqun 2 years ago
parent 8ef618dcab
commit 61650db22b
  1. 2
      pages/map/map.vue
  2. 86
      pages/message/detail.vue
  3. 54
      pages/message/list.vue
  4. 21
      pages/patrolRecord/report.vue
  5. 21
      pages/positionRecord/report.vue
  6. 25
      pages/setting/other.vue
  7. 2
      pages/setting/user.vue
  8. 23
      pages/voiceRecord/report.vue
  9. BIN
      unpackage/cache/apk/__UNI__B814B58_cm.apk
  10. 2
      unpackage/cache/apk/apkurl
  11. 2
      unpackage/cache/apk/cmManifestCache.json
  12. 4
      unpackage/cache/wgt/__UNI__B814B58/app-service.js
  13. 2
      unpackage/cache/wgt/__UNI__B814B58/app-view.js
  14. 4
      unpackage/dist/build/app-plus/app-service.js
  15. 2
      unpackage/dist/build/app-plus/app-view.js
  16. 26
      unpackage/dist/dev/app-plus/app-service.js
  17. BIN
      unpackage/release/apk/__UNI__B814B58__20231226153014.apk
  18. BIN
      unpackage/release/apk/__UNI__B814B58__20231226155212.apk
  19. BIN
      unpackage/release/apk/__UNI__B814B58__20231226163018.apk

@ -8,7 +8,7 @@
export default {
data() {
return {
// url: 'http://192.168.3.109:89/map.html'
// url: 'http://192.168.1.36:89/map.html'
// url: 'http://171.16.8.51:8080/map.html'
// url:'http://192.169.9.252:1883/map.html',
url:'http://171.16.8.53:1883/map.html',

@ -66,53 +66,53 @@
// this.videoList = [{name:'1',code:'item1'}]
if(code != ''){
code.split('-').map((item1,index)=>{
this.videoList.push({name:'摄像头' + (index + 1),code:item1})
this.videoList.push({name:'摄像头' + (index + 1),code:item1})
})
}else{
this.videoList = []
}
this.videoList = [{name:'摄像头1'}]
let token = uni.getStorageSync('bizToken');
if(token == undefined || !token) {
uni.request({
url: 'http://171.16.8.58:8080/prod-api/api/Login',
method: 'POST',
data: { appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' },
success: (res) => {
if(res.data.code == 0) {
uni.setStorageSync('bizToken', res.data.data.token);
this.queryVideo(deviceId);
}
}
})
} else {
uni.request({
url: 'http://171.16.8.58:8080/prod-api/api/bizDevice/list?params[pmac]=' + deviceId,
method: 'GET',
header: {
Authorization: token
},
success: (res) => {
console.log('摄像头列表===>',res.data.rows)
uni.showToast({
title:'接口请求成功' + res.data,
icon:'none'
})
if(res.data.code == 401){
uni.removeStorageSync('bizToken');
this.queryVideo(deviceId);
}else{
setTimeout(() =>{
uni.showToast({
title:'获取摄像头列表' + res.data.rows,
icon:'none'
})
},5000)
this.videoList = res.data.rows;
}
}
})
}
// this.videoList = [{name:'1'}]
// let token = uni.getStorageSync('bizToken');
// if(token == undefined || !token) {
// uni.request({
// url: 'http://171.16.8.58:8080/prod-api/api/Login',
// method: 'POST',
// data: { appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' },
// success: (res) => {
// if(res.data.code == 0) {
// uni.setStorageSync('bizToken', res.data.data.token);
// this.queryVideo(deviceId);
// }
// }
// })
// } else {
// uni.request({
// url: 'http://171.16.8.58:8080/prod-api/api/bizDevice/list?params[pmac]=' + deviceId,
// method: 'GET',
// header: {
// Authorization: token
// },
// success: (res) => {
// console.log('===>',res.data.rows)
// uni.showToast({
// title:'' + res.data,
// icon:'none'
// })
// if(res.data.code == 401){
// uni.removeStorageSync('bizToken');
// this.queryVideo(deviceId);
// }else{
// setTimeout(() =>{
// uni.showToast({
// title:'' + res.data.rows,
// icon:'none'
// })
// },5000)
// this.videoList = res.data.rows;
// }
// }
// })
// }
},
goVideo() {
// console.log('item ===>',item)

@ -41,33 +41,33 @@
this.current = this.current + 1;
this.staus = 'loading';
// console.log('url =====>',getApp().globalData.apiUrl)
this.dataList = [
{deviceId:'001',deviceName:'001',productName:'检测器',buildId:'1',floorNo:'-3',longidute:'120.42052988196423',latidute:'36.112521198229985'}
]
this.hasMore = false;
this.status = 'nomore';
// uni.request({
// url: getApp().globalData.apiUrl + '/alarmInformation/list?status=1&current=' + this.current + '&size=' + this.size + '&type=1103&alarmType=1',
// method: 'GET',
// success: (res) => {
// console.log('res ====>',res)
// if(res.data.code == 200){
// this.dataList = this.dataList.concat(res.data.data.records);
// if(res.data.data.records.length == 0 || res.data.data.total < this.size){
// this.hasMore = false;
// this.status = 'nomore';
// }
// else{
// this.status = 'more';
// }
// }else{
// uni.showToast({
// title: res.data.msg,
// icon: 'none'
// })
// }
// }
// })
// this.dataList = [
// {deviceId:'001',deviceName:'001',productName:'',buildId:'1',floorNo:'-3',longidute:'120.42052988196423',latidute:'36.112521198229985'}
// ]
// this.hasMore = false;
// this.status = 'nomore';
uni.request({
url: getApp().globalData.apiUrl + '/alarmInformation/list?status=1&current=' + this.current + '&size=' + this.size + '&type=1103&alarmType=1',
method: 'GET',
success: (res) => {
console.log('res ====>',res)
if(res.data.code == 200){
this.dataList = this.dataList.concat(res.data.data.records);
if(res.data.data.records.length == 0 || res.data.data.total < this.size){
this.hasMore = false;
this.status = 'nomore';
}
else{
this.status = 'more';
}
}else{
uni.showToast({
title: res.data.msg,
icon: 'none'
})
}
}
})
}
},
goDetail(data) {

@ -89,7 +89,7 @@
if (locationInfo && this.positionType == 1) {
console.log('====', this.positionType)
this.locationInfo = JSON.parse(locationInfo);
this.form.planTypeId = this.locationInfo.planId;
this.form.planTypeId = this.locationInfo.planTypeId;
this.form.planTypeName = this.locationInfo.planTypeName;
this.form.buildId = this.locationInfo.buildId;
this.form.floorNo = this.locationInfo.floorNo;
@ -103,9 +103,9 @@
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
this.form.floorNo = obj.floorNo;
this.form.latidute = obj.x;
this.form.longidute = obj.y;
this.form.floorNo = obj.floorNo && obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo && obj.floorNo < 4 ? obj.floorNo - 4 : '';
this.form.latidute = obj.y;
this.form.longidute = obj.x;
});
this.queryPlanTypeList();
// this.getDeviceSn()
@ -246,10 +246,15 @@
this.positionType = this.positionType == 1 ? 0 : 1
this.form.buildId = this.positionType == 1 ? this.locationInfo.buildId : this.position ? this.position.buildId :
'';
this.form.floorNo = this.positionType == 1 ? this.locationInfo.floorNo : this.position ? this.position.floorNo :
'';
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.x : '';
this.form.longidute = this.positionType == 1 ? this.locationInfo.longidute : this.position ? this.position.y :
let floorNo = '';
if(this.positionType == 1) {
floorNo = this.locationInfo.floorNo;
}else{
floorNo = this.position.floorNo && this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo && this.position.floorNo < 4 ? this.position.floorNo - 4 : '';
}
this.form.floorNo = floorNo;
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : '';
this.form.longidute = this.positionType == 1 ? this.locationInfo.longidute : this.position ? this.position.x :
'';
},
submit() {

@ -70,7 +70,7 @@
}
if (locationInfo && this.positionType == 1) {
this.locationInfo = JSON.parse(locationInfo);
this.form.planTypeId = this.locationInfo.planId;
this.form.planTypeId = this.locationInfo.planTypeId;
this.form.planTypeName = this.locationInfo.planTypeName;
this.form.buildId = this.locationInfo.buildId;
this.form.floorNo = this.locationInfo.floorNo;
@ -88,9 +88,9 @@
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
this.form.floorNo = obj.floorNo;
this.form.latidute = obj.x;
this.form.longidute = obj.y;
this.form.floorNo = obj.floorNo && obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo && obj.floorNo < 4 ? obj.floorNo - 4 : '';
this.form.latidute = obj.y;
this.form.longidute = obj.x;
})
this.queryPlanTypeList();
},
@ -112,9 +112,16 @@
switchPositionType() {
this.positionType = this.positionType == 1 ? 0 : 1
this.form.buildId = this.positionType == 1 ? this.locationInfo.buildId : this.position ? this.position.buildId : '';
this.form.floorNo = this.positionType == 1 ? this.locationInfo.floorNo : this.position ? this.position.floorNo : '';
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.x : '';
this.form.longidute = this.positionType == 1 ? this.locationInfo.longidute : this.position ? this.position.y : '';
let floorNo = '';
if(this.positionType == 1) {
floorNo = this.locationInfo.floorNo;
}else{
floorNo = this.position.floorNo && this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo && this.position.floorNo < 4 ? this.position.floorNo - 4 : '';
}
this.form.floorNo = floorNo;
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : '';
this.form.longidute = this.positionType == 1 ? this.locationInfo.longidute : this.position ? this.position.x :
'';
},
//
queryPlanTypeList() {

@ -27,11 +27,11 @@
form: {
employeeId: '',
buildId: '1',
floorNo: '1',
longidute: '120.61988850529002',
latidute: '31.37531834395683',
planTypeId: '1',
planTypeName: '测试预案01',
floorNo: '',
longidute: '',
latidute: '',
planTypeId: '',
planTypeName: '',
xy: ''
},
rules: {
@ -59,12 +59,13 @@
onLoad() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
console.log('监听到事件来自返回的参数:', JSON.stringify(obj));
this.form.xy = obj.x + ',' + obj.y;
this.form.buildId = obj.buildId;
this.form.floorNo = obj.floorNo;
this.form.latidute = obj.x;
this.form.longidute = obj.y;
this.form.floorNo = obj.floorNo && obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo && obj.floorNo < 4 ? obj.floorNo - 4 : '';
this.form.latidute = obj.y;
this.form.longidute = obj.x;
console.log(JSON.stringify(this.form))
})
this.queryPlanTypeList();
let userInfo = uni.getStorageSync('mobileInfo');
@ -74,14 +75,16 @@
this.form.employeeId = this.userInfo.employeeId;
}
if (locationInfo) {
console.log(JSON.stringify(locationInfo))
this.locationInfo = JSON.parse(locationInfo);
this.form.planTypeId = this.locationInfo.planId;
this.form.planTypeId = this.locationInfo.planTypeId;
this.form.planTypeName = this.locationInfo.planTypeName;
this.form.buildId = this.locationInfo.buildId;
this.form.floorNo = this.locationInfo.floorNo;
this.form.latidute = this.locationInfo.latidute;
this.form.longidute = this.locationInfo.longidute;
this.form.xy = this.locationInfo.latidute + ',' + this.locationInfo.longidute;
this.form.xy = this.locationInfo.longidute + ',' + this.locationInfo.latidute;
console.log(JSON.stringify(this.form))
}
},
methods: {

@ -58,8 +58,10 @@
if(userInfo){
this.userInfo = JSON.parse(userInfo);
this.form.employeeId = this.userInfo.employeeId;
this.form.name = this.userInfo.name;
this.form.latidute = this.userInfo.latidute;
this.form.longidute = this.userInfo.longidute;
this.form.xy = this.form.longidute + ',' + this.form.latidute;
}
},
onUnload() {

@ -113,7 +113,7 @@
}
if (locationInfo && this.positionType == 1) {
this.locationInfo = JSON.parse(locationInfo);
this.form.planTypeId = this.locationInfo.planId;
this.form.planTypeId = this.locationInfo.planTypeId;
this.form.planTypeName = this.locationInfo.planTypeName;
this.form.buildId = this.locationInfo.buildId;
this.form.floorNo = this.locationInfo.floorNo;
@ -128,9 +128,9 @@
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
this.form.floorNo = obj.floorNo;
this.form.latidute = obj.x;
this.form.longidute = obj.y;
this.form.floorNo = obj.floorNo && obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo && obj.floorNo < 4 ? obj.floorNo - 4 : '';
this.form.latidute = obj.y;
this.form.longidute = obj.x;
})
this.recorderManager = uni.getRecorderManager();
this.innerAudioContext = uni.createInnerAudioContext();
@ -286,11 +286,16 @@
this.positionType = this.positionType == 1 ? 0 : 1
this.form.buildId = this.positionType == 1 ? this.locationInfo.buildId : this.position ? this.position.buildId :
'';
this.form.floorNo = this.positionType == 1 ? this.locationInfo.floorNo : this.position ? this.position.floorNo :
'';
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.x : '';
this.form.longidute = this.positionType == 1 ? this.locationInfo.longidute : this.position ? this.position.y :
'';
let floorNo = '';
if(this.positionType == 1) {
floorNo = this.locationInfo.floorNo;
}else{
floorNo = this.position.floorNo && this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo && this.position.floorNo < 4 ? this.position.floorNo - 4 : '';
}
this.form.floorNo = floorNo;
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : '';
this.form.longidute = this.positionType == 1 ? this.locationInfo.longidute : this.position ? this.position.x :
'';
},
//
doRecord() {

Binary file not shown.

@ -1 +1 @@
https://ide.dcloud.net.cn/build/download/ef7d38a0-9f20-11ee-b859-553e38acc78a
https://ide.dcloud.net.cn/build/download/0029f9b0-a3c9-11ee-ae3e-27214bbc5732

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save