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

main
zhangqun 2 years ago
parent 8ef618dcab
commit 61650db22b
  1. 2
      pages/map/map.vue
  2. 84
      pages/message/detail.vue
  3. 50
      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. 21
      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 { export default {
data() { data() {
return { 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://171.16.8.51:8080/map.html'
// url:'http://192.169.9.252:1883/map.html', // url:'http://192.169.9.252:1883/map.html',
url:'http://171.16.8.53:1883/map.html', url:'http://171.16.8.53:1883/map.html',

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

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

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

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

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

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

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

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