定位逻辑修正,上报增加防抖

main
zhangqun 2 years ago
parent 61650db22b
commit d0c53d533d
  1. 2
      pages/index/index.vue
  2. 2
      pages/map/map.vue
  3. 2
      pages/message/detail.vue
  4. 42
      pages/patrolRecord/report.vue
  5. 33
      pages/positionRecord/report.vue
  6. 24
      pages/setting/other.vue
  7. 16
      pages/setting/user.vue
  8. 37
      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. 28
      unpackage/dist/dev/app-plus/app-service.js
  17. BIN
      unpackage/release/apk/__UNI__B814B58__20231227134320.apk
  18. BIN
      unpackage/release/apk/__UNI__B814B58__20231227153540.apk

@ -83,7 +83,7 @@
// this.url = 'http://192.168.3.109:89#lat=' + _data[0].latitude + '&lng=' + _data[0].longitude; // this.url = 'http://192.168.3.109:89#lat=' + _data[0].latitude + '&lng=' + _data[0].longitude;
// this.url = 'http://171.16.8.51:8080#lat=' + _data[0].latitude + '&lng=' + _data[0].longitude; // this.url = 'http://171.16.8.51:8080#lat=' + _data[0].latitude + '&lng=' + _data[0].longitude;
// this.url = 'http://192.169.9.252:1883/#lat=' + _data[0].latitude + '&lng=' + _data[0].longitude; // this.url = 'http://192.169.9.252:1883/#lat=' + _data[0].latitude + '&lng=' + _data[0].longitude;
this.url = 'http://171.16.8.53:1883/#lat=' + _data[0].latitude + '&lng=' + _data[0].longitude; this.url = 'http://171.16.8.53:1883/#lat=' + _data[0].longitude + '&lng=' + _data[0].latitude;
console.log('url=====>',this.url) console.log('url=====>',this.url)
} }
this.lat = _data[0].latitude; this.lat = _data[0].latitude;

@ -21,7 +21,7 @@
// this.url = 'http://192.168.3.109:89/map.html?floorNo=' + options.floorNo + '&lat=' + options.lat + '&lng=' + options.lng // this.url = 'http://192.168.3.109:89/map.html?floorNo=' + options.floorNo + '&lat=' + options.lat + '&lng=' + options.lng
// this.url = 'http://171.16.8.51:8080/map.html?floorNo=' + options.floorNo + '&lat=' + options.lat + '&lng=' + options.lng // this.url = 'http://171.16.8.51:8080/map.html?floorNo=' + options.floorNo + '&lat=' + options.lat + '&lng=' + options.lng
// this.url = 'http://192.169.9.252:1883/map.html?floorNo=' + options.floorNo + '&lat=' + options.lat + '&lng=' + options.lng // this.url = 'http://192.169.9.252:1883/map.html?floorNo=' + options.floorNo + '&lat=' + options.lat + '&lng=' + options.lng
this.url = 'http://171.16.8.53:1883/map.html?floorNo=' + options.floorNo + '&lat=' + options.lat + '&lng=' + options.lng this.url = 'http://171.16.8.53:1883/map.html?floorNo=' + options.floorNo + '&lng=' + options.lng + '&lat=' + options.lat
} }
}, },
onUnload() { onUnload() {

@ -55,7 +55,7 @@
// //
mapView() { mapView() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/map/map?floorNo=' + this.detailInfo.floorNo + '&lat=' + this.detailInfo.longidute + '&lng=' + this.detailInfo.latidute url: '/pages/map/map?floorNo=' + this.detailInfo.floorNo + '&lng=' + this.detailInfo.longidute + '&lat=' + this.detailInfo.latidute
// url: '/pages/map/map?floorNo=6&lat=120.42052985815123&lng=36.112617268776845' // url: '/pages/map/map?floorNo=6&lat=120.42052985815123&lng=36.112617268776845'
}) })
}, },

@ -79,6 +79,17 @@
uni.$off('mapData'); uni.$off('mapData');
}, },
onShow() { onShow() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
if(obj.floorNo) {
this.form.floorNo = obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo > 0 && obj.floorNo <= 3 ? obj.floorNo - 4 : obj.floorNo;
}
this.form.latidute = obj.y;
this.form.longidute = obj.x;
})
let userInfo = uni.getStorageSync('mobileInfo'); let userInfo = uni.getStorageSync('mobileInfo');
let locationInfo = uni.getStorageSync('locationInfo'); let locationInfo = uni.getStorageSync('locationInfo');
if (userInfo) { if (userInfo) {
@ -98,15 +109,6 @@
} }
}, },
onLoad() { onLoad() {
uni.$on('mapData', (data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
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.queryPlanTypeList();
// this.getDeviceSn() // this.getDeviceSn()
}, },
@ -248,9 +250,14 @@
''; '';
let floorNo = ''; let floorNo = '';
if(this.positionType == 1) { if(this.positionType == 1) {
floorNo = this.locationInfo.floorNo; floorNo = this.locationInfo.floorNo ? this.locationInfo.floorNo : '';
}else{ }else{
floorNo = this.position.floorNo && this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo && this.position.floorNo < 4 ? this.position.floorNo - 4 : ''; if(this.position && this.position.floorNo) {
floorNo = this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo > 0 && this.position.floorNo <= 3 ? this.position.floorNo - 4 : this.position.floorNo;
}
else{
floorNo = '';
}
} }
this.form.floorNo = floorNo; this.form.floorNo = floorNo;
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : ''; this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : '';
@ -266,6 +273,10 @@
}) })
return; return;
} }
uni.showLoading({
title: '请求中'
});
console.log(this.photoList)
uni.uploadFile({ uni.uploadFile({
url: getApp().globalData.apiUrl + '/appData/putFile', url: getApp().globalData.apiUrl + '/appData/putFile',
files: this.photoList, files: this.photoList,
@ -287,6 +298,11 @@
}, },
fail: (err) => { fail: (err) => {
console.log(err) console.log(err)
},
complete: () => {
setTimeout(() => {
uni.hideLoading();
}, 2000)
} }
}) })
}).catch(err => { }).catch(err => {
@ -311,12 +327,12 @@
let fileList = []; let fileList = [];
res.tempFiles.forEach((item, index) => { res.tempFiles.forEach((item, index) => {
fileList.push({ fileList.push({
name: 'file' + index, name: 'file' + (new Date().getTime()) + '_' + index,
uri: res.tempFilePaths[index], uri: res.tempFilePaths[index],
file: item file: item
}); });
}) })
this.photoList = this.photoList.concat(fileList) this.photoList = this.photoList.concat(fileList);
} }
}); });
}, },

@ -60,6 +60,17 @@
} }
}, },
onShow() { onShow() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
if(obj.floorNo) {
this.form.floorNo = obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo > 0 && obj.floorNo <= 3 ? obj.floorNo - 4 : obj.floorNo;
}
this.form.latidute = obj.y;
this.form.longidute = obj.x;
})
// //
let userInfo = uni.getStorageSync('mobileInfo'); let userInfo = uni.getStorageSync('mobileInfo');
let locationInfo = uni.getStorageSync('locationInfo'); let locationInfo = uni.getStorageSync('locationInfo');
@ -83,15 +94,6 @@
uni.$off('mapData'); uni.$off('mapData');
}, },
onLoad() { onLoad() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
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.queryPlanTypeList();
}, },
methods: { methods: {
@ -114,9 +116,14 @@
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 : '';
let floorNo = ''; let floorNo = '';
if(this.positionType == 1) { if(this.positionType == 1) {
floorNo = this.locationInfo.floorNo; floorNo = this.locationInfo.floorNo ? this.locationInfo.floorNo : '';
}else{ }else{
floorNo = this.position.floorNo && this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo && this.position.floorNo < 4 ? this.position.floorNo - 4 : ''; if(this.position && this.position.floorNo) {
floorNo = this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo > 0 && this.position.floorNo <= 3 ? this.position.floorNo - 4 : this.position.floorNo;
}
else{
floorNo = '';
}
} }
this.form.floorNo = floorNo; this.form.floorNo = floorNo;
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : ''; this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : '';
@ -168,7 +175,9 @@
}, },
complete: (data) => { complete: (data) => {
console.log(data) console.log(data)
uni.hideLoading(); setTimeout(() => {
uni.hideLoading();
},2000)
} }
}) })
}, },

@ -52,21 +52,25 @@
userInfo: {} userInfo: {}
} }
}, },
onShow() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', JSON.stringify(obj));
this.form.xy = obj.x + ',' + obj.y;
this.form.buildId = obj.buildId;
if(obj.floorNo) {
this.form.floorNo = obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo > 0 && obj.floorNo <= 3 ? obj.floorNo - 4 : obj.floorNo;
}
this.form.latidute = obj.y;
this.form.longidute = obj.x;
console.log(JSON.stringify(this.form))
})
},
onUnload() { onUnload() {
console.log('释放监听') console.log('释放监听')
uni.$off('mapData'); uni.$off('mapData');
}, },
onLoad() { onLoad() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', JSON.stringify(obj));
this.form.xy = obj.x + ',' + obj.y;
this.form.buildId = obj.buildId;
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(); this.queryPlanTypeList();
let userInfo = uni.getStorageSync('mobileInfo'); let userInfo = uni.getStorageSync('mobileInfo');
let locationInfo = uni.getStorageSync('locationInfo'); let locationInfo = uni.getStorageSync('locationInfo');

@ -46,14 +46,16 @@
} }
} }
}, },
onShow() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.form.xy = obj.x + ',' + obj.y;
this.form.latidute = obj.y;
this.form.longidute = obj.x;
})
},
onLoad() { onLoad() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.form.xy = obj.x + ',' + obj.y;
this.form.latidute = obj.y;
this.form.longidute = obj.x;
})
let userInfo = uni.getStorageSync('mobileInfo'); let userInfo = uni.getStorageSync('mobileInfo');
if(userInfo){ if(userInfo){
this.userInfo = JSON.parse(userInfo); this.userInfo = JSON.parse(userInfo);

@ -103,6 +103,17 @@
uni.$off('mapData'); uni.$off('mapData');
}, },
onShow() { onShow() {
uni.$on('mapData',(data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
if(obj.floorNo) {
this.form.floorNo = obj.floorNo > 3 ? obj.floorNo - 3 : obj.floorNo > 0 && obj.floorNo <= 3 ? obj.floorNo - 4 : obj.floorNo;
}
this.form.latidute = obj.y;
this.form.longidute = obj.x;
})
// //
let userInfo = uni.getStorageSync('mobileInfo'); let userInfo = uni.getStorageSync('mobileInfo');
let locationInfo = uni.getStorageSync('locationInfo'); let locationInfo = uni.getStorageSync('locationInfo');
@ -123,15 +134,6 @@
// this.getDeviceSn() // this.getDeviceSn()
}, },
onLoad() { onLoad() {
uni.$on('mapData', (data) => {
let obj = JSON.parse(data.data[0].detail);
console.log('监听到事件来自返回的参数:', obj);
this.position = obj;
this.form.buildId = obj.buildId;
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.recorderManager = uni.getRecorderManager();
this.innerAudioContext = uni.createInnerAudioContext(); this.innerAudioContext = uni.createInnerAudioContext();
this.innerAudioContext.autoplay = true; this.innerAudioContext.autoplay = true;
@ -288,9 +290,14 @@
''; '';
let floorNo = ''; let floorNo = '';
if(this.positionType == 1) { if(this.positionType == 1) {
floorNo = this.locationInfo.floorNo; floorNo = this.locationInfo.floorNo ? this.locationInfo.floorNo : '';
}else{ }else{
floorNo = this.position.floorNo && this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo && this.position.floorNo < 4 ? this.position.floorNo - 4 : ''; if(this.position && this.position.floorNo) {
floorNo = this.position.floorNo > 3 ? this.position.floorNo - 3 : this.position.floorNo > 0 && this.position.floorNo <= 3 ? this.position.floorNo - 4 : this.position.floorNo;
}
else{
floorNo = '';
}
} }
this.form.floorNo = floorNo; this.form.floorNo = floorNo;
this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : ''; this.form.latidute = this.positionType == 1 ? this.locationInfo.latidute : this.position ? this.position.y : '';
@ -359,6 +366,9 @@
}) })
return; return;
} }
uni.showLoading({
title: '请求中'
});
uni.uploadFile({ uni.uploadFile({
url: getApp().globalData.apiUrl + '/appData/putFile', url: getApp().globalData.apiUrl + '/appData/putFile',
files: this.voicePathList, files: this.voicePathList,
@ -384,6 +394,11 @@
}, },
fail: (err) => { fail: (err) => {
console.log(err) console.log(err)
},
complete: () => {
setTimeout(() => {
uni.hideLoading();
}, 2000)
} }
}) })
}).catch(err => { }).catch(err => {

Binary file not shown.

@ -1 +1 @@
https://ide.dcloud.net.cn/build/download/0029f9b0-a3c9-11ee-ae3e-27214bbc5732 https://ide.dcloud.net.cn/build/download/89126930-a48a-11ee-ac2d-89abc48f179b

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