018A添加报警日志
This commit is contained in:
@ -284,6 +284,7 @@
|
||||
var mq = null;
|
||||
var pagePath = "pages/6075J/BJQ6075J";
|
||||
var brightnessTimer = null;
|
||||
var reGeoTime=null;
|
||||
export default {
|
||||
components: {
|
||||
TextToHexV1
|
||||
@ -663,7 +664,7 @@
|
||||
totalPackets = ReSendNo;
|
||||
currentPacket = ReSendNo;
|
||||
}
|
||||
this.totalPackets = totalPackets;
|
||||
|
||||
// 发送单个数据包
|
||||
const sendNextVideoPacket = () => {
|
||||
// console.log("准备发送一段数据");
|
||||
@ -1446,6 +1447,7 @@
|
||||
let sendLaser = () => {
|
||||
this.sendData(json, null, 'string').then(res => {
|
||||
this.formData.sta_laser = val;
|
||||
this.formData.sta_LightGrade=6;
|
||||
this.setBleFormData();
|
||||
}).catch(ex => {
|
||||
console.error("出现错误", ex)
|
||||
@ -1482,6 +1484,9 @@
|
||||
this.sendData(json, null, 'string').then((res) => {
|
||||
let key = li.key.replace(/ins_/g, 'sta_');
|
||||
this.formData[key] = li.value;
|
||||
if(li.value!=6){
|
||||
this.formData.sta_laser=0;
|
||||
}
|
||||
this.setBleFormData();
|
||||
this.formData.sta_brightness = 100;
|
||||
}).catch((ex) => {
|
||||
@ -1973,9 +1978,43 @@
|
||||
this.$set(this.dic.actionSheets[0], 'value', this.formData.sta_LightGrade);
|
||||
this.$set(this.dic.actionSheets[1], 'value', this.formData.sta_Side_Light);
|
||||
|
||||
if ('sta_longitude' in data) {
|
||||
this.reGeo();
|
||||
}
|
||||
this.setBleFormData();
|
||||
},
|
||||
|
||||
reGeo() {
|
||||
console.log("经纬度发生变化,执行逆地理")
|
||||
let task = () => {
|
||||
if (this.formData.sta_longitude && this.formData.sta_latitude) {
|
||||
let promise = lnglatConvert.wgs84_to_gcj02(this.formData.sta_longitude, this.formData
|
||||
.sta_latitude);
|
||||
promise.then(lnglat => {
|
||||
|
||||
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.setBleFormData();
|
||||
}).catch(ex => {
|
||||
console.error("逆地理失败了")
|
||||
});
|
||||
}).catch(err => {
|
||||
console.error("坐标转换失败了");
|
||||
});
|
||||
} else {
|
||||
console.error("经纬度缺失");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
clearTimeout(reGeoTime);
|
||||
reGeoTime = setTimeout(task, 500);
|
||||
},
|
||||
setBleFormData() {
|
||||
if (!ble) {
|
||||
return;
|
||||
@ -2097,7 +2136,7 @@
|
||||
|
||||
},
|
||||
gotoMap() {
|
||||
let promise = lnglatConvert.wgs84_to_gcj02(this.formData.sta_longitude, this.formData.sta_latitude);
|
||||
let promise =Promise.resolve([this.formData.sta_longitude, this.formData.sta_latitude]); //lnglatConvert.wgs84_to_gcj02(this.formData.sta_longitude, this.formData.sta_latitude);
|
||||
promise.then(lnglat => {
|
||||
|
||||
this.detailData.longitude = lnglat[0];
|
||||
|
||||
Reference in New Issue
Block a user