| | |
| | | resultFeedbackPopupShow: false, |
| | | popupDisplay: "none", |
| | | userId: null, |
| | | |
| | | geolocation: null |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | resultData.push(item) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.map = this.beginMap(this.map, resultData); //创建并接受map |
| | | this.move = new myDomMove('#seedata', '.title', '#map'); |
| | |
| | | return null; |
| | | }, |
| | | beginMap(map, data) { |
| | | var that = this, center = [28.708432053474827, 115.85883507433789]; |
| | | var that = this, |
| | | center = [28.708432053474827, 115.85883507433789]; |
| | | // url = `http://s16s652780.51mypc.cn/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | // url = `http://localhost:89/alarm/alarm/APP-getAlarm?id=${data[0].id}`; |
| | | this.nowPosition = center; |
| | |
| | | |
| | | }); |
| | | this.nowPosition = center; |
| | | |
| | | |
| | | this.getLocationData(this.geolocation); |
| | | |
| | | return map; //抛出map |
| | | }, |
| | | getDHLine(x, y) { |
| | |
| | | upData() { |
| | | console.log('上传信息成功') |
| | | }, |
| | | getLocationData() { |
| | | getLocationData(geolocation) { |
| | | var that = this; |
| | | var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq"); |
| | | var positionNum = 0; |
| | | var options = { |
| | | timeout: 8000 |
| | |
| | | var addr = position.addr; //详细地址 |
| | | that.lat = position.lat; // |
| | | that.lng = position.lng; //火星坐标 //TODO 实现业务代码逻辑 |
| | | |
| | | |
| | | console.log(adCode, position, addr, 15145) |
| | | |
| | | |
| | | axios.post("http://223.82.109.183:2080/api/liveLocation/saveLiveLocationAndLocus", { |
| | | type: 1, |
| | | workerId: that.userId, |
| | | longitude: position.lng, |
| | | latitude: position.lat, |
| | | location: addr == '' ? position.province + position.city : addr |
| | | }).then((res) => { |
| | | |
| | | console.log(res, 4848) |
| | | |
| | | }) |
| | | |
| | | if (that.LXdhStart != null) { |
| | | that.map.removeLayer(that.LXdhStart); |
| | |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | this.geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq"); |
| | | |
| | | this.beginCome(); |
| | | this.getLocationData(); |
| | | |
| | | var that = this; |
| | | |
| | | setInterval(() => { |
| | | |
| | | that.getLocationData(); |
| | | that.getLocationData(that.geolocation); |
| | | |
| | | }, 10000); |
| | | }, 30000); |
| | | }, |
| | | wacth: {} |
| | | }) |