Commit 57b5c5f8 authored by xxx's avatar xxx

删除无用打印信息以及无用方法

parent 9a74bf10
......@@ -280,7 +280,7 @@ export default {
},
//WebSocket数据接收
websocketonmessage(e){
console.log('websocketonmessage',e);
//console.log('websocketonmessage',e);
let that = this;
if(e == undefined){
// let str1 = localStorage.getItem(this.userName1 + 'voiceData');
......
......@@ -137,7 +137,6 @@ export default {
personalName:'',
zongTimer1:null,
zongTimer2:null,
zongTimer3:null,
currentTime:'',
selectFunction:0,
carnumber:'',
......@@ -179,11 +178,6 @@ export default {
this.zongTimer1 = setInterval(() => {
this.setNowTimes();
}, 1000)
// this.zongTimer3 = setInterval(() => {
// if(this.equipmentName){
// this.getCarLoaction();
// }
// }, 2000)
this.zongTimer2 = setInterval(() => {
if(this.carnumber == ''){
return
......@@ -304,61 +298,6 @@ export default {
navigator.getBattery().then(function(battery) {
that.batteryEnegy = parseInt(battery.level * 100);
});
},
//获取该车位置并上传到后端
getCarLoaction(){
let that = this;
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
//locationSuccess 获取成功的话
function(position) {
let LoaObj1 = {};
let LoaObj1xy = {};
//判断该车是否在行驶状态
let drivingDistance = that.getDistanceIndex(that.navigatorXY.y,that.navigatorXY.x,position.coords.latitude,position.coords.longitude);
//console.log(drivingDistance);
if(drivingDistance <= 1){
that.leftBtnDisable = true;
}else{
that.leftBtnDisable = false;
}
if(drivingDistance > 1000 && drivingDistance < 10000){
LoaObj1xy.x = that.navigatorXY.x;
LoaObj1xy.y = that.navigatorXY.y;
LoaObj1.gndRate = '';
LoaObj1.location = LoaObj1xy;
LoaObj1.name = that.equipmentName;
LoaObj1.time = new Date().getTime();
let zuizhong1 = {};
zuizhong1.name = that.equipmentName;
zuizhong1.jsonObject = JSON.stringify(LoaObj1);
httpPostForJson(gpsPhoneGpsQuery,zuizhong1).then((res1) => {})
httpPostForJson(carRealTimeLocationQuery2,JSON.stringify(LoaObj1)).then((res2) => {})
}else{
LoaObj1xy.x = position.coords.longitude;
LoaObj1xy.y = position.coords.latitude;
that.navigatorXY.x = position.coords.longitude;
that.navigatorXY.y = position.coords.latitude;
LoaObj1.gndRate = '';
LoaObj1.location = LoaObj1xy;
LoaObj1.name = that.equipmentName;
LoaObj1.time = new Date().getTime();
let zuizhong1 = {};
zuizhong1.name = that.equipmentName;
zuizhong1.jsonObject = JSON.stringify(LoaObj1);
httpPostForJson(gpsPhoneGpsQuery,zuizhong1).then((res1) => {})
httpPostForJson(carRealTimeLocationQuery2,JSON.stringify(LoaObj1)).then((res2) => {})
}
},
//locationError 获取失败的话
function(error) {
var errorType = ['您拒绝共享位置信息', '获取不到位置信息', '获取位置信息超时'];
console.log(errorType[error.code - 1]);
},{
enableHighAccuracy: true,
}
);
}
},
//获取该车位置并上传到后端
getCarLoaction1(){
......@@ -371,8 +310,7 @@ export default {
let LoaObj1xy = {};
//判断该车是否在行驶状态
let drivingDistance = that.getDistanceIndex(that.navigatorXY.y,that.navigatorXY.x,position.coords.latitude,position.coords.longitude);
console.log(drivingDistance);
if(drivingDistance <= 50 || drivingDistance >= 10000){
if(drivingDistance <= 30 || drivingDistance >= 10000){
that.leftBtnDisable = true;
}else{
that.leftBtnDisable = false;
......@@ -736,10 +674,6 @@ export default {
clearInterval(this.zongTimer2);
this.zongTimer2 = null;
}
if(this.zongTimer3) {
clearInterval(this.zongTimer3);
this.zongTimer3 = null;
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment